DDL Error on startup in new Modeler version

3
I am upgrading an app from 6.10.12 to 7.14.1.  After resolving errors and java compile errors, I get the following error message when trying to start the app.  Any pointers about how to resolve this would be welcome.  What is puzzling to me is that this DDL command seems to be trying to insert a largely empty record into the attribute table in the database. Not sure what would cause that. An error occurred while executing action 'Execute DDL commands'. -------- com.mendix.m2ee.api.AdminException: Executing DDL commands failed. at com.mendix.basis.component.internal.LocalComponentImpl.executeDDLCommands(LocalComponentImpl.scala:117) Caused by: com.mendix.basis.connectionbus.ConnectionBusException: Error (SQL State: 23505, Error Code: 0) on executing: INSERT INTO "mendixsystem$attribute" ("id", "entity_id", "attribute_name", "column_name", "type", "length", "default_value", "is_auto_number") VALUES (?, ?, ?, ?, 4, 0, ?, FALSE) All changes are rolled back. at com.mendix.connectionbus.modelsynchronization.DdlCommandExecutor.execute(DdlCommandExecutor.java:77) Caused by: org.postgresql.util.PSQLException: ERROR: duplicate key value violates unique constraint "mendixsystem$attribute_pkey" Detail: Key (id)=(14018140-78df-4e36-9869-d0b53129d2c9) already exists. at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2477) at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2190) at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:300) at org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:428) at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:354) at org.postgresql.jdbc.PgPreparedStatement.executeWithFlags(PgPreparedStatement.java:169) at org.postgresql.jdbc.PgPreparedStatement.execute(PgPreparedStatement.java:158) at org.apache.commons.dbcp2.DelegatingPreparedStatement.execute(DelegatingPreparedStatement.java:198) at org.apache.commons.dbcp2.DelegatingPreparedStatement.execute(DelegatingPreparedStatement.java:198) at com.mendix.connectionbus.modelsynchronization.DdlCommandExecutor.execute(DdlCommandExecutor.java:97) at com.mendix.connectionbus.modelsynchronization.DdlCommandExecutor.executeDdlCommands(DdlCommandExecutor.java:129) at com.mendix.connectionbus.modelsynchronization.DdlCommandExecutor.execute(DdlCommandExecutor.java:41) at com.mendix.connectionbus.modelsynchronization.SynchronizationManager.synchronizeModel(SynchronizationManager.scala:170) at com.mendix.connectionbus.modelsynchronization.SynchronizationManager.executeImpl(SynchronizationManager.scala:161) at com.mendix.connectionbus.modelsynchronization.SynchronizationManager.execute(SynchronizationManager.scala:108) at com.mendix.connectionbus.ConnectionBusImpl.executeDDLCommands(ConnectionBusImpl.java:383) at com.mendix.basis.component.internal.LocalComponentImpl.executeDDLCommands(LocalComponentImpl.scala:109) at com.mendix.basis.impl.MxRuntimeImpl.executeDDLCommands(MxRuntimeImpl.java:958) at com.mendix.basis.action.admin.ExecuteDDLCommandsAction.call(ExecuteDDLCommandsAction.java:26) at com.mendix.basis.action.admin.RuntimeAdminAction.execute(RuntimeAdminAction.java:18) at com.mendix.m2ee.appcontainer.server.handler.HttpAdminHandler.handle(HttpAdminHandler.java:128) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132) at org.eclipse.jetty.server.Server.handle(Server.java:561) at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:334) at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:251) at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:279) at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:104) at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:124) at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:247) at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.produce(EatWhatYouKill.java:140) at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:131) at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:243) at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:679) at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:597) at java.lang.Thread.run(Thread.java:745) **EDIT** I filed a ticket for this with Mendix support.  Support found that the issue was a attribute in the IMAP/POP3 module.  On the Attachment entity in that module, there is a column called Size, which is duplicate with the System.FileDocument entity.  I tried renaming that column, but still had the error.  Mx Support suggested deleting that column and adding it again - which resolved my issue.  This was a viable option for me because I did not have any data in that entity....even if I did, I don't think size would be a critical piece of information.  Many thanks to Jaap Pulleman  for determining the cause of this issue.
asked
1 answers
2

Is this not a same issue as this one: https://forum.mendix.com/link/questions/89644

Look at the comment of Menno in that post:

Often you can fix the issue using the Uniqueness Constraint Migration toolkit. Ask Mendix support for it and they can send the MPK file to you, which helps you detecting and solving the uniqueness violation. https://docs.mendix.com/refguide/uniqueness-constraint-migration

We encountered similar issues a high concurrency application. Probably Mendix could not process the concurrent events correctly. 

Did you recently switch from uniqueness violation check by runtime to database?

 

Regards,

Ronald

answered