Excel Importer module gives error when importing .xlsx file.

1
Hi, I have set up the Excel importer in order to import objects into my Mendix project. When I import a .xls file, the template seems to be working fine. However, when I save the file in Excel as the standard .xlsx and then try to import it it gives me the following error:    java.lang.NoSuchMethodError: org.apache.poi.util.XMLHelper.newDocumentBuilder()Ljavax/xml/parsers/DocumentBuilder;     at org.apache.poi.ooxml.util.DocumentHelper.newDocumentBuilder(DocumentHelper.java:47)     at org.apache.poi.ooxml.util.DocumentHelper.<clinit>(DocumentHelper.java:36)     at org.apache.poi.openxml4j.opc.internal.ContentTypeManager.parseContentTypesFile(ContentTypeManager.java:395)     at org.apache.poi.openxml4j.opc.internal.ContentTypeManager.<init>(ContentTypeManager.java:104)     at org.apache.poi.openxml4j.opc.internal.ZipContentTypeManager.<init>(ZipContentTypeManager.java:54)     at org.apache.poi.openxml4j.opc.ZipPackage.getPartsImpl(ZipPackage.java:256)     at org.apache.poi.openxml4j.opc.OPCPackage.getParts(OPCPackage.java:732)     at org.apache.poi.openxml4j.opc.OPCPackage.open(OPCPackage.java:243)     at excelimporter.reader.readers.ExcelXLSXDataReader.readData(ExcelXLSXDataReader.java:28)     at excelimporter.reader.readers.ExcelReader.importData(ExcelReader.java:451)     at excelimporter.reader.ExcelImporter.startImport(ExcelImporter.java:120)     at excelimporter.actions.StartImportByTemplate.executeAction(StartImportByTemplate.java:54)     at excelimporter.actions.StartImportByTemplate.executeAction(StartImportByTemplate.java:25)     at com.mendix.systemwideinterfaces.core.UserAction.execute(UserAction.java:46)     at com.mendix.basis.actionmanagement.CoreActionHandlerImpl.doCall(CoreActionHandlerImpl.scala:71)     at com.mendix.basis.actionmanagement.CoreActionHandlerImpl.call(CoreActionHandlerImpl.scala:49)     at com.mendix.core.actionmanagement.CoreAction.call(CoreAction.java:54)     at com.mendix.basis.actionmanagement.ActionManagerBase$1.execute(ActionManagerBase.java:147)     at com.mendix.util.classloading.Runner.doRunUsingClassLoaderOf(Runner.java:26)     at com.mendix.basis.actionmanagement.ActionManagerBase.executeSync(ActionManagerBase.java:152)     at com.mendix.basis.actionmanagement.UserActionCallBuilderImpl.execute(UserActionCallBuilderImpl.scala:30)     at com.mendix.modules.microflowengine.actions.actioncall.JavaAction.execute(JavaAction.scala:56)     at com.mendix.modules.microflowengine.microflow.impl.MicroflowObject.$anonfun$execute$1(MicroflowObject.scala:32)     at scala.Option.flatMap(Option.scala:283)     at com.mendix.modules.microflowengine.microflow.impl.MicroflowObject.execute(MicroflowObject.scala:29)     at com.mendix.modules.microflowengine.microflow.impl.MicroflowImpl.$anonfun$executeAfterBreakingIfNecessary$2(MicroflowImpl.scala:172)     at scala.Option.flatMap(Option.scala:283)     at com.mendix.modules.microflowengine.microflow.impl.MicroflowImpl.executeAfterBreakingIfNecessary(MicroflowImpl.scala:172)     at com.mendix.modules.microflowengine.microflow.impl.MicroflowImpl.executeAction(MicroflowImpl.scala:119)     at com.mendix.systemwideinterfaces.core.UserAction.execute(UserAction.java:46)     at com.mendix.basis.actionmanagement.CoreActionHandlerImpl.doCall(CoreActionHandlerImpl.scala:71)     at com.mendix.basis.actionmanagement.CoreActionHandlerImpl.call(CoreActionHandlerImpl.scala:49)     at com.mendix.core.actionmanagement.CoreAction.call(CoreAction.java:54)     at com.mendix.basis.actionmanagement.DefaultActionMonitor$.$anonfun$run$1(CustomMonitoredAction.scala:18)     at com.mendix.basis.actionmanagement.IMonitoredAction$$anon$1.execute(IMonitoredAction.scala:47)     at com.mendix.util.classloading.Runner.doRunUsingClassLoaderOf(Runner.java:26)     at com.mendix.basis.actionmanagement.IMonitoredAction.monitor(IMonitoredAction.scala:49)     at com.mendix.basis.actionmanagement.IMonitoredAction.monitor$(IMonitoredAction.scala:25)     at com.mendix.basis.actionmanagement.CustomMonitoredAction.monitor(CustomMonitoredAction.scala:22)     at com.mendix.basis.actionmanagement.DefaultActionMonitor$.run(CustomMonitoredAction.scala:18)     at com.mendix.basis.actionmanagement.CoreActionHandlerImpl.runMonitoredAction(CoreActionHandlerImpl.scala:60)     at com.mendix.basis.actionmanagement.CoreActionHandlerImpl.call(CoreActionHandlerImpl.scala:47)     at com.mendix.core.actionmanagement.CoreAction.call(CoreAction.java:54)     at com.mendix.basis.actionmanagement.ActionManager.$anonfun$execute$1(ActionManager.scala:118)     at scala.concurrent.Future$.$anonfun$apply$1(Future.scala:671)     at scala.concurrent.impl.Promise$Transformation.run(Promise.scala:430)     at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)     at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)     at java.base/java.lang.Thread.run(Thread.java:834)     I have tried cleaning up my userlib folder and tried a couple of older versions of the importer module, but I still can't get it to work. I do have the idea that it is connected to the fact that I am using the Excel Exporter module, that appears to use an older version of the apache poi java library. But I haven't been in luck so far when trying to fix this problem. Has anyone experienced the same error? What could I try in order to fix this problem?   (I'm using Mx8.17, but that is not one of the choices in the list on the forum yet.)
asked
2 answers
2

You can try placing the updated jar file in userlib folder and deleting previous ones to avoid any duplicates.
Then clean deployment directory, run app again. 
For details see this post https://forum.mendix.com/link/questions/104656

answered
1

Thank you for your reply. I seem to have missed that forum post you are reffering to. Importing .xlsx now works!

I had not tried actually deleting the 4.1.1 poi jars in the userlib folder. I was afraid that would break the XLSReport module, but it seems to have solved itself fine by using the 4.1.2 poi jars :-)

answered