Failed to Synchronize

-1
Hi guys i’m traing to sync objects in my offline application (phone web offline) but sametimes i can do it and sometimes i have an error like that:    Failed to synchronize object '7599824371188213': Failed to commit. To prevent data loss, the changes have been stored under 'System.SynchronizationError' with id '3659174697239029'. -------- com.mendix.core.CoreRuntimeException: Failed to commit     at com.mendix.basis.component.TransactionCore.commit(TransactionCore.scala:152) Caused by: com.mendix.systemwideinterfaces.MendixRuntimeException: Autocommitted objects detected at end of transaction for long-lived user session for entities:   - MyFirstModule.Veiculo: 1 instances     at com.mendix.basis.action.RequestScope.$anonfun$endTransaction$3(RequestScope.scala:160)     at scala.Option.foreach(Option.scala:437)     at com.mendix.basis.action.RequestScope.verifyNoAutoCommitsExist$1(RequestScope.scala:153)     at com.mendix.basis.action.RequestScope.$anonfun$endTransaction$7(RequestScope.scala:169)     at com.mendix.basis.action.RequestScope.$anonfun$endTransaction$7$adapted(RequestScope.scala:163)     at scala.Option.foreach(Option.scala:437)     at com.mendix.basis.action.RequestScope.endTransaction(RequestScope.scala:163)     at com.mendix.basis.action.ContextImpl.endTransaction(ContextImpl.java:224)     at com.mendix.basis.component.TransactionCore.commit(TransactionCore.scala:139)     at com.mendix.basis.component.TransactionCore.commit$(TransactionCore.scala:109)     at com.mendix.basis.component.InternalCore.commit(InternalCore.scala:21)     at com.mendix.basis.component.TransactionCore.commitWithEvents(TransactionCore.scala:69)     at com.mendix.basis.component.TransactionCore.commit(TransactionCore.scala:28)     at com.mendix.basis.component.TransactionCore.commit$(TransactionCore.scala:27)     at com.mendix.basis.component.InternalCore.commit(InternalCore.scala:21)     at com.mendix.basis.component.TransactionCore.commit(TransactionCore.scala:23)     at com.mendix.basis.component.TransactionCore.commit$(TransactionCore.scala:23)     at com.mendix.basis.component.InternalCore.commit(InternalCore.scala:21)     at com.mendix.webui.actions.client.offline.internal.SynchronizeUtilImpl$.$anonfun$commit$2(SynchronizeUtilImpl.scala:82)     at scala.util.Try$.apply(Try.scala:210)     at com.mendix.webui.actions.client.offline.internal.SynchronizeUtilImpl$.$anonfun$commit$1(SynchronizeUtilImpl.scala:81)     at scala.collection.StrictOptimizedIterableOps.flatMap(StrictOptimizedIterableOps.scala:117)     at scala.collection.StrictOptimizedIterableOps.flatMap$(StrictOptimizedIterableOps.scala:104)     at scala.collection.convert.JavaCollectionWrappers$JListWrapper.flatMap(JavaCollectionWrappers.scala:103)     at com.mendix.webui.actions.client.offline.internal.SynchronizeUtilImpl$.commit(SynchronizeUtilImpl.scala:80)     at com.mendix.webui.actions.client.offline.SynchronizeObjectsAction.$anonfun$handleRequest$1(SynchronizeObjectsAction.scala:65)     at scala.Option.map(Option.scala:242)     at com.mendix.webui.actions.client.offline.SynchronizeObjectsAction.handleRequest(SynchronizeObjectsAction.scala:24)     at com.mendix.webui.actions.client.offline.internal.OfflineClientAction.$anonfun$execute$3(OfflineClientAction.scala:36)     at scala.util.Try$.apply(Try.scala:210)     at com.mendix.webui.actions.client.offline.internal.OfflineClientAction.$anonfun$execute$2(OfflineClientAction.scala:32)     at com.mendix.webui.actions.client.offline.internal.OfflineClientAction.$anonfun$execute$2$adapted(OfflineClientAction.scala:31)     at com.mendix.webui.requesthandling.helpers.ContextHandling.$anonfun$inContext$5(ContextHandling.scala:51)     at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.scala:18)     at com.mendix.basis.actionmanagement.ActionMonitoring$.$anonfun$monitor$1(ActionMonitoring.scala:50)     at com.mendix.util.classloading.Runner.withContextClassLoader(Runner.java:19)     at com.mendix.basis.actionmanagement.ActionMonitoring$.monitor(ActionMonitoring.scala:50)     at com.mendix.webui.requesthandling.helpers.ContextHandling.inContext(ContextHandling.scala:51)     at com.mendix.webui.requesthandling.helpers.ContextHandling.inContext$(ContextHandling.scala:26)     at com.mendix.webui.actions.client.offline.internal.OfflineClientAction.inContext(OfflineClientAction.scala:13)     at com.mendix.webui.requesthandling.helpers.ContextHandling.inContext(ContextHandling.scala:23)     at com.mendix.webui.requesthandling.helpers.ContextHandling.inContext$(ContextHandling.scala:18)     at com.mendix.webui.actions.client.offline.internal.OfflineClientAction.inContext(OfflineClientAction.scala:13)     at com.mendix.webui.actions.client.offline.internal.OfflineClientAction.$anonfun$execute$1(OfflineClientAction.scala:31)     at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.scala:18)     at com.mendix.webui.requesthandling.helpers.ProfileHandling.profileRequest(ProfileHandling.scala:14)     at com.mendix.webui.requesthandling.helpers.ProfileHandling.profileRequest$(ProfileHandling.scala:10)     at com.mendix.webui.actions.client.offline.internal.OfflineClientAction.profileRequest(OfflineClientAction.scala:13)     at com.mendix.webui.actions.client.offline.internal.OfflineClientAction.execute(OfflineClientAction.scala:28)     at com.mendix.webui.requesthandling.ClientRequestHandler.handleAction(ClientRequestHandler.scala:106)     at com.mendix.webui.requesthandling.ClientRequestHandler.processRequest(ClientRequestHandler.scala:79)     at com.mendix.externalinterface.connector.RequestHandler.doProcessRequest(RequestHandler.java:35)     at com.mendix.external.connector.MxRuntimeConnector.lambda$processRequest$0(MxRuntimeConnector.java:74)     at com.mendix.util.classloading.Runner.withContextClassLoader(Runner.java:19)     at com.mendix.external.connector.MxRuntimeConnector.processRequest(MxRuntimeConnector.java:73)     at com.mendix.basis.impl.MxRuntimeImplBase.processRequest(MxRuntimeImplBase.java:823)     at com.mendix.m2ee.appcontainer.server.handler.RuntimeServlet.service(RuntimeServlet.scala:25)     at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)     at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:799)     at org.eclipse.jetty.servlet.ServletHandler$ChainEnd.doFilter(ServletHandler.java:1626)     at org.eclipse.jetty.websocket.server.WebSocketUpgradeFilter.doFilter(WebSocketUpgradeFilter.java:228)     at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193)     at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1601)     at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:548)     at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:233)     at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1624)     at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:233)     at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1435)     at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:188)     at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:501)     at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1594)     at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:186)     at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1350)     at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)     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:277)     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:338)     at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:315)     at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:173)     at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:131)     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)   i dont know what its mean because sometimes the syncronization action works and sometimes not.
asked
1 answers
0

Usually this happens due to objects on your device that are in the “autocommitted” state. Those are objects that have been created and are now referenced by a committed object, but they have not been explicitly committed themselves. Check out this section of the documentation for more info about autocommit behavior in Mendix.

In this case, the error says you have an object of the type MyFirstModule.Veiculo that is referenced by some other committed data, but was never committed itself. The fix would be to ensure the MyFirstModule.Veiculo object is committed, or that it is not referenced by any other committed data.

answered