We receive an error when exporting data from a datagrid using the Excel export button. The datagrid shows all relevant data for all records however when pressing the export button the following error is shown in the log: java.lang.IllegalArgumentException: This data table 'OrganisationPerson.Entity' doesn't have the column 'OrganisationPerson.OrganisationTeamCurrent'. at lD.a(SourceFile:180) at kR.getColumnIndex(SourceFile:53) at kR.getValue(SourceFile:162) at gE.a(SourceFile:107) at gE.a(SourceFile:108) at gE.a(SourceFile:64) at en.a(SourceFile:234) at en.b(SourceFile:192) at en.a(SourceFile:111) at en.execute(SourceFile:83) at ju.a(SourceFile:299) at ju.a(SourceFile:230) at ju.processRequest(SourceFile:174) at fC.a(SourceFile:71) at com.mendix.core.MxRuntime.processRequest(SourceFile:916) at com.mendix.m2ee.server.handler.RuntimeHandler.handle(RuntimeHandler.java:42) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:113) at org.eclipse.jetty.server.Server.handle(Server.java:334) at org.eclipse.jetty.server.HttpConnection.handleRequest(HttpConnection.java:559) at org.eclipse.jetty.server.HttpConnection$RequestHandler.content(HttpConnection.java:1007) at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:747) at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:209) at org.eclipse.jetty.server.HttpConnection.handle(HttpConnection.java:406) at org.eclipse.jetty.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:462) at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:436) at java.lang.Thread.run(Thread.java:662) The mentioned column is in fact not a column but an association. Other excel exports seem to work fine.
After some experimenting with adding and removing columns I found the column that caused the error. Error seemed to be caused by the use of a generalization in an attribute path (strange since in another column I do an identical operation which does not cause any errors). I modified the attribute path to not use the generalization level attribute, but instead accessed the (same) attribute via the specialization entity. Now it works fine again. Note that the attribute path causing the issue did not contain the path/association that was mentioned in the error.
Apologies for the wording of the answer, it is kind of hard to describe without going into too much details of our datamodel.
Thanks all for your assistance.