ARJUNA016053: Could not commit transaction.

1
+1
-1

It is appearing the following error sometimes during the execution of some instances.

Sometimes when I try to change the value of a attribute in a business variable, it throws the following error and the task stops.

Please, how can I make the bonita engine to stop throwing this error?
Here is the log:

9:42:22,221 ERROR [org.bonitasoft.engine.execution.work.FailureHandlingBonitaWork] (Bonita-Worker-1-03) THREAD_ID=246 | HOSTNAME=ECOSIZEEDE01 | TENANT_ID=1 | The work [ExecuteFlowNodeWork: processInstanceId:6455, flowNodeInstanceId: 569597] failed. The failure will be handled.
09:42:22,267 ERROR [org.bonitasoft.engine.execution.work.FailureHandlingBonitaWork] (Bonita-Worker-1-03) THREAD_ID=246 | HOSTNAME=ECOSIZEEDE01 | TENANT_ID=1 | org.bonitasoft.engine.transaction.STransactionCommitException : "PROCESS_DEFINITION_ID=5960294574315284012 | PROCESS_NAME=TIA | PROCESS_VERSION=1.1 | PROCESS_INSTANCE_ID=6455 | ROOT_PROCESS_INSTANCE_ID=6455 | FLOW_NODE_DEFINITION_ID=7657746571431238929 | FLOW_NODE_INSTANCE_ID=569597 | FLOW_NODE_NAME=Finalizar | javax.transaction.RollbackException: ARJUNA016053: Could not commit transaction.": org.bonitasoft.engine.transaction.STransactionCommitException: PROCESS_DEFINITION_ID=5960294574315284012 | PROCESS_NAME=TIA | PROCESS_VERSION=1.1 | PROCESS_INSTANCE_ID=6455 | ROOT_PROCESS_INSTANCE_ID=6455 | FLOW_NODE_DEFINITION_ID=7657746571431238929 | FLOW_NODE_INSTANCE_ID=569597 | FLOW_NODE_NAME=Finalizar | javax.transaction.RollbackException: ARJUNA016053: Could not commit transaction.
    at org.bonitasoft.engine.transaction.JTATransactionServiceImpl.commit(JTATransactionServiceImpl.java:229) [bonita-server-7.1.5.jar:]
    at org.bonitasoft.engine.transaction.JTATransactionServiceImpl.complete(JTATransactionServiceImpl.java:197) [bonita-server-7.1.5.jar:]
    at org.bonitasoft.engine.transaction.JTATransactionServiceImpl.executeInTransaction(JTATransactionServiceImpl.java:326) [bonita-server-7.1.5.jar:]
    at org.bonitasoft.engine.execution.work.TxBonitaWork.work(TxBonitaWork.java:53) [bonita-server-7.1.5.jar:]
    at org.bonitasoft.engine.execution.work.LockProcessInstanceWork.work(LockProcessInstanceWork.java:79) [bonita-server-7.1.5.jar:]
    at org.bonitasoft.engine.execution.work.failurewrapping.TxInHandleFailureWrappingWork.work(TxInHandleFailureWrappingWork.java:42) [bonita-server-7.1.5.jar:]
    at org.bonitasoft.engine.execution.work.failurewrapping.TxInHandleFailureWrappingWork.work(TxInHandleFailureWrappingWork.java:42) [bonita-server-7.1.5.jar:]
    at org.bonitasoft.engine.execution.work.failurewrapping.TxInHandleFailureWrappingWork.work(TxInHandleFailureWrappingWork.java:42) [bonita-server-7.1.5.jar:]
    at org.bonitasoft.engine.execution.work.FailureHandlingBonitaWork.work(FailureHandlingBonitaWork.java:66) [bonita-server-7.1.5.jar:]
    at org.bonitasoft.engine.work.BonitaWork.run(BonitaWork.java:56) [bonita-server-7.1.5.jar:]
    at org.bonitasoft.engine.work.SequenceRunnableExecutor.innerRun(SequenceRunnableExecutor.java:47) [bonita-server-7.1.5.jar:]
    at org.bonitasoft.engine.work.BonitaRunnable.run(BonitaRunnable.java:35) [bonita-server-7.1.5.jar:]
    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [rt.jar:1.7.0_79]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [rt.jar:1.7.0_79]
    at java.lang.Thread.run(Unknown Source) [rt.jar:1.7.0_79]
Caused by: javax.transaction.RollbackException: ARJUNA016053: Could not commit transaction.
    at com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple.commitAndDisassociate(TransactionImple.java:1177)
    at com.arjuna.ats.internal.jta.transaction.arjunacore.BaseTransaction.commit(BaseTransaction.java:117)
    at com.arjuna.ats.jbossatx.BaseTransactionManagerDelegate.commit(BaseTransactionManagerDelegate.java:75)
    at org.bonitasoft.engine.transaction.JTATransactionServiceImpl.commit(JTATransactionServiceImpl.java:227) [bonita-server-7.1.5.jar:]
    ... 14 more
Caused by: javax.persistence.OptimisticLockException: Row was updated or deleted by another transaction (or unsaved-value mapping was incorrect): [com.most.model.TIA#27142]
    at org.hibernate.ejb.AbstractEntityManagerImpl.wrapStaleStateException(AbstractEntityManagerImpl.java:1413) [hibernate-entitymanager-4.2.13.Final.jar:4.2.13.Final]
    at org.hibernate.ejb.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1329) [hibernate-entitymanager-4.2.13.Final.jar:4.2.13.Final]
    at org.hibernate.ejb.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1310) [hibernate-entitymanager-4.2.13.Final.jar:4.2.13.Final]
    at org.hibernate.ejb.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1316) [hibernate-entitymanager-4.2.13.Final.jar:4.2.13.Final]
    at org.hibernate.ejb.AbstractEntityManagerImpl$CallbackExceptionMapperImpl.mapManagedFlushFailure(AbstractEntityManagerImpl.java:1510) [hibernate-entitymanager-4.2.13.Final.jar:4.2.13.Final]
    at org.hibernate.engine.transaction.synchronization.internal.SynchronizationCallbackCoordinatorNonTrackingImpl.beforeCompletion(SynchronizationCallbackCoordinatorNonTrackingImpl.java:110) [hibernate-core-4.2.13.Final.jar:4.2.13.Final]
    at org.hibernate.engine.transaction.synchronization.internal.RegisteredSynchronization.beforeCompletion(RegisteredSynchronization.java:53) [hibernate-core-4.2.13.Final.jar:4.2.13.Final]
    at com.arjuna.ats.internal.jta.resources.arjunacore.SynchronizationImple.beforeCompletion(SynchronizationImple.java:76)
    at com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator.beforeCompletion(TwoPhaseCoordinator.java:273)
    at com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator.end(TwoPhaseCoordinator.java:93)
    at com.arjuna.ats.arjuna.AtomicAction.commit(AtomicAction.java:164)
    at com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple.commitAndDisassociate(TransactionImple.java:1165)
    ... 17 more
Caused by: org.hibernate.StaleObjectStateException: Row was updated or deleted by another transaction (or unsaved-value mapping was incorrect): [com.most.model.TIA#27142]
    at org.hibernate.persister.entity.AbstractEntityPersister.check(AbstractEntityPersister.java:2521) [hibernate-core-4.2.13.Final.jar:4.2.13.Final]
    at org.hibernate.persister.entity.AbstractEntityPersister.update(AbstractEntityPersister.java:3240) [hibernate-core-4.2.13.Final.jar:4.2.13.Final]
    at org.hibernate.persister.entity.AbstractEntityPersister.updateOrInsert(AbstractEntityPersister.java:3138) [hibernate-core-4.2.13.Final.jar:4.2.13.Final]
    at org.hibernate.persister.entity.AbstractEntityPersister.update(AbstractEntityPersister.java:3468) [hibernate-core-4.2.13.Final.jar:4.2.13.Final]
    at org.hibernate.action.internal.EntityUpdateAction.execute(EntityUpdateAction.java:140) [hibernate-core-4.2.13.Final.jar:4.2.13.Final]
    at org.hibernate.engine.spi.ActionQueue.execute(ActionQueue.java:395) [hibernate-core-4.2.13.Final.jar:4.2.13.Final]
    at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:387) [hibernate-core-4.2.13.Final.jar:4.2.13.Final]
    at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:304) [hibernate-core-4.2.13.Final.jar:4.2.13.Final]
    at org.hibernate.event.internal.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:349) [hibernate-core-4.2.13.Final.jar:4.2.13.Final]
    at org.hibernate.event.internal.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:56) [hibernate-core-4.2.13.Final.jar:4.2.13.Final]
    at org.hibernate.internal.SessionImpl.flush(SessionImpl.java:1159) [hibernate-core-4.2.13.Final.jar:4.2.13.Final]
    at org.hibernate.internal.SessionImpl.managedFlush(SessionImpl.java:404) [hibernate-core-4.2.13.Final.jar:4.2.13.Final]
    at org.hibernate.engine.transaction.synchronization.internal.SynchronizationCallbackCoordinatorNonTrackingImpl.beforeCompletion(SynchronizationCallbackCoordinatorNonTrackingImpl.java:105) [hibernate-core-4.2.13.Final.jar:4.2.13.Final]
    ... 23 more

Comments

Submitted by Sean McP on Thu, 10/06/2016 - 00:59

A Tip on displaying CODE/LOGS correctly in Posts:

Do not use the Supplied Buttons above, for some reason they refuse to work correctly, and despite bringing it to Bonitasofts attention, it's low priority.

To Show Code/Logs correctly use

< code >
your code/log
< /code >

removing the spaces to allow the showing of code/logs correctly as here:

  1. your code/log

Thanks and regards
Seán

1 answer

1
-1
-1

Your problem is caused by this:

Caused by: javax.persistence.OptimisticLockException: Row was updated or deleted by another transaction (or unsaved-value mapping was incorrect): [com.most.model.TIA#27142]

It looks like another process is updating the BDM in question....

regards
Seán

PS: While I understand this may not be the answer you are looking for I believe it does answer your question, please mark as resolved by ticking the tick mark on the left of this reply so others now it is closed.

Comments

Submitted by vinicius_8 on Thu, 10/06/2016 - 14:10

Thank you Sean, but this is another commom error in bonita that I am having problems.
When there are some instances of a same process, often occurs this error you mentioned.

Caused by: javax.persistence.OptimisticLockException: Row was updated or deleted by another transaction (or unsaved-value mapping was incorrect): [com.most.model.TIA#27142]

Did you had this problem too? Do you know what do I need to do to solve it?

Thank you.

Notifications