Duplicate column value violates its unique constraint

0
Whatever I do I cannot replicate this issue – but it comes up in the logs regularly – please can anyone advise on what I should be looking for?   2021-12-07T13:22:51.438397 [APP/PROC/WEB/0]   ERROR - Connector: An error has occurred while handling the request. [User 'Firstname.Surname@mencap.org.uk' with session id 'f4bd5d9a-XXXX-XXXX-XXXX-XXXXXXXX35ec' and roles 'SupportWorker'] 2021-12-07T13:22:51.438421 [APP/PROC/WEB/0]       at DailySupportRecord.OC_IsTeethCareTicked (Change : 'Change 'PersonalCare' (Validation)') 2021-12-07T13:22:51.438557 [APP/PROC/WEB/0]       at com.mendix.modules.microflowengine.MicroflowUtil.processException(MicroflowUtil.java:83) 2021-12-07T13:22:51.438563 [APP/PROC/WEB/0]   Caused by: com.mendix.core.CoreRuntimeException: Failed to commit 2021-12-07T13:22:51.438589 [APP/PROC/WEB/0]   Caused by: com.mendix.core.CoreRuntimeException: com.mendix.systemwideinterfaces.MendixRuntimeException: com.mendix.core.CoreException: com.mendix.core.CoreRuntimeException: com.mendix.systemwideinterfaces.MendixRuntimeException: com.mendix.systemwideinterfaces.connectionbus.data.UniqueConstraintViolationRuntimeException: Duplicate column value violates its unique constraint: ERROR: duplicate key value violates unique constraint "dailysupportrecord$personalcare_pkey" 2021-12-07T13:22:51.438595 [APP/PROC/WEB/0]     Detail: Key (id)=(10977524092907448) already exists. (SQL State: 23505, Error Code: 0) 2021-12-07T13:22:51.438666 [APP/PROC/WEB/0]       at com.mendix.basis.actionmanagement.ActionManager.executeSync(ActionManager.scala:84) 2021-12-07T13:22:51.438752 [APP/PROC/WEB/0]   Caused by: com.mendix.systemwideinterfaces.MendixRuntimeException: com.mendix.core.CoreException: com.mendix.core.CoreRuntimeException: com.mendix.systemwideinterfaces.MendixRuntimeException: com.mendix.systemwideinterfaces.connectionbus.data.UniqueConstraintViolationRuntimeException: Duplicate column value violates its unique constraint: ERROR: duplicate key value violates unique constraint "dailysupportrecord$personalcare_pkey" 2021-12-07T13:22:51.438809 [APP/PROC/WEB/0]       at com.mendix.util.classloading.Runner.withContextClassLoader(Runner.java:23) 2021-12-07T13:22:51.438862 [APP/PROC/WEB/0]   Caused by: com.mendix.core.CoreException: com.mendix.core.CoreRuntimeException: com.mendix.systemwideinterfaces.MendixRuntimeException: com.mendix.systemwideinterfaces.connectionbus.data.UniqueConstraintViolationRuntimeException: Duplicate column value violates its unique constraint: ERROR: duplicate key value violates unique constraint "dailysupportrecord$personalcare_pkey" 2021-12-07T13:22:51.438881 [APP/PROC/WEB/0]     Detail: Key (id)=(10977524092907448) already exists. (SQL State: 23505, Error Code: 0) 2021-12-07T13:22:51.438940 [APP/PROC/WEB/0]       at com.mendix.basis.actionmanagement.SyncEventExtendedAction.executeAction(SyncEventExtendedAction.scala:32) 2021-12-07T13:22:51.439041 [APP/PROC/WEB/0]   Caused by: com.mendix.core.CoreRuntimeException: com.mendix.systemwideinterfaces.MendixRuntimeException: com.mendix.systemwideinterfaces.connectionbus.data.UniqueConstraintViolationRuntimeException: Duplicate column value violates its unique constraint: ERROR: duplicate key value violates unique constraint "dailysupportrecord$personalcare_pkey" 2021-12-07T13:22:51.439080 [APP/PROC/WEB/0]       at com.mendix.basis.actionmanagement.ActionManager.executeSync(ActionManager.scala:84) 2021-12-07T13:22:51.439087 [APP/PROC/WEB/0]   Caused by: com.mendix.systemwideinterfaces.MendixRuntimeException: com.mendix.systemwideinterfaces.connectionbus.data.UniqueConstraintViolationRuntimeException: Duplicate column value violates its unique constraint: ERROR: duplicate key value violates unique constraint "dailysupportrecord$personalcare_pkey" 2021-12-07T13:22:51.439231 [APP/PROC/WEB/0]       at com.mendix.util.classloading.Runner.withContextClassLoader(Runner.java:23) 2021-12-07T13:22:51.439332 [APP/PROC/WEB/0]     Detail: Key (id)=(10977524092907448) already exists. (SQL State: 23505, Error Code: 0) 2021-12-07T13:22:51.439401 [APP/PROC/WEB/0]       at com.mendix.basis.action.user.CommitAction$$anonfun$commitPersistableObjects$4.applyOrElse(CommitAction.scala:109) 2021-12-07T13:22:51.439409 [APP/PROC/WEB/0]       at com.mendix.basis.action.user.CommitAction$$anonfun$commitPersistableObjects$4.applyOrElse(CommitAction.scala:107) 2021-12-07T13:22:51.439417 [APP/PROC/WEB/0]       at scala.util.Failure.recoverWith(Try.scala:240) 2021-12-07T13:22:51.439420 [APP/PROC/WEB/0]       at com.mendix.basis.action.user.CommitAction.commitPersistableObjects(CommitAction.scala:107) 2021-12-07T13:22:51.439475 [APP/PROC/WEB/0]       at com.mendix.basis.action.user.CommitAction.executeAction(CommitAction.scala:31) 2021-12-07T13:22:51.439511 [APP/PROC/WEB/0]       at com.mendix.systemwideinterfaces.core.UserAction.execute(UserAction.java:46) 2021-12-07T13:22:51.439519 [APP/PROC/WEB/0]       at com.mendix.basis.actionmanagement.CoreActionHandlerImpl.doCall(CoreActionHandlerImpl.scala:71) 2021-12-07T13:22:51.439527 [APP/PROC/WEB/0]       at com.mendix.basis.actionmanagement.CoreActionHandlerImpl.call(CoreActionHandlerImpl.scala:48) 2021-12-07T13:22:51.439595 [APP/PROC/WEB/0]       at com.mendix.core.actionmanagement.internal.InternalCoreAction.call(InternalCoreAction.scala:25) 2021-12-07T13:22:51.439709 [APP/PROC/WEB/0]       at com.mendix.basis.actionmanagement.CoreActionHandlerImpl.doCall(CoreActionHandlerImpl.scala:71) 2021-12-07T13:22:51.439719 [APP/PROC/WEB/0]       at com.mendix.basis.actionmanagement.CoreActionHandlerImpl.call(CoreActionHandlerImpl.scala:48) 2021-12-07T13:22:51.439753 [APP/PROC/WEB/0]       at com.mendix.core.actionmanagement.internal.InternalCoreAction.call(InternalCoreAction.scala:25) 2021-12-07T13:22:51.439764 [APP/PROC/WEB/0]       at com.mendix.basis.actionmanagement.ActionManager.$anonfun$executeSync$2(ActionManager.scala:81) 2021-12-07T13:22:51.439794 [APP/PROC/WEB/0]       at com.mendix.util.classloading.Runner.withContextClassLoader(Runner.java:19) 2021-12-07T13:22:51.439949 [APP/PROC/WEB/0]       at com.mendix.basis.actionmanagement.ActionManager.executeSync(ActionManager.scala:79) 2021-12-07T13:22:51.440029 [APP/PROC/WEB/0]       at com.mendix.basis.actionmanagement.ActionManager.$anonfun$executeInTransactionSync$1(ActionManager.scala:91) 2021-12-07T13:22:51.440041 [APP/PROC/WEB/0]       at scala.util.Try$.apply(Try.scala:210) 2021-12-07T13:22:51.440555 [APP/PROC/WEB/0]       at com.mendix.basis.actionmanagement.ActionManager.executeInTransactionSync(ActionManager.scala:91) 2021-12-07T13:22:51.440568 [APP/PROC/WEB/0]       at com.mendix.basis.component.TransactionCore.$anonfun$storeObjectsAndAutoCommittedObjects$1(TransactionCore.scala:190) 2021-12-07T13:22:51.440578 [APP/PROC/WEB/0]       at scala.collection.immutable.List.map(List.scala:246) 2021-12-07T13:22:51.440585 [APP/PROC/WEB/0]       at scala.collection.immutable.List.map(List.scala:79) 2021-12-07T13:22:51.440627 [APP/PROC/WEB/0]       at com.mendix.basis.component.TransactionCore.storeObjectsAndAutoCommittedObjects(TransactionCore.scala:188) 2021-12-07T13:22:51.440637 [APP/PROC/WEB/0]       at com.mendix.basis.component.TransactionCore.commit(TransactionCore.scala:126) 2021-12-07T13:22:51.440685 [APP/PROC/WEB/0]       at com.mendix.basis.component.TransactionCore.commit$(TransactionCore.scala:109) 2021-12-07T13:22:51.440774 [APP/PROC/WEB/0]       at com.mendix.basis.component.TransactionCore.commitWithEvents(TransactionCore.scala:69) 2021-12-07T13:22:51.440784 [APP/PROC/WEB/0]       at com.mendix.basis.component.TransactionCore.commit(TransactionCore.scala:28) 2021-12-07T13:22:51.440787 [APP/PROC/WEB/0]       at com.mendix.basis.component.TransactionCore.commit$(TransactionCore.scala:27) 2021-12-07T13:22:51.440790 [APP/PROC/WEB/0]       at com.mendix.basis.component.InternalCore.commit(InternalCore.scala:21) 2021-12-07T13:22:51.440799 [APP/PROC/WEB/0]       at com.mendix.basis.component.TransactionCore.commit(TransactionCore.scala:23) 2021-12-07T13:22:51.440918 [APP/PROC/WEB/0]       at com.mendix.basis.component.InternalCore.commit(InternalCore.scala:21) 2021-12-07T13:22:51.440924 [APP/PROC/WEB/0]       at com.mendix.modules.microflowengine.actions.mxobject.ChangeItemsExecutor.executeChanges(ChangeItemsExecutor.scala:34) 2021-12-07T13:22:51.440929 [APP/PROC/WEB/0]       at com.mendix.modules.microflowengine.actions.mxobject.ChangeItemsExecutor.executeChanges$(ChangeItemsExecutor.scala:20) 2021-12-07T13:22:51.440961 [APP/PROC/WEB/0]       at com.mendix.modules.microflowengine.actions.mxobject.ChangeAction.executeChanges(ChangeAction.scala:12) 2021-12-07T13:22:51.440964 [APP/PROC/WEB/0]       at com.mendix.modules.microflowengine.actions.mxobject.ChangeAction.execute(ChangeAction.scala:42) 2021-12-07T13:22:51.441011 [APP/PROC/WEB/0]       at com.mendix.modules.microflowengine.actions.mxobject.ChangeAction.execute(ChangeAction.scala:12) 2021-12-07T13:22:51.441019 [APP/PROC/WEB/0]       at com.mendix.modules.microflowengine.microflow.impl.MicroflowObject.$anonfun$execute$1(MicroflowObject.scala:32) 2021-12-07T13:22:51.441052 [APP/PROC/WEB/0]       at scala.Option.flatMap(Option.scala:283) 2021-12-07T13:22:51.441083 [APP/PROC/WEB/0]       at com.mendix.modules.microflowengine.microflow.impl.MicroflowObject.execute(MicroflowObject.scala:29) 2021-12-07T13:22:51.441169 [APP/PROC/WEB/0]       at scala.Option.flatMap(Option.scala:283) 2021-12-07T13:22:51.441182 [APP/PROC/WEB/0]       at com.mendix.modules.microflowengine.microflow.impl.MicroflowImpl.executeAfterBreakingIfNecessary(MicroflowImpl.scala:167) 2021-12-07T13:22:51.441313 [APP/PROC/WEB/0]       at com.mendix.modules.microflowengine.microflow.impl.MicroflowImpl.executeAction(MicroflowImpl.scala:114) 2021-12-07T13:22:51.441323 [APP/PROC/WEB/0]       at com.mendix.systemwideinterfaces.core.UserAction.execute(UserAction.java:46) 2021-12-07T13:22:51.441328 [APP/PROC/WEB/0]       at com.mendix.basis.actionmanagement.CoreActionHandlerImpl.doCall(CoreActionHandlerImpl.scala:71) 2021-12-07T13:22:51.441332 [APP/PROC/WEB/0]       at com.mendix.basis.actionmanagement.CoreActionHandlerImpl.call(CoreActionHandlerImpl.scala:48) 2021-12-07T13:22:51.441335 [APP/PROC/WEB/0]       at com.mendix.core.actionmanagement.internal.InternalCoreAction.call(InternalCoreAction.scala:25) 2021-12-07T13:22:51.441337 [APP/PROC/WEB/0]       at com.mendix.basis.actionmanagement.ActionManager.$anonfun$executeSync$2(ActionManager.scala:80) 2021-12-07T13:22:51.441346 [APP/PROC/WEB/0]       at com.mendix.util.classloading.Runner.withContextClassLoader(Runner.java:19) 2021-12-07T13:22:51.441406 [APP/PROC/WEB/0]       at com.mendix.basis.actionmanagement.ActionManager.executeSync(ActionManager.scala:79) 2021-12-07T13:22:51.441514 [APP/PROC/WEB/0]       at com.mendix.basis.actionmanagement.MicroflowCallBuilderImpl.execute(MicroflowCallBuilderImpl.scala:38) 2021-12-07T13:22:51.441521 [APP/PROC/WEB/0]       at com.mendix.webui.actions.client.ExecuteMicroflowAction.runMicroflow(ExecuteMicroflowAction.scala:76) 2021-12-07T13:22:51.441523 [APP/PROC/WEB/0]       at com.mendix.webui.actions.client.ExecuteMicroflowAction.$anonfun$apply$3(ExecuteMicroflowAction.scala:42) 2021-12-07T13:22:51.441526 [APP/PROC/WEB/0]       at com.mendix.webui.actions.client.RegularClientAction$Helpers$.$anonfun$liftEither$1(RegularClientAction.scala:29) 2021-12-07T13:22:51.441529 [APP/PROC/WEB/0]       at com.mendix.webui.actions.client.RegularClientAction$Helpers$StateHandler.$anonfun$apply$4(RegularClientAction.scala:55) 2021-12-07T13:22:51.441531 [APP/PROC/WEB/0]       at com.mendix.webui.requesthandling.helpers.StateHandling.withState(StateHandling.scala:42) 2021-12-07T13:22:51.441585 [APP/PROC/WEB/0]       at com.mendix.webui.actions.client.RegularClientAction$Helpers$StateHandler.withState(RegularClientAction.scala:45) 2021-12-07T13:22:51.441623 [APP/PROC/WEB/0]       at com.mendix.webui.actions.client.RegularClientAction$Helpers$StateHandler.apply(RegularClientAction.scala:45) 2021-12-07T13:22:51.441627 [APP/PROC/WEB/0]       at com.mendix.webui.actions.client.ExecuteMicroflowAction.apply(ExecuteMicroflowAction.scala:43) 2021-12-07T13:22:51.441726 [APP/PROC/WEB/0]       at com.mendix.webui.actions.client.RegularClientAction.$anonfun$execute$3(RegularClientAction.scala:109) 2021-12-07T13:22:51.441731 [APP/PROC/WEB/0]       at scala.util.Try$.apply(Try.scala:210) 2021-12-07T13:22:51.441740 [APP/PROC/WEB/0]       at com.mendix.webui.actions.client.RegularClientAction.$anonfun$execute$2(RegularClientAction.scala:109) 2021-12-07T13:22:51.441851 [APP/PROC/WEB/0]       at com.mendix.webui.actions.client.RegularClientAction.$anonfun$execute$2$adapted(RegularClientAction.scala:107) 2021-12-07T13:22:51.441864 [APP/PROC/WEB/0]       at com.mendix.webui.requesthandling.helpers.ContextHandling.$anonfun$inContext$5(ContextHandling.scala:51) 2021-12-07T13:22:51.441867 [APP/PROC/WEB/0]       at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.scala:18) 2021-12-07T13:22:51.441870 [APP/PROC/WEB/0]       at com.mendix.basis.actionmanagement.ActionMonitoring$.$anonfun$monitor$1(ActionMonitoring.scala:49) 2021-12-07T13:22:51.441947 [APP/PROC/WEB/0]       at com.mendix.util.classloading.Runner.withContextClassLoader(Runner.java:19) 2021-12-07T13:22:51.441952 [APP/PROC/WEB/0]       at com.mendix.basis.actionmanagement.ActionMonitoring$.monitor(ActionMonitoring.scala:49) 2021-12-07T13:22:51.441955 [APP/PROC/WEB/0]       at com.mendix.webui.requesthandling.helpers.ContextHandling.inContext(ContextHandling.scala:51) 2021-12-07T13:22:51.441979 [APP/PROC/WEB/0]       at com.mendix.webui.requesthandling.helpers.ContextHandling.inContext$(ContextHandling.scala:26) 2021-12-07T13:22:51.441983 [APP/PROC/WEB/0]       at com.mendix.webui.actions.client.RegularClientAction.inContext(RegularClientAction.scala:86) 2021-12-07T13:22:51.442020 [APP/PROC/WEB/0]       at com.mendix.webui.requesthandling.helpers.ContextHandling.inContext(ContextHandling.scala:23) 2021-12-07T13:22:51.442025 [APP/PROC/WEB/0]       at com.mendix.webui.requesthandling.helpers.ContextHandling.inContext$(ContextHandling.scala:18) 2021-12-07T13:22:51.442066 [APP/PROC/WEB/0]       at com.mendix.webui.actions.client.RegularClientAction.inContext(RegularClientAction.scala:86) 2021-12-07T13:22:51.442120 [APP/PROC/WEB/0]       at com.mendix.webui.actions.client.RegularClientAction.$anonfun$execute$1(RegularClientAction.scala:107) 2021-12-07T13:22:51.442199 [APP/PROC/WEB/0]       at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.scala:18) 2021-12-07T13:22:51.442202 [APP/PROC/WEB/0]       at com.mendix.webui.requesthandling.helpers.ProfileHandling.profileRequest(ProfileHandling.scala:14) 2021-12-07T13:22:51.442208 [APP/PROC/WEB/0]       at com.mendix.webui.requesthandling.helpers.ProfileHandling.profileRequest$(ProfileHandling.scala:10) 2021-12-07T13:22:51.442306 [APP/PROC/WEB/0]       at com.mendix.webui.actions.client.RegularClientAction.profileRequest(RegularClientAction.scala:86) 2021-12-07T13:22:51.442311 [APP/PROC/WEB/0]       at com.mendix.webui.actions.client.RegularClientAction.execute(RegularClientAction.scala:104) 2021-12-07T13:22:51.442344 [APP/PROC/WEB/0]       at com.mendix.webui.requesthandling.ClientRequestHandler.handleAction(ClientRequestHandler.scala:106) 2021-12-07T13:22:51.442347 [APP/PROC/WEB/0]       at com.mendix.webui.requesthandling.ClientRequestHandler.processRequest(ClientRequestHandler.scala:79) 2021-12-07T13:22:51.442414 [APP/PROC/WEB/0]       at com.mendix.externalinterface.connector.RequestHandler.doProcessRequest(RequestHandler.java:35) 2021-12-07T13:22:51.442439 [APP/PROC/WEB/0]       at com.mendix.external.connector.MxRuntimeConnector.lambda$processRequest$0(MxRuntimeConnector.java:74) 2021-12-07T13:22:51.442451 [APP/PROC/WEB/0]       at com.mendix.external.connector.MxRuntimeConnector.processRequest(MxRuntimeConnector.java:73) 2021-12-07T13:22:51.442513 [APP/PROC/WEB/0]       at com.mendix.basis.impl.MxRuntimeImplBase.processRequest(MxRuntimeImplBase.java:838) 2021-12-07T13:22:51.442521 [APP/PROC/WEB/0]       at com.mendix.m2ee.appcontainer.server.handler.RuntimeServlet.service(RuntimeServlet.scala:25) 2021-12-07T13:22:51.442536 [APP/PROC/WEB/0]       at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) 2021-12-07T13:22:51.442539 [APP/PROC/WEB/0]       at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:799) 2021-12-07T13:22:51.442563 [APP/PROC/WEB/0]       at org.eclipse.jetty.servlet.ServletHandler$ChainEnd.doFilter(ServletHandler.java:1626) 2021-12-07T13:22:51.442592 [APP/PROC/WEB/0]       at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193) 2021-12-07T13:22:51.442638 [APP/PROC/WEB/0]       at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1601) 2021-12-07T13:22:51.442692 [APP/PROC/WEB/0]       at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:548) 2021-12-07T13:22:51.442885 [APP/PROC/WEB/0]       at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1624) 2021-12-07T13:22:51.443070 [APP/PROC/WEB/0]       at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:233) 2021-12-07T13:22:51.443499 [APP/PROC/WEB/0]       at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1434) 2021-12-07T13:22:51.443519 [APP/PROC/WEB/0]       at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:188) 2021-12-07T13:22:51.443535 [APP/PROC/WEB/0]       at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:501) 2021-12-07T13:22:51.443539 [APP/PROC/WEB/0]       at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1594) 2021-12-07T13:22:51.443593 [APP/PROC/WEB/0]       at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:186) 2021-12-07T13:22:51.443598 [APP/PROC/WEB/0]       at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1349) 2021-12-07T13:22:51.443684 [APP/PROC/WEB/0]       at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) 2021-12-07T13:22:51.443733 [APP/PROC/WEB/0]       at org.eclipse.jetty.server.Server.handle(Server.java:516) 2021-12-07T13:22:51.443772 [APP/PROC/WEB/0]       at org.eclipse.jetty.server.HttpChannel.lambda$handle$1(HttpChannel.java:388) 2021-12-07T13:22:51.443777 [APP/PROC/WEB/0]       at org.eclipse.jetty.server.HttpChannel.dispatch(HttpChannel.java:633) 2021-12-07T13:22:51.443788 [APP/PROC/WEB/0]       at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:380) 2021-12-07T13:22:51.443905 [APP/PROC/WEB/0]       at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:277) 2021-12-07T13:22:51.443972 [APP/PROC/WEB/0]       at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:311) 2021-12-07T13:22:51.443984 [APP/PROC/WEB/0]       at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:105) 2021-12-07T13:22:51.443987 [APP/PROC/WEB/0]       at org.eclipse.jetty.io.ChannelEndPoint$1.run(ChannelEndPoint.java:104) 2021-12-07T13:22:51.443990 [APP/PROC/WEB/0]       at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:338) 2021-12-07T13:22:51.444088 [APP/PROC/WEB/0]       at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:315) 2021-12-07T13:22:51.444171 [APP/PROC/WEB/0]       at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:173) 2021-12-07T13:22:51.444206 [APP/PROC/WEB/0]       at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:386) 2021-12-07T13:22:51.444224 [APP/PROC/WEB/0]       at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:883) 2021-12-07T13:22:51.444257 [APP/PROC/WEB/0]       at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:1034)
asked
4 answers
2

The flow is: OC_IsTeethCareTicked, The role is SupportWorker.

The problem is: Duplicate column value violates its unique constraint: ERROR: duplicate key value violates unique constraint "dailysupportrecord$personalcare_pkey"

Check at what time 10977524092907448 got created. Probably not long before this error-message.

The time is in the afternoon. More often then in the morning I guess? You got your supportworkers working on the same person-dossiers?

Solution might be to change the start of this process by replacing a Create by a FetchOrCreate.

Another possibility: someone is doubleclicking save-button. In that case: set that button’s microflow call to property ‘Disable during action’ to yes.

answered
1

The commit is probably done twice at the same time. Check if there is a button that calls DailySupportRecord.OC_IsTeethCareTicked and try to reproduce the issue by double clicking. If so, set disabled during action. If it’s caused by double clicking a list item or some other clickable element, set error handling on the commit activity, set it to continue without rollback and just create another end event. The second time will follow the error path, but since the flow has already succeeded the first time you won’t miss out on anything, but you will get rid of the error.

answered
1

I've seen this one in the past.

In our case it was 2 datasource microflows on the screen for different dataviews. Both ds flows made use of a getorcreate and both flows tried to commit an address to a report which was a 1-1 association in a single transaction. 

In another setup it was objects in a list with the same object being multiple times in the list and the getcreate from database did not check instantiated objects so also that case another object was created and a 1-1 association being committed to multiple objects in a commit list action. 

answered
1

I have also faced this issue but in a different context.

Had a microflow which creates some object based on some information sent from SAP.

For some strange un-explainable reason, two objects were created thus leading to duplicate objects.

Not sure if there is a needle in haystack kind of bug inside the framework itself. Ofcourse we added unique validation to stop creating duplicate objects based on the ID shared by SAP.

In this case also:

- Your OC_IsTeethCareTicked is probably trying to create the object PersonalCare with same ID (10977524092907448)

- And the primary key that conflicts is the general Mendix ID

- So, how could Mendix create two objects at same time with same ID, is something not understandable.

- May be 2 users trying to create PersonalCare object at the same time

NOTE: Check in your database for PersonalCare with ID 10977524092907448 and verify what data exists. If it is the same data as it is being created, then it must be 2 times object created for the same session. 

answered