Hi guys, I'm trying to import the excel file by Excel-Importer. But something wrong happened. I got the error message below. Could you please kindly help me how to solve this issue? Thank you so much. The following error occurred when importing document: ShiftList.xlsx -------- com.mendix.core.CoreRuntimeException: com.mendix.systemwideinterfaces.MendixRuntimeException: com.mendix.core.CoreException: com.mendix.core.CoreException: Document could not be imported, because: Failed to read the file input stream from file: 'C:\Users\Administrator\Mendix\MxDemo_ShiftManagement\deployment\data\tmp\Mendix_ExcelImporter_33214047251858096' at com.mendix.basis.actionmanagement.ActionManager.executeSync(ActionManager.scala:109) Caused by: com.mendix.systemwideinterfaces.MendixRuntimeException: com.mendix.core.CoreException: com.mendix.core.CoreException: Document could not be imported, because: Failed to read the file input stream from file: 'C:\Users\Administrator\Mendix\MxDemo_ShiftManagement\deployment\data\tmp\Mendix_ExcelImporter_33214047251858096' 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: Failed to read the file input stream from file: 'C:\Users\Administrator\Mendix\MxDemo_ShiftManagement\deployment\data\tmp\Mendix_ExcelImporter_33214047251858096' at excelimporter.reader.ExcelImporter.startImport(ExcelImporter.java:127) Caused by: com.mendix.core.CoreException: Document could not be imported, because: Failed to read the file input stream from file: 'C:\Users\Administrator\Mendix\MxDemo_ShiftManagement\deployment\data\tmp\Mendix_ExcelImporter_33214047251858096' at excelimporter.reader.readers.ExcelReader.importData(ExcelReader.java:384) Caused by: org.apache.poi.openxml4j.exceptions.InvalidOperationException: Failed to read the file input stream from file: 'C:\Users\Administrator\Mendix\MxDemo_ShiftManagement\deployment\data\tmp\Mendix_ExcelImporter_33214047251858096' at org.apache.poi.openxml4j.opc.ZipPackage.openZipEntrySourceStream(ZipPackage.java:234) at org.apache.poi.openxml4j.opc.ZipPackage.<init>(ZipPackage.java:197) at org.apache.poi.openxml4j.opc.OPCPackage.open(OPCPackage.java:285) at org.apache.poi.openxml4j.opc.OPCPackage.open(OPCPackage.java:192) at org.apache.poi.xssf.usermodel.XSSFWorkbook.<init>(XSSFWorkbook.java:336) at excelimporter.reader.readers.ExcelXLSXDataReader$1.<init>(ExcelXLSXDataReader.java:51) at excelimporter.reader.readers.ExcelXLSXDataReader.parseExcelFile(ExcelXLSXDataReader.java:51) at excelimporter.reader.readers.ExcelXLSXDataReader.readDataRows(ExcelXLSXDataReader.java:45) 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:1128) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) at java.base/java.lang.Thread.run(Thread.java:829) Caused by: java.io.IOException: Truncated ZIP file at org.apache.commons.compress.archivers.zip.ZipArchiveInputStream.skipRemainderOfArchive(ZipArchiveInputStream.java:1316) at org.apache.commons.compress.archivers.zip.ZipArchiveInputStream.getNextZipEntry(ZipArchiveInputStream.java:676) at org.apache.commons.compress.archivers.zip.ZipArchiveInputStream.getNextEntry(ZipArchiveInputStream.java:630) at org.apache.poi.openxml4j.util.ZipArchiveThresholdInputStream.getNextEntry(ZipArchiveThresholdInputStream.java:150) at org.apache.poi.openxml4j.util.ZipInputStreamZipEntrySource.<init>(ZipInputStreamZipEntrySource.java:94) at org.apache.poi.openxml4j.opc.ZipPackage.openZipEntrySourceStream(ZipPackage.java:224) at org.apache.poi.openxml4j.opc.ZipPackage.<init>(ZipPackage.java:197) at org.apache.poi.openxml4j.opc.OPCPackage.open(OPCPackage.java:285) at org.apache.poi.openxml4j.opc.OPCPackage.open(OPCPackage.java:192) at org.apache.poi.xssf.usermodel.XSSFWorkbook.<init>(XSSFWorkbook.java:336) at excelimporter.reader.readers.ExcelXLSXDataReader$1.<init>(ExcelXLSXDataReader.java:51) at excelimporter.reader.readers.ExcelXLSXDataReader.parseExcelFile(ExcelXLSXDataReader.java:51) at excelimporter.reader.readers.ExcelXLSXDataReader.readDataRows(ExcelXLSXDataReader.java:45) 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:1128) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) at java.base/java.lang.Thread.run(Thread.java:829)
asked
Liqiang Wang
2 answers
2
Hi Liqiang,
Open your excel file manually check it is opens correctly in Excel or not. Again save it as new.
Otherwise update your excel import module.
Thanks,
answered
Arun Mani G
1
Liqiang,
Some things that may cause this:
Make sure the file has been uploaded to the database and committed. One way to check this is to see if you can download it from a page.
Ensure that the file has contents (As Arun said).
Check permissions on the file entity you are trying to use. Make sure the logged in user has permission to read and write that entity.
Try uploading a different file to see if it is an issue with the specific file you are using.