-
Bug
-
Resolution: Done
-
Major
-
None
-
False
-
False
-
NEW
-
NEW
-
Due to the fix for JBPM-9623, the ProcessInstance is no longer retrieved in readOnly mode when process variables are fetched. This can easily lead to an OptimisticLockException:
2021-10-05 10:25:43,755 ERROR [org.hibernate.internal.ExceptionMapperStandardImpl] (default task-4) HHH000346: Error during managed flush [Row was updated or deleted by another transaction (or unsaved-value mapping was incorrect) : [org.jbp m.persistence.processinstance.ProcessInstanceInfo#2463608]] 2021-10-05 10:25:43,755 WARN [com.arjuna.ats.arjuna] (default task-4) ARJUNA012125: TwoPhaseCoordinator.beforeCompletion - failed for SynchronizationImple< 0:ffff0a6240ee:5e975dfe:615c0808:84e3, org.wildfly.transaction.client.AbstractTrans action$AssociatingSynchronization@3f0df3e6 >: javax.persistence.OptimisticLockException: Row was updated or deleted by another transaction (or unsaved-value mapping was incorrect) : [org.jbpm.persistence.processinstance.ProcessInstanceInfo# 2463608] at org.hibernate.internal.ExceptionConverterImpl.wrapStaleStateException(ExceptionConverterImpl.java:226) at org.hibernate.internal.ExceptionConverterImpl.convert(ExceptionConverterImpl.java:93) at org.hibernate.internal.ExceptionConverterImpl.convert(ExceptionConverterImpl.java:181) at org.hibernate.internal.ExceptionConverterImpl.convert(ExceptionConverterImpl.java:188) at org.hibernate.internal.SessionImpl.doFlush(SessionImpl.java:1478) ... at org.drools.core.command.impl.CommandBasedStatefulKnowledgeSession.execute(CommandBasedStatefulKnowledgeSession.java:544) at org.jbpm.kie.services.impl.ProcessServiceImpl.getProcessInstanceVariable(ProcessServiceImpl.java:531) at org.kie.server.services.jbpm.ProcessServiceBase.getProcessInstanceVariable(ProcessServiceBase.java:336) at org.kie.server.remote.rest.jbpm.ProcessResource.getProcessInstanceVariable(ProcessResource.java:686)
As this call does not update any entities, it should fetch the ProcessInstance in readOnly mode to avoid the update to the SessionInfo object.
- clones
-
RHPAM-3943 OptimisticLockException in ProcessServiceImpl.getProcessInstanceVariable
- Closed