Error importing an Excel file with the ExcelImporter module
0
Hello everyone, and thank you in advance for your answers. I created a new application from the Teamcenter Extension Sample App. So far, no problems. I then integrated the ExcelImporter module in order to be able to import data from an Excel file. And then I encountered an error while importing the file.Here are the error logs. Log node : ActionManager Message : Error in execution of monitored action '{"name":"ExcelImporter.IVK_ImportTemplateDocument","type":"Microflow"}' (execution id: cc769941-3b2f-4cb4-9a42-cbefdc88ae93, execution type: CLIENT_ASYNC_MONITORED) Stack trace : java.lang.NoSuchMethodError: 'java.lang.ClassLoader[] org.apache.logging.log4j.util.LoaderUtil.getClassLoaders()' at org.apache.logging.log4j.core.util.WatchManager.getEventServices(WatchManager.java:160) at org.apache.logging.log4j.core.util.WatchManager.<init>(WatchManager.java:137) at org.apache.logging.log4j.core.config.AbstractConfiguration.<init>(AbstractConfiguration.java:140) at org.apache.logging.log4j.core.config.NullConfiguration.<init>(NullConfiguration.java:32) at org.apache.logging.log4j.core.LoggerContext.<clinit>(LoggerContext.java:85) at org.apache.logging.log4j.core.selector.ClassLoaderContextSelector.createContext(ClassLoaderContextSelector.java:254) at org.apache.logging.log4j.core.selector.ClassLoaderContextSelector.locateContext(ClassLoaderContextSelector.java:218) at org.apache.logging.log4j.core.selector.ClassLoaderContextSelector.getContext(ClassLoaderContextSelector.java:136) at org.apache.logging.log4j.core.selector.ClassLoaderContextSelector.getContext(ClassLoaderContextSelector.java:123) at org.apache.logging.log4j.core.selector.ClassLoaderContextSelector.getContext(ClassLoaderContextSelector.java:117) at org.apache.logging.log4j.core.impl.Log4jContextFactory.getContext(Log4jContextFactory.java:150) at org.apache.logging.log4j.core.impl.Log4jContextFactory.getContext(Log4jContextFactory.java:47) at org.apache.logging.log4j.LogManager.getContext(LogManager.java:197) at org.apache.logging.log4j.LogManager.getLogger(LogManager.java:611) at org.apache.poi.ss.usermodel.DataFormatter.<clinit>(DataFormatter.java:228) at excelimporter.reader.readers.ExcelXLSXDataReader.<clinit>(ExcelXLSXDataReader.java:33) at excelimporter.reader.readers.ExcelReader.importData(ExcelReader.java:364) at excelimporter.reader.ExcelImporter.startImport(ExcelImporter.java:118) at excelimporter.actions.StartImportByTemplate.executeAction(StartImportByTemplate.java:61) at excelimporter.actions.StartImportByTemplate.executeAction(StartImportByTemplate.java:25) at com.mendix.systemwideinterfaces.core.UserAction.execute(UserAction.java:58) at com.mendix.basis.actionmanagement.CoreActionHandlerImpl.doCall(CoreActionHandlerImpl.scala:71) at com.mendix.basis.actionmanagement.CoreActionHandlerImpl.call(CoreActionHandlerImpl.scala:48) at com.mendix.core.actionmanagement.internal.InternalCoreAction.call(InternalCoreAction.java:57) at com.mendix.basis.actionmanagement.ActionManager.$anonfun$executeSync$2(ActionManager.scala:105) at com.mendix.util.classloading.Runner$.withContextClassLoader(Runner.scala:20) at com.mendix.basis.actionmanagement.ActionManager.executeSync(ActionManager.scala:104) at com.mendix.basis.actionmanagement.UserActionCallBuilderImpl.execute(UserActionCallBuilderImpl.scala:59) at com.mendix.modules.microflowengine.actions.actioncall.ForegroundJavaAction.doExecute(ForegroundJavaAction.scala:35) at com.mendix.modules.microflowengine.actions.actioncall.ForegroundJavaAction.doExecute(ForegroundJavaAction.scala:11) at com.mendix.modules.microflowengine.actions.actioncall.JavaAction.execute(JavaAction.scala:38) at com.mendix.modules.microflowengine.microflow.impl.MicroflowObject.$anonfun$execute$1(MicroflowObject.scala:29) at scala.Option.flatMap(Option.scala:283) at com.mendix.modules.microflowengine.microflow.impl.MicroflowObject.execute(MicroflowObject.scala:26) at com.mendix.modules.microflowengine.microflow.impl.MicroflowImpl.executeAfterBreakingIfNecessary(MicroflowImpl.scala:176) at com.mendix.modules.microflowengine.microflow.impl.MicroflowImpl.executeAction(MicroflowImpl.scala:116) at com.mendix.systemwideinterfaces.core.UserAction.execute(UserAction.java:58) at com.mendix.basis.actionmanagement.CoreActionHandlerImpl.doCall(CoreActionHandlerImpl.scala:71) at com.mendix.basis.actionmanagement.CoreActionHandlerImpl.call(CoreActionHandlerImpl.scala:48) at com.mendix.core.actionmanagement.internal.InternalCoreAction.call(InternalCoreAction.java:57) at com.mendix.basis.actionmanagement.CoreActionHandlerImpl.$anonfun$runMonitoredAction$1(CoreActionHandlerImpl.scala:59) at com.mendix.basis.actionmanagement.ActionMonitoring$.$anonfun$monitor$1(ActionMonitoring.scala:52) at com.mendix.util.classloading.Runner$.withContextClassLoader(Runner.scala:20) at com.mendix.basis.actionmanagement.ActionMonitoring$.monitor(ActionMonitoring.scala:52) at com.mendix.basis.actionmanagement.CoreActionHandlerImpl.runMonitoredAction(CoreActionHandlerImpl.scala:59) at com.mendix.basis.actionmanagement.CoreActionHandlerImpl.call(CoreActionHandlerImpl.scala:46) at com.mendix.core.actionmanagement.internal.InternalCoreAction.call(InternalCoreAction.java:57) at com.mendix.basis.actionmanagement.ActionManager.$anonfun$executeAsync$3(ActionManager.scala:88) at scala.concurrent.Future$.$anonfun$apply$1(Future.scala:687) at scala.concurrent.impl.Promise$Transformation.run(Promise.scala:467) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642) at java.base/java.lang.Thread.run(Thread.java:1583) Does anyone have any ideas on how to solve my problem?
asked
Nicolas Pinaud
3 answers
0
Hi Nicolas,
Which version of Excel Importer are you using? Can you try using an older version? We found an incompatibility in the log4j libraries between newer versions of Excel Exporter and TcConnector. Excel exporter uses a newer version. Maybe this problem occurs with Excel importer as well. From your stacktrace, it looks like it could be.
answered
Rohan Wanchoo
0
Hi Rohan,
Thank you for this response
I'm using Excel Importer version 10.7.4. Which version do you recommend I use to be compatible with TcConnector?
answered
Nicolas Pinaud
0
Hello,
I solved my problem!
ExcelImporter uses version 2.23.1 of log4j-api. So I excluded all previous versions loaded by the TcConnector module.