Problem when deploying app

0
Hello, I tested my app a lot on an acceptance server before trying to deploy on production and I had 0 issue.   This afternoon, I tried to deploy on production, but I encountered this message.   15:29:37appERRORExecuting execute_ddl_commands did not succeed: result: 1, message: class com.mendix.m2ee.api.AdminException occurred while executing an admin action request. See logging output for details., caused by: class com.mendix.basis.connectionbus.ConnectionBusException occurred while executing an admin action request. See logging output for details. 15:29:37appERRORStarting application failed: Application start failed 15:29:37appINFOWaiting for the application to shutdown... 15:29:37appERRORM2EE: An error occurred while executing action 'Execute DDL commands'. 15:29:37appINFOcom.mendix.m2ee.api.AdminException: Executing DDL commands failed. 15:29:37appINFOat com.mendix.basis.component.internal.LocalComponentImpl.executeDDLCommands(LocalComponentImpl.scala:113) 15:29:37appINFOCaused by: com.mendix.basis.connectionbus.ConnectionBusException: Error (SQL State: 23505, Error Code: 0) on executing: 15:29:37appINFOAll changes are rolled back. 15:29:37appINFOat com.mendix.connectionbus.modelsynchronization.DdlCommandExecutor.handleCommandExecutionException(DdlCommandExecutor.scala:167) 15:29:37appINFOCaused by: org.postgresql.util.PSQLException: ERROR: could not create unique index "uniq_xtools$user_email" 15:29:37appINFODetail: Key (email)=(guillaume.otter@dv-group.com) is duplicated. 15:29:37appINFOat org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2725) 15:29:37appINFOat org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2412) 15:29:37appINFOat org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:371) 15:29:37appINFOat org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:502) 15:29:37appINFOat org.postgresql.jdbc.PgStatement.execute(PgStatement.java:419) 15:29:37appINFOat org.postgresql.jdbc.PgStatement.executeWithFlags(PgStatement.java:341) 15:29:37appINFOat org.postgresql.jdbc.PgStatement.executeCachedSql(PgStatement.java:326) 15:29:37appINFOat org.postgresql.jdbc.PgStatement.executeWithFlags(PgStatement.java:302) 15:29:37appINFOat org.postgresql.jdbc.PgStatement.execute(PgStatement.java:297) 15:29:37appINFOat org.apache.commons.dbcp2.DelegatingStatement.execute(DelegatingStatement.java:182) 15:29:37appINFOat org.apache.commons.dbcp2.DelegatingStatement.execute(DelegatingStatement.java:182) 15:29:37appINFOat com.mendix.connectionbus.modelsynchronization.DdlCommandExecutor.$anonfun$executeCommandWithConnection$1(DdlCommandExecutor.scala:117) 15:29:37appINFOat com.mendix.connectionbus.modelsynchronization.DdlCommandExecutor.$anonfun$executeCommandWithConnection$1$adapted(DdlCommandExecutor.scala:116) 15:29:37appINFOat scala.util.Using$.resource(Using.scala:262) 15:29:37appINFOat com.mendix.connectionbus.modelsynchronization.DdlCommandExecutor.executeCommandWithConnection(DdlCommandExecutor.scala:116) 15:29:37appINFOat com.mendix.connectionbus.modelsynchronization.DdlCommandExecutor.executeCommandAtomically(DdlCommandExecutor.scala:105) 15:29:37appINFOat com.mendix.connectionbus.modelsynchronization.DdlCommandExecutor.$anonfun$execute$3(DdlCommandExecutor.scala:47) 15:29:37appINFOat com.mendix.connectionbus.modelsynchronization.DdlCommandExecutor.getBlockingFunctionRunTimeMs(DdlCommandExecutor.scala:232) 15:29:37appINFOat com.mendix.connectionbus.modelsynchronization.DdlCommandExecutor.$anonfun$execute$2(DdlCommandExecutor.scala:37) 15:29:37appINFOat scala.collection.IterableOnceOps.foreach(IterableOnce.scala:576) 15:29:37appINFOat scala.collection.IterableOnceOps.foreach$(IterableOnce.scala:574) 15:29:37appINFOat scala.collection.AbstractIterable.foreach(Iterable.scala:933) 15:29:37appINFOat scala.collection.IterableOps$WithFilter.foreach(Iterable.scala:903) 15:29:37appINFOat com.mendix.connectionbus.modelsynchronization.DdlCommandExecutor.execute(DdlCommandExecutor.scala:30) 15:29:37appINFOat com.mendix.connectionbus.modelsynchronization.SynchronizationManager.synchronizeModel(SynchronizationManager.scala:205) 15:29:37appINFOat com.mendix.connectionbus.modelsynchronization.SynchronizationManager.execute(SynchronizationManager.scala:135) 15:29:37appINFOat com.mendix.connectionbus.ConnectionBusImpl.execute$1(ConnectionBusImpl.scala:291) 15:29:37appINFOat com.mendix.connectionbus.ConnectionBusImpl.executeDDLCommands(ConnectionBusImpl.scala:312) 15:29:37appINFOat com.mendix.basis.component.internal.LocalComponentImpl.executeDDLCommands(LocalComponentImpl.scala:105) 15:29:37appINFOat com.mendix.basis.impl.MxRuntimeImpl.executeDDLCommands(MxRuntimeImpl.scala:198) 15:29:37appINFOat com.mendix.basis.action.admin.ExecuteDDLCommandsAction.execute(ExecuteDDLCommandsAction.scala:20) 15:29:37appINFOat com.mendix.m2ee.appcontainer.server.handler.HttpAdminHandlerBase.service(HttpAdminHandlerBase.java:130) 15:29:37appINFOat javax.servlet.http.HttpServlet.service(HttpServlet.java:590) 15:29:37appINFOat org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:764) 15:29:37appINFOat org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:529) 15:29:37appINFOat org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:221) 15:29:37appINFOat org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1384) 15:29:37appINFOat org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:176) 15:29:37appINFOat org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:484) 15:29:37appINFOat org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:174) 15:29:37appINFOat org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1306) 15:29:37appINFOat org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:129) 15:29:37appINFOat org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:122) 15:29:37appINFOat org.eclipse.jetty.server.Server.handle(Server.java:563) 15:29:37appINFOat org.eclipse.jetty.server.HttpChannel$RequestDispatchable.dispatch(HttpChannel.java:1598) 15:29:37appINFOat org.eclipse.jetty.server.HttpChannel.dispatch(HttpChannel.java:753) 15:29:37appINFOat org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:501) 15:29:37appINFOat org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:287) 15:29:37appINFOat org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:314) 15:29:37appINFOat org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:100) 15:29:37appINFOat org.eclipse.jetty.io.SelectableChannelEndPoint$1.run(SelectableChannelEndPoint.java:53) 15:29:37appINFOat org.eclipse.jetty.util.thread.strategy.AdaptiveExecutionStrategy.runTask(AdaptiveExecutionStrategy.java:421) 15:29:37appINFOat org.eclipse.jetty.util.thread.strategy.AdaptiveExecutionStrategy.consumeTask(AdaptiveExecutionStrategy.java:390) 15:29:37appINFOat org.eclipse.jetty.util.thread.strategy.AdaptiveExecutionStrategy.tryProduce(AdaptiveExecutionStrategy.java:277) 15:29:37appINFOat org.eclipse.jetty.util.thread.strategy.AdaptiveExecutionStrategy.produce(AdaptiveExecutionStrategy.java:193) 15:29:37appINFOat org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:969) 15:29:37appINFOat org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.doRunJob(QueuedThreadPool.java:1194) 15:29:37appINFOat org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:1149) 15:29:37appINFOat java.base/java.lang.Thread.run(Unknown Source) 15:29:37appINFOM2EE: Runtime shutdown requested.   I don't know what does that mean nor what to do,   Any help is appreciated,   Thanks
asked
1 answers
1

Hi Simon,

 

it seems like the domain model was changed by adding a (unique) index. However, when starting the application it checks if the existing data is already unique (and if not, it will fail to create the index).

 

This does not happen on acceptance/test as there the data was unique.

 

To resolve, you first need to remove any duplicate values from the target entity/attribute combination (error message mentions the index uniq_xtools$user_email and attribute email), only then you can deploy your new code with the unique index

answered