Excel Import Failed due to Invalid Enumeration Value

0
I copied the enumeration values from excel into my domain model, so there was no room for error because it would be a 1:1 match. The error code is below.   The following error occurred when importing document: Mendix Exclusivity Verification Data Final.xlsx -------- com.mendix.core.CoreRuntimeException: com.mendix.systemwideinterfaces.MendixRuntimeException: com.mendix.core.CoreException: com.mendix.core.CoreException: Document could not be imported, because: com.mendix.replication.MendixReplicationException: com.mendix.basis.objectmanagement.member.InvalidEnumerationValueException: Invalid enumeration value | VERSION: Mx5_20161013    at com.mendix.basis.actionmanagement.ActionManager.executeSync(ActionManager.scala:108) Caused by: com.mendix.systemwideinterfaces.MendixRuntimeException: com.mendix.core.CoreException: com.mendix.core.CoreException: Document could not be imported, because: com.mendix.replication.MendixReplicationException: com.mendix.basis.objectmanagement.member.InvalidEnumerationValueException: Invalid enumeration value | VERSION: Mx5_20161013    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: com.mendix.replication.MendixReplicationException: com.mendix.basis.objectmanagement.member.InvalidEnumerationValueException: Invalid enumeration value | VERSION: Mx5_20161013    at excelimporter.reader.ExcelImporter.startImport(ExcelImporter.java:127) Caused by: com.mendix.core.CoreException: Document could not be imported, because: com.mendix.replication.MendixReplicationException: com.mendix.basis.objectmanagement.member.InvalidEnumerationValueException: Invalid enumeration value | VERSION: Mx5_20161013    at excelimporter.reader.readers.ExcelReader.importData(ExcelReader.java:384) Caused by: excelimporter.reader.readers.ExcelRuntimeException: com.mendix.replication.MendixReplicationException: com.mendix.basis.objectmanagement.member.InvalidEnumerationValueException: Invalid enumeration value | VERSION: Mx5_20161013    at excelimporter.reader.readers.ExcelXLSXDataReader.handleRowProcessorCompletion(ExcelXLSXDataReader.java:94)    at excelimporter.reader.readers.ExcelXLSXDataReader.parseExcelFile(ExcelXLSXDataReader.java:84)    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:104)    at com.mendix.util.classloading.Runner$.withContextClassLoader(Runner.scala:20)    at com.mendix.basis.actionmanagement.ActionManager.executeSync(ActionManager.scala:103)    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.executeAfterBreakingIfNecessary(MicroflowImpl.scala:169)    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:87)    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:829) Caused by: com.mendix.replication.MendixReplicationException: com.mendix.basis.objectmanagement.member.InvalidEnumerationValueException: Invalid enumeration value | VERSION: Mx5_20161013    at com.mendix.replication.MendixReplicationException.addVersion(MendixReplicationException.java:51) Caused by: com.mendix.replication.MendixReplicationException: com.mendix.basis.objectmanagement.member.InvalidEnumerationValueException: Invalid enumeration value    at com.mendix.replication.MetaInfoProcessor.startProcessing(MetaInfoProcessor.java:69) Caused by: com.mendix.basis.objectmanagement.member.InvalidEnumerationValueException: Invalid enumeration value    at com.mendix.basis.objectmanagement.member.MendixEnumImpl.checkStrictness(MendixEnumImpl.scala:39)    at com.mendix.basis.objectmanagement.member.MendixEnumImpl.setValue(MendixEnumImpl.scala:29)    at com.mendix.basis.objectmanagement.member.MendixEnumImpl.setValue(MendixEnumImpl.scala:11)    at com.mendix.basis.objectmanagement.MendixObjectMember.setValue(MendixObjectMember.java:31)    at com.mendix.basis.objectmanagement.MendixObjectMemberImpl.parseValueFromString(MendixObjectMemberImpl.java:282)    at com.mendix.basis.objectmanagement.MendixObjectImpl.setValue(MendixObjectImpl.java:245)    at com.mendix.basis.objectmanagement.MendixObjectImpl.setValue(MendixObjectImpl.java:237)    at com.mendix.replication.MetaInfoProcessor.updateMemberAndSetState(MetaInfoProcessor.java:117)    at com.mendix.replication.MetaInfoProcessor.changeMembersForBatch(MetaInfoProcessor.java:469)    at com.mendix.replication.MetaInfoProcessor.storeChangedObjects(MetaInfoProcessor.java:260)    at com.mendix.replication.MetaInfoProcessor.startProcessing(MetaInfoProcessor.java:57)    at com.mendix.replication.MetaInfo.startProcessingObjects(MetaInfo.java:443)    at com.mendix.replication.MetaInfo.finish(MetaInfo.java:202)    at excelimporter.reader.readers.ExcelRowProcessorImpl.finish(ExcelRowProcessorImpl.java:107)    at excelimporter.reader.readers.ExcelXLSXDataReader.handleRowProcessorCompletion(ExcelXLSXDataReader.java:91)    at excelimporter.reader.readers.ExcelXLSXDataReader.parseExcelFile(ExcelXLSXDataReader.java:84)    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:104)    at com.mendix.util.classloading.Runner$.withContextClassLoader(Runner.scala:20)    at com.mendix.basis.actionmanagement.ActionManager.executeSync(ActionManager.scala:103)    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.executeAfterBreakingIfNecessary(MicroflowImpl.scala:169)    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:87)    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:829)
asked
1 answers
0

Thomas,

I have 3 suggestions:

  • first, check the enumerations inside of Studio Pro.  I *think* that Excel Importer looks for the internal name of each enumeration value, not the caption.  That could be causing this error message.
  • you could create a microflow to parse the incoming values from the spreadsheet and return the correct enumeration value.  This microflow would then be called from the Column details for the enumeration column in your import template
  • if those ideas don't work, create a temporary table to import the spreadsheet into using a string attribute for the enumeration column in the spreadsheet.  Then you can create a microflow to process each row and place it into the permanent entity in your app.  This might be the preferred approach if you have multiple columns that need this kind of manipulation.

Hope that helps,

Mike

answered