[
https://jira.jboss.org/jira/browse/JBPM-2036?page=com.atlassian.jira.plug...
]
Sunil S commented on JBPM-2036:
-------------------------------
Hi,
I am using JBPM 3.2.6.GA within Seam 2.0.2.SP1 and I am still seeing this issue. Here is
the extract from the logs, SOSE is at the end.
0:34:30,375 DEBUG [GraphElement] event 'node-enter' on Node(timer-node) for
Token(/)
00:34:30,406 DEBUG [GraphElement] executing CreateTimerAction@1be4a09
00:34:30,406 DEBUG [Token] token[1] is locked by token[1]
00:34:30,406 DEBUG [GraphElement] event 'timer-create' on Node(timer-node) for
Token(/)
00:34:30,437 DEBUG [JbpmContextInfo] creating jbpm context with service factories
'[message, tx, scheduler, authentication, persistence, logging]'
00:34:30,437 DEBUG [JbpmContext] creating org.jbpm.JbpmContext@111430
00:34:30,437 DEBUG [JbpmContextInfo] creating jbpm context with service factories
'[message, tx, scheduler, authentication, persistence, logging]'
00:34:30,437 DEBUG [JbpmContext] creating org.jbpm.JbpmContext@14494ca
00:34:30,437 DEBUG [JbpmContext] closing jbpmContext org.jbpm.JbpmContext@14494ca
00:34:30,437 DEBUG [DbPersistenceServiceFactory] creating persistence service
00:34:30,437 DEBUG [DbPersistenceService] creating hibernate session
00:34:30,484 DEBUG [JbpmContext] closing jbpmContext org.jbpm.JbpmContext@111430
00:34:30,484 DEBUG [Services] executing default save operations
00:34:30,500 DEBUG [HibernateSaveOperation] saving process instance
00:34:30,500 DEBUG [SaveLogsOperation] posting logs to logging service.
00:34:30,500 DEBUG [CascadeSaveOperation] cascading save of 'ProcessInstance(1)'
00:34:30,500 DEBUG [Services] closing service 'persistence':
org.jbpm.persistence.db.DbPersistenceService@10c6402
00:34:30,500 DEBUG [DbPersistenceService] flushing
SessionImpl(PersistenceContext[entityKeys=[EntityKey[org.jbpm.module.exe.ModuleInstance#2],
EntityKey[org.jbpm.module.exe.ModuleInstance#1],
EntityKey[org.jbpm.graph.exe.ProcessInstance#1]],collectionKeys=[CollectionKey[org.jbpm.context.exe.ContextInstance.tokenVariableMaps#1],
CollectionKey[org.jbpm.graph.exe.ProcessInstance.runtimeActions#1],
CollectionKey[org.jbpm.taskmgmt.exe.TaskMgmtInstance.swimlaneInstances#2],
CollectionKey[org.jbpm.graph.exe.ProcessInstance.instances#1],
CollectionKey[org.jbpm.taskmgmt.exe.TaskMgmtInstance.taskInstances#2]]];ActionQueue[insertions=[]
updates=[] deletions=[] collectionCreations=[] collectionRemovals=[]
collectionUpdates=[]])
00:34:30,500 DEBUG [DbPersistenceService] closing hibernate session
00:34:30,500 DEBUG [Services] closing service 'tx': org.jbpm.tx.TxService@1741027
00:34:30,500 DEBUG [Services] closing service 'logging':
org.jbpm.logging.db.DbLoggingService@d08bdb
00:34:30,500 DEBUG [Token] token[1] is unlocked by token[1]
00:34:30,515 DEBUG [GraphElement] executing Action(#{planTest.setCount(0)})
00:34:30,515 DEBUG [JbpmContextInfo] creating jbpm context with service factories
'[message, tx, scheduler, authentication, persistence, logging]'
00:34:30,515 DEBUG [JbpmContext] creating org.jbpm.JbpmContext@e6065d
00:34:30,515 DEBUG [JbpmContextInfo] creating jbpm context with service factories
'[message, tx, scheduler, authentication, persistence, logging]'
00:34:30,515 DEBUG [JbpmContext] creating org.jbpm.JbpmContext@1abec22
00:34:30,515 DEBUG [JbpmContext] closing jbpmContext org.jbpm.JbpmContext@1abec22
00:34:30,531 DEBUG [DbPersistenceServiceFactory] creating persistence service
00:34:30,531 DEBUG [DbPersistenceService] creating hibernate session
00:34:30,640 INFO [PlanTestAction] ->setCount(0)
00:34:30,640 DEBUG [VariableContainer] update variable 'count' in
'TokenVariableMap[/]' to value '0'
00:34:30,687 DEBUG [JbpmContext] closing jbpmContext org.jbpm.JbpmContext@e6065d
00:34:30,703 DEBUG [Services] executing default save operations
00:34:30,703 DEBUG [HibernateSaveOperation] saving process instance
00:34:30,703 DEBUG [SaveLogsOperation] posting logs to logging service.
00:34:30,718 DEBUG [CascadeSaveOperation] cascading save of 'ProcessInstance(1)'
00:34:30,718 DEBUG [Services] executing default save operations
00:34:30,718 DEBUG [HibernateSaveOperation] saving process instance
00:34:30,718 DEBUG [SaveLogsOperation] posting logs to logging service.
00:34:30,718 DEBUG [CascadeSaveOperation] cascading save of 'ProcessInstance(1)'
00:34:30,718 DEBUG [Services] executing default save operations
00:34:30,718 DEBUG [HibernateSaveOperation] saving process instance
00:34:30,718 DEBUG [SaveLogsOperation] posting logs to logging service.
00:34:30,718 DEBUG [CascadeSaveOperation] cascading save of 'ProcessInstance(1)'
00:34:30,718 DEBUG [Services] executing default save operations
00:34:30,718 DEBUG [HibernateSaveOperation] saving process instance
00:34:30,718 DEBUG [SaveLogsOperation] posting logs to logging service.
00:34:30,718 DEBUG [CascadeSaveOperation] cascading save of 'ProcessInstance(1)'
00:34:30,718 DEBUG [Services] closing service 'persistence':
org.jbpm.persistence.db.DbPersistenceService@164e7e6
00:34:30,718 DEBUG [DbPersistenceService] flushing
SessionImpl(PersistenceContext[entityKeys=[EntityKey[org.jbpm.graph.exe.Token#1],
EntityKey[org.jbpm.context.exe.VariableInstance#1],
EntityKey[org.jbpm.context.exe.TokenVariableMap#1],
EntityKey[org.jbpm.module.exe.ModuleInstance#2],
EntityKey[org.jbpm.module.exe.ModuleInstance#1],
EntityKey[org.jbpm.graph.exe.ProcessInstance#1],
EntityKey[org.jbpm.context.log.variableinstance.LongUpdateLog#179]],collectionKeys=[CollectionKey[org.jbpm.context.exe.TokenVariableMap.variableInstances#1],
CollectionKey[org.jbpm.graph.exe.Token.children#1],
CollectionKey[org.jbpm.graph.exe.ProcessInstance.runtimeActions#1],
CollectionKey[org.jbpm.context.exe.ContextInstance.tokenVariableMaps#1],
CollectionKey[org.jbpm.graph.exe.Token.comments#1],
CollectionKey[org.jbpm.taskmgmt.exe.TaskMgmtInstance.swimlaneInstances#2],
CollectionKey[org.jbpm.graph.exe.ProcessInstance.instances#1],
CollectionKey[org.jbpm.taskmgmt.exe.TaskMgmtInstance.taskInstances#2]]];ActionQueue[insertions=[]
updates=[] deletions=[] collectionCreations=[] collectionRemovals=[]
collectionUpdates=[]])
00:34:30,718 DEBUG [DbPersistenceService] closing hibernate session
00:34:30,718 DEBUG [Services] closing service 'tx': org.jbpm.tx.TxService@2e5a01
00:34:30,718 DEBUG [Services] closing service 'logging':
org.jbpm.logging.db.DbLoggingService@1171477
00:34:30,718 DEBUG [JobSession] deleted Job(1)
00:34:30,718 DEBUG [JbpmContext] closing jbpmContext org.jbpm.JbpmContext@178b9e6
00:34:30,718 DEBUG [Services] executing default save operations
00:34:30,718 DEBUG [HibernateSaveOperation] saving process instance
00:34:30,718 DEBUG [SaveLogsOperation] posting logs to logging service.
00:34:30,828 DEBUG [CascadeSaveOperation] cascading save of 'ProcessInstance(1)'
00:34:30,828 DEBUG [Services] closing service 'persistence':
org.jbpm.persistence.db.DbPersistenceService@af8d28
00:34:30,828 DEBUG [DbPersistenceService] flushing
SessionImpl(PersistenceContext[entityKeys=[EntityKey[org.jbpm.graph.def.ProcessDefinition#1],
EntityKey[org.jbpm.graph.exe.Token#1], EntityKey[org.jbpm.graph.log.ActionLog#180],
EntityKey[org.jbpm.graph.def.Node#3], EntityKey[org.jbpm.graph.def.Event#3],
EntityKey[org.jbpm.graph.log.NodeLog#181], EntityKey[org.jbpm.graph.def.Node#4],
EntityKey[org.jbpm.graph.exe.ProcessInstance#1], EntityKey[org.jbpm.graph.def.Event#1],
EntityKey[org.jbpm.job.Timer#26], EntityKey[org.jbpm.job.Job#1],
EntityKey[org.jbpm.graph.def.Event#2], EntityKey[org.jbpm.graph.log.ActionLog#184],
EntityKey[org.jbpm.graph.log.ActionLog#183],
EntityKey[org.jbpm.graph.log.TransitionLog#182],
EntityKey[org.jbpm.graph.def.Transition#3],
EntityKey[org.jbpm.module.exe.ModuleInstance#2],
EntityKey[org.jbpm.module.exe.ModuleInstance#1], EntityKey[org.jbpm.graph.def.Action#2],
EntityKey[org.jbpm.graph.def.Action#1],
EntityKey[org.jbpm.graph.def.Action#4]],collectionKeys=[CollectionKey[org.jbpm.graph.def.ProcessDefinition.definitions#1],
CollectionKey[org.jbpm.graph.def.ProcessDefinition.nodes#1],
CollectionKey[org.jbpm.graph.exe.Token.comments#1],
CollectionKey[org.jbpm.graph.def.Node.arrivingTransitions#4],
CollectionKey[org.jbpm.graph.def.Node.arrivingTransitions#3],
CollectionKey[org.jbpm.taskmgmt.exe.TaskMgmtInstance.taskInstances#2],
CollectionKey[org.jbpm.graph.def.Node.exceptionHandlers#3],
CollectionKey[org.jbpm.graph.def.Node.exceptionHandlers#4],
CollectionKey[org.jbpm.graph.exe.Token.children#1],
CollectionKey[org.jbpm.context.exe.ContextInstance.tokenVariableMaps#1],
CollectionKey[org.jbpm.graph.def.Transition.exceptionHandlers#3],
CollectionKey[org.jbpm.graph.def.Node.events#4],
CollectionKey[org.jbpm.graph.def.Node.events#3],
CollectionKey[org.jbpm.graph.def.Event.actions#1],
CollectionKey[org.jbpm.graph.def.Node.leavingTransitions#3],
CollectionKey[org.jbpm.graph.def.Node.leavingTransitions#4],
CollectionKey[org.jbpm.graph.def.ProcessDefinition.exceptionHandlers#1],
CollectionKey[org.jbpm.graph.def.Event.actions#3],
CollectionKey[org.jbpm.graph.def.Event.actions#2],
CollectionKey[org.jbpm.taskmgmt.exe.TaskMgmtInstance.swimlaneInstances#2],
CollectionKey[org.jbpm.graph.exe.ProcessInstance.instances#1],
CollectionKey[org.jbpm.graph.def.ProcessDefinition.events#1],
CollectionKey[org.jbpm.graph.def.ProcessDefinition.actions#1],
CollectionKey[org.jbpm.graph.exe.ProcessInstance.runtimeActions#1],
CollectionKey[org.jbpm.graph.def.Transition.events#3]]];ActionQueue[insertions=[]
updates=[] deletions=[EntityDeleteAction[org.jbpm.job.ExecuteNodeJob#1]]
collectionCreations=[] collectionRemovals=[] collectionUpdates=[]])
00:34:30,843 ERROR [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.graph.exe.Token#1]
at
org.hibernate.persister.entity.AbstractEntityPersister.check(AbstractEntityPersister.java:1765)
at
org.hibernate.persister.entity.AbstractEntityPersister.update(AbstractEntityPersister.java:2407)
at
org.hibernate.persister.entity.AbstractEntityPersister.updateOrInsert(AbstractEntityPersister.java:2307)
at
org.hibernate.persister.entity.AbstractEntityPersister.update(AbstractEntityPersister.java:2607)
at org.hibernate.action.EntityUpdateAction.execute(EntityUpdateAction.java:92)
at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:250)
at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:234)
at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:142)
at
org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:298)
at
org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:27)
at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1000)
at
org.jbpm.persistence.db.DbPersistenceService.flushSession(DbPersistenceService.java:261)
at org.jbpm.persistence.db.DbPersistenceService.close(DbPersistenceService.java:200)
at org.jbpm.svc.Services.close(Services.java:243)
at org.jbpm.JbpmContext.close(JbpmContext.java:133)
at org.jbpm.job.executor.JobExecutorThread.executeJob(JobExecutorThread.java:195)
at org.jbpm.job.executor.JobExecutorThread.run(JobExecutorThread.java:62)
00:34:30,843 INFO [DbPersistenceService] problem flushing session: optimistic locking
failed
00:34:30,843 DEBUG [DbPersistenceService] closing hibernate session
00:34:30,843 INFO [Services] optimistic locking failed, could not close service:
persistence
00:34:30,843 DEBUG [Services] closing service 'tx': org.jbpm.tx.TxService@15c00fd
00:34:30,843 DEBUG [Services] closing service 'scheduler':
org.jbpm.scheduler.db.DbSchedulerService@145028a
00:34:30,843 DEBUG [DbSchedulerService] timers were produced, job executor will be
signalled
00:34:30,843 DEBUG [Services] closing service 'logging':
org.jbpm.logging.db.DbLoggingService@1a9cb4b
00:34:30,843 DEBUG [JobExecutorThread] optimistic locking failed, could not complete job
Job(1)
StaleObjectStateException when repeating timer signals the token
----------------------------------------------------------------
Key: JBPM-2036
URL:
https://jira.jboss.org/jira/browse/JBPM-2036
Project: JBoss jBPM
Issue Type: Bug
Security Level: Public(Everyone can see)
Components: Runtime Engine
Affects Versions: jBPM 3.3.1 GA, jBPM-3.2.5.SP1
Reporter: Martin Putz
Assignee: Alejandro Guizar
Fix For: jBPM-3.2.5.SP2, jBPM 3.2.6 GA
With the following timer definition on a state node
<state name='state1'>
<timer name='timer-to-end-with-repeat' duedate='1 second'
repeat='5 seconds'>
<action class='org.jbpm.scheduler.exe.TimerDbTest$Signal' />
</timer>
<transition name='to_state2' to='state2'/>
</state>
and the action class execute() method being
public void execute(ExecutionContext executionContext) throws Exception {
executionContext.leaveNode();
}
leads to:
2009-02-10 21:38:45,404 16508 ERROR
[org.hibernate.event.def.AbstractFlushingEventListener] (JbpmJobExecutor:127.0.0.1:1:)
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.job.Timer#86]
at
org.hibernate.persister.entity.AbstractEntityPersister.check(AbstractEntityPersister.java:1769)
at
org.hibernate.persister.entity.AbstractEntityPersister.update(AbstractEntityPersister.java:2412)
at
org.hibernate.persister.entity.AbstractEntityPersister.updateOrInsert(AbstractEntityPersister.java:2312)
at
org.hibernate.persister.entity.AbstractEntityPersister.update(AbstractEntityPersister.java:2612)
at org.hibernate.action.EntityUpdateAction.execute(EntityUpdateAction.java:96)
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:298)
at
org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:27)
at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1000)
at org.hibernate.impl.SessionImpl.managedFlush(SessionImpl.java:338)
at org.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:106)
at org.jbpm.persistence.db.DbPersistenceService.commit(DbPersistenceService.java:226)
at
org.jbpm.persistence.db.DbPersistenceService.endTransaction(DbPersistenceService.java:131)
at org.jbpm.persistence.db.DbPersistenceService.close(DbPersistenceService.java:197)
at org.jbpm.svc.Services.close(Services.java:243)
at org.jbpm.JbpmContext.close(JbpmContext.java:133)
at org.jbpm.job.executor.JobExecutorThread.executeJob(JobExecutorThread.java:194)
at org.jbpm.job.executor.JobExecutorThread.run(JobExecutorThread.java:61)
If 'repeat' is not set, the token is leaving the state as expected.
--
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