Uploading file failed: Failed to commit Error: Uploading file failed: Failed to commit

2
Hi all I have a save button that calls a microflow to save a file system uploaded document, when a person double clicks the save button i have below error on console i tried the blocking feature and disable during action feature for this button, but also it faild Uploading file failed: Failed to commit Error: Uploading file failed: Failed to commit com.mendix.core.CoreRuntimeException: Failed to commit     at com.mendix.basis.component.InternalCore.commit(InternalCore.java:263) Caused by: com.mendix.core.CoreRuntimeException: com.mendix.core.CoreRuntimeException: com.mendix.systemwideinterfaces.MendixRuntimeException: com.mendix.core.CoreRuntimeException: Exception occurred in action '{"type":"CommitAction"}', all database changes executed by this action were rolled back     at com.mendix.basis.actionmanagement.ActionManager.executeInTransactionSync(ActionManager.java:161) Caused by: com.mendix.core.CoreRuntimeException: com.mendix.systemwideinterfaces.MendixRuntimeException: com.mendix.core.CoreRuntimeException: Exception occurred in action '{"type":"CommitAction"}', all database changes executed by this action were rolled back     at com.mendix.basis.actionmanagement.ActionManager.executeSync(ActionManager.java:195) Caused by: com.mendix.systemwideinterfaces.MendixRuntimeException: com.mendix.core.CoreRuntimeException: Exception occurred in action '{"type":"CommitAction"}', all database changes executed by this action were rolled back     at com.mendix.util.classloading.Runner.doRunUsingClassLoaderOf(Runner.java:36) Caused by: com.mendix.core.CoreRuntimeException: Exception occurred in action '{"type":"CommitAction"}', all database changes executed by this action were rolled back     at com.mendix.basis.actionmanagement.CoreActionHandlerImpl.processErrorState(CoreActionHandlerImpl.scala:160) Caused by: com.mendix.systemwideinterfaces.connectionbus.data.UniqueConstraintViolationRuntimeException: Duplicate column value violates its unique constraint: Violation of PRIMARY KEY constraint 'PK__system$f__3213E83F3BF98744'. Cannot insert duplicate key in object 'dbo.system$filedocument'. The duplicate key value is (5629499534309034). (SQL State: 23000, Error Code: 2627)     at com.mendix.basis.action.user.CommitAction$$anonfun$commitPersistableObjects$4.applyOrElse(CommitAction.scala:97)     at com.mendix.basis.action.user.CommitAction$$anonfun$commitPersistableObjects$4.applyOrElse(CommitAction.scala:95)     at scala.runtime.AbstractPartialFunction.apply(AbstractPartialFunction.scala:34)     at scala.util.Failure.recoverWith(Try.scala:232)     at com.mendix.basis.action.user.CommitAction.commitPersistableObjects(CommitAction.scala:95)     at com.mendix.basis.action.user.CommitAction.executeAction(CommitAction.scala:59)     at com.mendix.basis.action.user.CommitAction.executeAction(CommitAction.scala:29)     at com.mendix.systemwideinterfaces.core.UserAction.execute(UserAction.java:46)     at com.mendix.basis.actionmanagement.CoreActionHandlerImpl.doCall(CoreActionHandlerImpl.scala:79)     at com.mendix.basis.actionmanagement.CoreActionHandlerImpl.call(CoreActionHandlerImpl.scala:57)     at com.mendix.core.actionmanagement.CoreAction.call(CoreAction.java:55)     at com.mendix.basis.actionmanagement.ActionManager$1.execute(ActionManager.java:186)     at com.mendix.util.classloading.Runner.doRunUsingClassLoaderOf(Runner.java:32)     at com.mendix.basis.actionmanagement.ActionManager.executeSync(ActionManager.java:191)     at com.mendix.basis.actionmanagement.ActionManager.executeInTransactionSync(ActionManager.java:154)     at com.mendix.basis.component.InternalCore.commit(InternalCore.java:231)     at com.mendix.basis.component.InternalCore.commit(InternalCore.java:207)     at com.mendix.basis.component.InternalCore.commit(InternalCore.java:201)     at com.mendix.basis.component.InternalCore.commit(InternalCore.java:187)     at com.mendix.filedocumentprocessor.internal.FileDocumentProcessorImpl.writeImage(FileDocumentProcessorImpl.java:178)     at com.mendix.filedocumentprocessor.internal.FileDocumentProcessorImpl.storeImageInternal(FileDocumentProcessorImpl.java:161)     at com.mendix.filedocumentprocessor.internal.FileDocumentProcessorImpl.storeImage(FileDocumentProcessorImpl.java:143)     at com.mendix.basis.component.InternalCore.storeImageDocumentContent(InternalCore.java:1715)     at com.mendix.webui.requesthandling.FileRequestHandler.doUpload(FileRequestHandler.scala:170)     at com.mendix.webui.requesthandling.FileRequestHandler.handleUpload(FileRequestHandler.scala:77)     at com.mendix.webui.requesthandling.FileRequestHandler.handleRequest(FileRequestHandler.scala:62)     at com.mendix.webui.requesthandling.FileRequestHandler.processRequest(FileRequestHandler.scala:55)     at com.mendix.externalinterface.connector.RequestHandler.doProcessRequest(RequestHandler.java:40)     at com.mendix.external.connector.MxRuntimeConnector$1.execute(MxRuntimeConnector.java:71)     at com.mendix.external.connector.MxRuntimeConnector$1.execute(MxRuntimeConnector.java:68)     at com.mendix.util.classloading.Runner.doRunUsingClassLoaderOf(Runner.java:32)     at com.mendix.external.connector.MxRuntimeConnector.processRequest(MxRuntimeConnector.java:74)     at com.mendix.basis.impl.MxRuntimeImpl.processRequest(MxRuntimeImpl.java:860)     at com.mendix.m2ee.appcontainer.server.handler.RuntimeHandler.service(RuntimeHandler.java:42)     at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)     at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:841)     at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:535)     at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:188)     at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1595)     at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:188)     at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1253)     at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:168)     at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:473)     at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1564)     at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:166)     at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1155)     at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)     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:748)
asked
2 answers
1

The error itself seems to be related to the double click as the system appear so try to add the file twice on the same UID.

As for the Block action - disable concurrent - it's known not to work in 7.15, I suggest updating to 7.19.1 or 7.20.1.

Hope this helps 

answered
0

Have you recently restored a backup to this environment? I have seen these error messages before and they the root cause had to do with duplicate records. 

There have been multiple questions about this on the this forum, for ex: https://forum.mendix.com/link/questions/87348

answered