NoSuchMethodError in ExcelImporter after migrating to Mendix 7 and updating the ExcelImporter

7
We are busy migrating our Mendix 6 project to Mendix 7. After updating the Mendix ExcelImporter to the latest version, the following RunTimeException comes up whenever the StartImplateByTemplateMethod is called: java.lang.NoSuchMethodError: replication.ObjectConfig.removeUnusedObjects(Lreplication/ReplicationSettings$ChangeTracking;Ljava/lang/String;)V at excelimporter.reader.readers.ExcelReader.setAdditionalProperties(ExcelReader.java:536) at excelimporter.reader.readers.ExcelReader.importData(ExcelReader.java:235) at excelimporter.reader.ExcelImporter.startImport(ExcelImporter.java:120) at excelimporter.actions.StartImportByTemplate.executeAction(StartImportByTemplate.java:54) at excelimporter.actions.StartImportByTemplate.executeAction(StartImportByTemplate.java:1) at com.mendix.systemwideinterfaces.core.UserAction.execute(UserAction.java:50) at com.mendix.basis.actionmanagement.CoreActionHandlerImpl.doCall(CoreActionHandlerImpl.scala:76) at com.mendix.basis.actionmanagement.CoreActionHandlerImpl.call(CoreActionHandlerImpl.scala:55) at com.mendix.core.actionmanagement.CoreAction.call(CoreAction.java:51) at com.mendix.basis.actionmanagement.ActionManager$1.execute(ActionManager.java:186) at com.mendix.util.classloading.Runner.doRunUsingClassLoaderOf(Runner.java:33) at com.mendix.basis.actionmanagement.ActionManager.executeSync(ActionManager.java:191) at com.mendix.basis.component.InternalCore.execute(InternalCore.java:573) at com.mendix.modules.microflowengine.actions.actioncall.JavaAction.execute(JavaAction.scala:60) at com.mendix.modules.microflowengine.microflow.impl.MicroflowObject.execute(MicroflowObject.java:47) at com.mendix.modules.microflowengine.microflow.impl.MicroflowImpl.executeAfterBreakingIfNecessary(MicroflowImpl.java:200) at com.mendix.modules.microflowengine.microflow.impl.MicroflowImpl.executeAction(MicroflowImpl.java:157) at com.mendix.systemwideinterfaces.core.UserAction.execute(UserAction.java:50) at com.mendix.basis.actionmanagement.CoreActionHandlerImpl.doCall(CoreActionHandlerImpl.scala:76) at com.mendix.basis.actionmanagement.CoreActionHandlerImpl.call(CoreActionHandlerImpl.scala:55) at com.mendix.core.actionmanagement.CoreAction.call(CoreAction.java:51) at com.mendix.basis.actionmanagement.DefaultActionMonitor$$anonfun$run$1.apply(CustomMonitoredAction.scala:18) at com.mendix.basis.actionmanagement.IMonitoredAction$$anon$1.execute(IMonitoredAction.scala:47) at com.mendix.util.classloading.Runner.doRunUsingClassLoaderOf(Runner.java:33) at com.mendix.basis.actionmanagement.IMonitoredAction$class.monitor(IMonitoredAction.scala:49) 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:65) at com.mendix.basis.actionmanagement.CoreActionHandlerImpl.call(CoreActionHandlerImpl.scala:53) at com.mendix.core.actionmanagement.CoreAction.call(CoreAction.java:51) at com.mendix.basis.actionmanagement.AsyncExecution$AsyncCallableWrapper$$anonfun$2.apply(AsyncExecution.scala:33) at scala.util.Try$.apply(Try.scala:192) at com.mendix.basis.actionmanagement.AsyncExecution$AsyncCallableWrapper.call(AsyncExecution.scala:32) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745) After looking through the userlibs, I found out that we had two replication jars in the project (which was probaly caused by updating the module). In the replication jar, the ObjectConfig.removeUnusedObjects method is defined. I expected it to be a bug where it was unable to determine which jar to use, and therefore giving an error (but then again, you would expect a compilation error in that case). However, after removing one of the jars and recompiling it still gave me a run time exception. Restoring that jar and removing the other jar gave the same result.    If someone experencied similar issues and would be able to help, that would be greatly appreciated.
asked
1 answers
4

I've run into an issue before when upgrading the excel importer (Except that it gave me a compiler error). The issue had to do with older versions of jar files were not removed when upgrading the module. Here is a list of the jar files that come with the excel importer. I suggest going through to see if there are any duplicates with these particular jar files.

 

com.springsource.org.apache.commons.lang-2.5.0
dom4j-1.6.1
javax.xml.stream-1.0.1
org.apache.commons.io-2.3.0
org.apache.servicemix.bundles.xalan-2.7.1
org.apache.servicemix.bundles.xmlbeans-2.5.0
poi-3.16
poi-ooxml-3.16
poi-ooxml-schemas-3.16
replication7
xml-apis-ext

 

In my case, it was the three POI jar files that were conflicted. Also don't forget to clean deployment directory after you do this fix and recompile. 

answered