StaleObjectException on Timer execution.
----------------------------------------
Key: JBPM-2331
URL:
https://jira.jboss.org/jira/browse/JBPM-2331
Project: JBoss jBPM
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: Runtime Engine
Affects Versions: jBPM 4.0.CR1
Environment: jBPM 4.0.CR1 in a Spring 2.5 application using the standard
transaction model (not spring managed)
Reporter: Phil Bingley
A StaleObjectException is thrown on the flush of the ExecuteJobCmd execution. It appears
that Hibernate is trying to update the Job record at flush time despite it having been
deleted earlier in the transaction.
Adding a repeat to the timer definition means that the timer does not try to delete itself
allowing the job to execute without an error.
ERROR:org.hibernate.event.def.AbstractFlushingEventListener Could not synchronize database
state with session
org.hibernate.StaleObjectStateException: Row was updated or deleted by another transaction
(or unsaved-value mapping was incorrect): [org.jbpm.pvm.internal.job.TimerImpl#3]
at
org.hibernate.persister.entity.AbstractEntityPersister.check(AbstractEntityPersister.java:1792)
at
org.hibernate.persister.entity.AbstractEntityPersister.update(AbstractEntityPersister.java:2435)
at
org.hibernate.persister.entity.AbstractEntityPersister.updateOrInsert(AbstractEntityPersister.java:2335)
at
org.hibernate.persister.entity.AbstractEntityPersister.update(AbstractEntityPersister.java:2635)
at org.hibernate.action.EntityUpdateAction.execute(EntityUpdateAction.java:115)
at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:279)
at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:263)
at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:168)
at
org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:321)
at
org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:50)
at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1027)
at
org.jbpm.pvm.internal.tx.HibernateSessionResource.prepare(HibernateSessionResource.java:54)
at org.jbpm.pvm.internal.tx.StandardTransaction.commit(StandardTransaction.java:106)
at org.jbpm.pvm.internal.tx.StandardTransaction.complete(StandardTransaction.java:65)
at
org.jbpm.pvm.internal.tx.StandardTransactionInterceptor.execute(StandardTransactionInterceptor.java:61)
at
org.jbpm.pvm.internal.svc.EnvironmentInterceptor.execute(EnvironmentInterceptor.java:54)
at org.jbpm.pvm.internal.svc.RetryInterceptor.execute(RetryInterceptor.java:55)
at org.jbpm.pvm.internal.jobexecutor.JobExecutorThread.run(JobExecutorThread.java:63)
<process key="TimerTest" name="Timer Test">
<start name="thestart">
<transition to="wait"/>
</start>
<state name="wait">
<transition name="timeout" to="end">
<timer duedate="30 seconds"/>
</transition>
</state>
<end name="end"/>
</process>
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira