IndexOutOfBoundsException when exporting to Excel in Mx5.12
2
I know I am not the only one experiencing this error but I have not seen the correct answer yet on the cause of this error or how to fix it. In Mx5.12 I just put the Export to Excel button in a form to get this error (see stacktrace). Anybody found the cause yet? Regards, Ronald An error has occurred while handling the request. [User 'MxAdmin' with session id '4d540e09-5f2e-4cc5-a107-15726c80de93' and roles 'Administrator'] -------- java.util.concurrent.ExecutionException: com.mendix.core.CoreRuntimeException: Exception occurred in action '{}', all database changes executed by this action were rolled back at java.util.concurrent.FutureTask.report(FutureTask.java:122) at java.util.concurrent.FutureTask.get(FutureTask.java:188) at com.mendix.webui.actions.client.PollBackgroundJobAction.handleJobCompletion(PollBackgroundJobAction.scala:56) at com.mendix.webui.actions.client.PollBackgroundJobAction.execute(PollBackgroundJobAction.scala:30) at com.mendix.webui.requesthandling.ClientRequestHandler$$anonfun$handleRequest$1.apply$mcV$sp(ClientRequestHandler.scala:300) at com.mendix.webui.requesthandling.ClientRequestHandler$$anonfun$handleRequest$1.apply(ClientRequestHandler.scala:293) at com.mendix.webui.requesthandling.ClientRequestHandler$$anonfun$handleRequest$1.apply(ClientRequestHandler.scala:293) at com.mendix.core.session.Worker$$anonfun$receive$3$$anonfun$2$$anon$1.execute(ActionDispatching.scala:151) at com.mendix.util.classloading.Runner.doRunUsingClassLoaderOf(Runner.java:37) at com.mendix.core.session.Worker$$anonfun$receive$3$$anonfun$2.apply(ActionDispatching.scala:153) at scala.util.Try$.apply(Try.scala:191) at com.mendix.core.session.Worker$$anonfun$receive$3.applyOrElse(ActionDispatching.scala:147) at akka.actor.Actor$class.aroundReceive(Actor.scala:465) at com.mendix.core.session.Worker.aroundReceive(ActionDispatching.scala:140) at akka.actor.ActorCell.receiveMessage(ActorCell.scala:516) at akka.actor.ActorCell.invoke(ActorCell.scala:487) at akka.dispatch.Mailbox.processMailbox(Mailbox.scala:238) at akka.dispatch.Mailbox.run(Mailbox.scala:220) at akka.dispatch.ForkJoinExecutorConfigurator$AkkaForkJoinTask.exec(AbstractDispatcher.scala:393) at scala.concurrent.forkjoin.ForkJoinTask.doExec(ForkJoinTask.java:260) at scala.concurrent.forkjoin.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1339) at scala.concurrent.forkjoin.ForkJoinPool.runWorker(ForkJoinPool.java:1979) at scala.concurrent.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:107) Caused by: com.mendix.core.CoreRuntimeException: Exception occurred in action '{}', all database changes executed by this action were rolled back at com.mendix.core.actionmanagement.CoreAction.processErrorState(CoreAction.java:343) Caused by: java.lang.IndexOutOfBoundsException: Index: 0, Size: 0 at java.util.ArrayList.rangeCheck(ArrayList.java:635) at java.util.ArrayList.get(ArrayList.java:411) at com.mendix.webui.actions.client.ExportDataFormatter.getReferenceValue(ExportDataFormatter.java:115) at com.mendix.webui.actions.client.ExportDataFormatter.getReferenceValue(ExportDataFormatter.java:159) at com.mendix.webui.actions.client.ExportDataFormatter.getRowValues(ExportDataFormatter.java:73) at com.mendix.webui.actions.client.ExportAction.generateExcelData(ExportAction.java:303) at com.mendix.webui.actions.client.ExportAction.exportToExcel(ExportAction.java:254) at com.mendix.webui.actions.client.ExportAction.exportGrid(ExportAction.java:112) at com.mendix.webui.actions.client.ExportAction.access$100(ExportAction.java:60) at com.mendix.webui.actions.client.ExportAction$ExportCoreAction.execute(ExportAction.java:405) at com.mendix.webui.actions.client.ExportAction$ExportCoreAction.execute(ExportAction.java:382) at com.mendix.core.actionmanagement.CoreAction.doCall(CoreAction.java:291) at com.mendix.core.actionmanagement.CoreAction.call(CoreAction.java:276) at com.mendix.core.actionmanagement.CustomActionMonitorImpl$$anonfun$run$1.apply(CustomMonitoredAction.scala:17) at com.mendix.core.session.Worker$$anonfun$receive$3$$anonfun$2$$anon$1.execute(ActionDispatching.scala:151) at com.mendix.util.classloading.Runner.doRunUsingClassLoaderOf(Runner.java:37) at com.mendix.core.session.Worker$$anonfun$receive$3$$anonfun$2.apply(ActionDispatching.scala:153) at scala.util.Try$.apply(Try.scala:191) at com.mendix.core.session.Worker$$anonfun$receive$3.applyOrElse(ActionDispatching.scala:147) at akka.actor.Actor$class.aroundReceive(Actor.scala:465) at com.mendix.core.session.Worker.aroundReceive(ActionDispatching.scala:140) at akka.actor.ActorCell.receiveMessage(ActorCell.scala:516) at akka.actor.ActorCell.invoke(ActorCell.scala:487) at akka.dispatch.Mailbox.processMailbox(Mailbox.scala:238) at akka.dispatch.Mailbox.run(Mailbox.scala:220) at akka.dispatch.ForkJoinExecutorConfigurator$AkkaForkJoinTask.exec(AbstractDispatcher.scala:393) at scala.concurrent.forkjoin.ForkJoinTask.doExec(ForkJoinTask.java:260) at scala.concurrent.forkjoin.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1339) at scala.concurrent.forkjoin.ForkJoinPool.runWorker(ForkJoinPool.java:1979) at scala.concurrent.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:107)
asked
Ronald Catersels
3 answers
4
I've seen this error when I had a combination of columns based on a reference set and a calculated attribute in the same datagrid. Maybe this also applies to your situation.
Removing either the reference set column, or the calculate attribute column fixed it for me.
answered
Roeland Salij
1
It has indeed to do with virtual calculated attributes in the grid. Removing them solves the problem.
I think it's a 5.12 issue. In 5.9 this worked fine.