Removal or rename of attributes in external entity key for entity X.Y is not supported.

1
I imported a new version of a private module package containing some Data Hub entities. Now the app fails to start locally with the error: “Removal or rename of attributes in external entity key for entity 'X.Y' is not supported.”. Why is it even trying to migrate external attributes? Looks like a bug to me. The version is 8.18.7. com.mendix.m2ee.api.AdminException: An error occurred while initializing the Runtime: Removal or rename of attributes in external entity key for entity 'X.Y' is not supported. at com.mendix.basis.impl.MxRuntimeImplBase.start(MxRuntimeImplBase.java:348) Caused by: com.mendix.connectionbus.ConnectionBusRuntimeException: Removal or rename of attributes in external entity key for entity 'X.Y' is not supported. at com.mendix.connectionbus.modelsynchronization.analysis.RemotePrimaryKeyAnalyzer.collectRemotePrimaryKeyRemovals(RemotePrimaryKeyAnalyzer.scala:36) at com.mendix.connectionbus.modelsynchronization.analysis.DatabaseAnalyzer.collectDatabaseRemovals(DatabaseAnalyzer.java:142) at com.mendix.connectionbus.modelsynchronization.analysis.DatabaseAnalyzerBase.getModelRelatedDbChangeInfo(DatabaseAnalyzerBase.scala:115) at com.mendix.connectionbus.modelsynchronization.analysis.DatabaseAnalyzerBase.analyzeExistingDatabase(DatabaseAnalyzerBase.scala:96) at com.mendix.connectionbus.modelsynchronization.analysis.DatabaseAnalyzerBase.$anonfun$analyzeAndFillMigrationCommands$1(DatabaseAnalyzerBase.scala:47) at scala.Option.map(Option.scala:242) at com.mendix.connectionbus.modelsynchronization.analysis.DatabaseAnalyzerBase.analyzeAndFillMigrationCommands(DatabaseAnalyzerBase.scala:47) at com.mendix.connectionbus.modelsynchronization.ModelSynchronizationUpdater.analyzeAndFillMigrationCommands(ModelSynchronizationUpdater.java:153) at com.mendix.connectionbus.modelsynchronization.ModelSynchronizationUpdater.analyzeAndRender(ModelSynchronizationUpdater.java:103) at com.mendix.connectionbus.modelsynchronization.SynchronizationManager.analyzeMappingModel(SynchronizationManager.scala:243) at com.mendix.connectionbus.modelsynchronization.SynchronizationManager.analyzeModel(SynchronizationManager.scala:233) at com.mendix.connectionbus.modelsynchronization.SynchronizationManager.analyzeCurrentDatabase(SynchronizationManager.scala:149) at com.mendix.connectionbus.modelsynchronization.SynchronizationManager.$anonfun$stateMachine$3(SynchronizationManager.scala:82) at com.mendix.connectionbus.modelsynchronization.SimpleStateMachine$SimpleStateMachine.effect(SynchronizationManager.scala:56) at com.mendix.connectionbus.modelsynchronization.SynchronizationManager.analyzeCopying(SynchronizationManager.scala:190) at com.mendix.connectionbus.modelsynchronization.SynchronizationManager.$anonfun$stateMachine$2(SynchronizationManager.scala:81) at com.mendix.connectionbus.modelsynchronization.SimpleStateMachine$SimpleStateMachine.effect(SynchronizationManager.scala:56) at com.mendix.connectionbus.modelsynchronization.SynchronizationManager.analyzeSourceStructureForCopy(SynchronizationManager.scala:158) at com.mendix.connectionbus.modelsynchronization.SynchronizationManager.$anonfun$stateMachine$1(SynchronizationManager.scala:80) at com.mendix.connectionbus.modelsynchronization.SimpleStateMachine$SimpleStateMachine.effect(SynchronizationManager.scala:56) at com.mendix.connectionbus.modelsynchronization.SynchronizationManager.analyze(SynchronizationManager.scala:139) at com.mendix.connectionbus.ConnectionBusImpl.collectDatabaseSynchronizationInformation(ConnectionBusImpl.java:347) at com.mendix.basis.impl.MxRuntimeImplBase.initializeConnectionBusAnyway(MxRuntimeImplBase.java:434) at com.mendix.basis.impl.MxRuntimeImplBase.start(MxRuntimeImplBase.java:325) at com.mendix.m2ee.appcontainer.actions.StartAction.startRuntime(StartAction.java:48) at com.mendix.m2ee.appcontainer.actions.StartAction.execute(StartAction.java:30) at com.mendix.m2ee.appcontainer.server.handler.HttpAdminHandler.handle(HttpAdminHandler.java:129) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127) at org.eclipse.jetty.server.Server.handle(Server.java:516) at org.eclipse.jetty.server.HttpChannel.lambda$handle$1(HttpChannel.java:388) at org.eclipse.jetty.server.HttpChannel.dispatch(HttpChannel.java:633) at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:380) at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:279) at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:311) at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:105) at org.eclipse.jetty.io.ChannelEndPoint$1.run(ChannelEndPoint.java:104) at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:336) at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:313) at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:171) at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:129) at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:383) at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:882) at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:1036) at java.base/java.lang.Thread.run(Thread.java:834)  
asked
3 answers
2

I ran into the same issue when running a project locally, after the datatype of an attribute was changed in an external entity. Design time in the modeller it showed that the datatype was changed and Mendix asked me to update the information. Then when running the project still an error pops up:   An error occurred while initializing the Runtime: Change of data type or length for key attribute 'xyz’ is not supported in external entity key for entity 'abc’.

The fix is rather stupid in my opinion and Mendix needs to fix this: 

  1. delete the external entity from your data model. 
  2. re-add the external entity to your data model.
  3. change the name _2 to the original name and confirm you want to use the ‘new’ entity anywhere in your code where there is now an error
  4. re-add access rules on the external entity if applicable

 

 

answered
0

This is very helpful! Thank you!

answered
0

The solution(hack) that worked for me was to delete all the entities and constants that came with the datahub and re-added everything afresh again.

answered