Error importing Excel file after upgrade to Mendix 9
1
Error: Caused by: org.xml.sax.SAXException: Unable to store Excel row #2 @Sheet #0 replication.ValueParser$ParseException: is not a valid number! Hi everyone, We've been upgrading one of our applications to Mendix 9 and encounter an error when importing an excel file. When we import the same excel-file in our Mendix 8 version of the application, this error won't occur. We've narrowed it down to one of the Integer-fields in the Excel which can be empty. Therefor it's not a valid number and causes this error. We've tried to set all columns that should be integer to numbers, but this didn't solve the problem. We've then also tried to set the constant ParseEmptyCells to true, but this also didn't solve the problem. Can anyone help us/give a hint on how to solve this issue? Thanks in advance. This is our stacktrace: com.mendix.core.CoreRuntimeException: com.mendix.systemwideinterfaces.MendixRuntimeException: com.mendix.core.CoreException: com.mendix.core.CoreException: Document could not be imported, because: Unable to store Excel row #2 @Sheet #0 at com.mendix.basis.actionmanagement.ActionManager.executeSync(ActionManager.scala:110) Caused by: com.mendix.systemwideinterfaces.MendixRuntimeException: com.mendix.core.CoreException: com.mendix.core.CoreException: Document could not be imported, because: Unable to store Excel row #2 @Sheet #0 at com.mendix.util.classloading.Runner$.withContextClassLoader(Runner.scala:23) Caused by: com.mendix.core.CoreException: com.mendix.core.CoreException: Document could not be imported, because: Unable to store Excel row #2 @Sheet #0 at excelimporter.reader.ExcelImporter.startImport(ExcelImporter.java:129) Caused by: com.mendix.core.CoreException: Document could not be imported, because: Unable to store Excel row #2 @Sheet #0 at excelimporter.reader.readers.ExcelReader.importData(ExcelReader.java:411) Caused by: org.xml.sax.SAXException: Unable to store Excel row #2 @Sheet #0 replication.ValueParser$ParseException: is not a valid number! at excelimporter.reader.readers.ExcelXLSXDataReader$SheetHandler.endElement(ExcelXLSXDataReader.java:128) at java.xml/com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.endElement(AbstractSAXParser.java:610) at java.xml/com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanEndElement(XMLDocumentFragmentScannerImpl.java:1718) at java.xml/com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2883) at java.xml/com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:605) at java.xml/com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:112) at java.xml/com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:534) at java.xml/com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:888) at java.xml/com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:824) at java.xml/com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:141) at java.xml/com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1216) at excelimporter.reader.readers.ExcelXLSXDataReader.readData(ExcelXLSXDataReader.java:43) at excelimporter.reader.readers.ExcelReader.importData(ExcelReader.java:384) 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: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:56) at com.mendix.basis.actionmanagement.ActionManager.$anonfun$executeSync$2(ActionManager.scala:106) at com.mendix.util.classloading.Runner$.withContextClassLoader(Runner.scala:20) at com.mendix.basis.actionmanagement.ActionManager.executeSync(ActionManager.scala:105) at com.mendix.basis.actionmanagement.UserActionCallBuilderImpl.execute(UserActionCallBuilderImpl.scala:57) 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: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:167) at scala.Option.flatMap(Option.scala:283) at com.mendix.modules.microflowengine.microflow.impl.MicroflowImpl.executeAfterBreakingIfNecessary(MicroflowImpl.scala:167) at com.mendix.modules.microflowengine.microflow.impl.MicroflowImpl.executeAction(MicroflowImpl.scala:114) 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:56) at com.mendix.basis.actionmanagement.ActionManager.$anonfun$executeSync$2(ActionManager.scala:106) at com.mendix.util.classloading.Runner$.withContextClassLoader(Runner.scala:20) at com.mendix.basis.actionmanagement.ActionManager.executeSync(ActionManager.scala:105) at com.mendix.basis.component.ExecutionCore.doExecuteSync(ExecutionCore.scala:147) at com.mendix.basis.component.ExecutionCore.doExecuteSync$(ExecutionCore.scala:146) at com.mendix.basis.component.InternalCore.doExecuteSync(InternalCore.scala:24) at com.mendix.basis.component.ExecutionCore.executeSync(ExecutionCore.scala:93) at com.mendix.basis.component.ExecutionCore.executeSync$(ExecutionCore.scala:90) at com.mendix.basis.component.InternalCore.executeSync(InternalCore.scala:24) at com.mendix.modules.microflowengine.MicroflowExecuter$.executeSync(MicroflowExecuter.scala:19) at com.mendix.modules.microflowengine.actions.SubMicroflowAction.execute(SubMicroflowAction.scala:37) 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:167) at scala.Option.flatMap(Option.scala:283) at com.mendix.modules.microflowengine.microflow.impl.MicroflowImpl.executeAfterBreakingIfNecessary(MicroflowImpl.scala:167) at com.mendix.modules.microflowengine.microflow.impl.MicroflowImpl.executeAction(MicroflowImpl.scala:114) 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:56) at com.mendix.basis.actionmanagement.CoreActionHandlerImpl.$anonfun$runMonitoredAction$1(CoreActionHandlerImpl.scala:59) at com.mendix.basis.actionmanagement.ActionMonitoring$.$anonfun$monitor$1(ActionMonitoring.scala:49) at com.mendix.util.classloading.Runner$.withContextClassLoader(Runner.scala:20) at com.mendix.basis.actionmanagement.ActionMonitoring$.monitor(ActionMonitoring.scala:49) 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:56) at com.mendix.basis.actionmanagement.ActionManager.$anonfun$executeAsync$3(ActionManager.scala:90) at scala.concurrent.Future$.$anonfun$apply$1(Future.scala:678) at scala.concurrent.impl.Promise$Transformation.run(Promise.scala:467) 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) Caused by: replication.ValueParser$ParseException: is not a valid number! at excelimporter.reader.readers.replication.ExcelValueParser.parseToNumber(ExcelValueParser.java:134) at excelimporter.reader.readers.replication.ExcelValueParser.getValue(ExcelValueParser.java:91) at excelimporter.reader.readers.replication.ExcelValueParser.getValueFromDataSet(ExcelValueParser.java:66) at excelimporter.reader.readers.ExcelRowProcessorImpl.processValues(ExcelRowProcessorImpl.java:59) at excelimporter.reader.readers.ExcelXLSXDataReader$SheetHandler.endElement(ExcelXLSXDataReader.java:125) ... 72 more
asked
Jasper Wijker
1 answers
3
Hi Jasper,
While importing try to import the data in string format, then convert the attribute value in to Integer