Excel-import problem related to ExcelValueParser-class
1
After successful deployment I tried to import data from an excelsheet. Console reports "An unhandled error occurred in the MxRuntime". Stack-trace: java.lang.Error: Unresolved compilation problems: This static method cannot hide the instance method from ValueParser Cannot make a static reference to the non-static method getValueByType(IMetaPrimitive.PrimitiveType, Object) from the type ValueParser at excelimporter.reader.readers.replication.ExcelValueParser.getValueByType(ExcelValueParser.java:163) at excelimporter.reader.readers.replication.ExcelValueParser.getValue(ExcelValueParser.java:152) at excelimporter.reader.readers.ExcelRowProcessor.processValues(ExcelRowProcessor.java:48) at excelimporter.reader.readers.ExcelXLSXDataReader$SheetHandler.endElement(ExcelXLSXDataReader.java:306) at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source) at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.XMLParser.parse(Unknown Source) at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source) at excelimporter.reader.readers.ExcelXLSXDataReader.readData(ExcelXLSXDataReader.java:50) at excelimporter.reader.readers.ExcelReader.importData(ExcelReader.java:381) at excelimporter.reader.ExcelImporter.startImport(ExcelImporter.java:123) at excelimporter.actions.StartImportByTemplate.executeAction(StartImportByTemplate.java:53) at excelimporter.actions.StartImportByTemplate.executeAction(StartImportByTemplate.java:1) at com.mendix.systemwideinterfaces.core.UserAction.execute(SourceFile:57) at com.mendix.core.actionmanagement.CoreAction.call(SourceFile:457) at hA.b(SourceFile:193) at com.mendix.core.Core.execute(SourceFile:219) at lk.a(SourceFile:69) at mq.a(SourceFile:72) at mp.a(SourceFile:151) at mp.executeAction(SourceFile:98) at com.mendix.systemwideinterfaces.core.UserAction.execute(SourceFile:57) at com.mendix.core.actionmanagement.CoreAction.call(SourceFile:457) at hA.b(SourceFile:193) at com.mendix.core.Core.execute(SourceFile:219) at gl.execute(SourceFile:186) at ja.a(SourceFile:319) at com.mendix.externalinterface.connector.RequestDispatching$Worker.a(SourceFile:157) at com.mendix.externalinterface.connector.RequestDispatching$Worker$a.a(SourceFile:148) at com.mendix.externalinterface.connector.RequestDispatching$Worker$a.apply(SourceFile:147) at akka.actor.Actor$class.apply(Actor.scala:545) at com.mendix.externalinterface.connector.RequestDispatching$Worker.apply(SourceFile:143) at akka.actor.LocalActorRef.invoke(ActorRef.scala:910) at akka.dispatch.MessageInvocation.invoke(MessageHandling.scala:25) at akka.dispatch.ExecutableMailbox$class.processMailbox(ExecutorBasedEventDrivenDispatcher.scala:223) at akka.dispatch.ExecutorBasedEventDrivenDispatcher$$anon$4.processMailbox(ExecutorBasedEventDrivenDispatcher.scala:123) at akka.dispatch.ExecutableMailbox$class.run(ExecutorBasedEventDrivenDispatcher.scala:195) at akka.dispatch.ExecutorBasedEventDrivenDispatcher$$anon$4.run(ExecutorBasedEventDrivenDispatcher.scala:123) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:662) at akka.dispatch.MonitorableThread.run(ThreadPoolBuilder.scala:192) Opening eclipse: 2 errors in package "ExcelImporter.reader.readers.replication" class "ExcelValueParser". Solved manually the errors myself by: public static Object getValueByType(PrimitiveType type, Object value) throws ParseException { TURNING INTO public Object getValueByType(PrimitiveType type, Object value) throws ParseException { returnValue = ValueParser.getValueByType(type, value); TURNING INTO returnValue = getValueByType(type, value); return ExcelValueParser.getValueByType(type, objects[Integer.valueOf(column)]); TURNING INTO return getValueByType(type, objects[Integer.valueOf(column)]); Re-deployed and tried to import the excel-sheet again. Unfortunatey again "An unhandled error occurred in the MxRuntime" but with another stack-trace: java.lang.StackOverflowError at excelimporter.reader.readers.replication.ExcelValueParser.getValueByType(ExcelValueParser.java:164) at excelimporter.reader.readers.replication.ExcelValueParser.getValueByType(ExcelValueParser.java:189) Last line >1000 times. How can I solve this problem with the ExcelImporter.reader.readers.replication/ExcelValueParser class?
asked
Bas Vermeulen
1 answers
1
Solved by replacing existing module "Excel importer v3.0.1" from app-store.