1 Reply Latest reply on Mar 21, 2006 9:57 AM by r y

    Failure at process ending

    r y Newbie

      Hi

      I have modelled a process definition with some forks-joins, and differents path of execution. After all execution, when de root token arrives to the end-state, I have an exception when jBPM is trying to save the process instance as ended.

      This is de output:

      14:28:25,354 DEBUG [DbPersistenceServiceFactory] creating persistence service
      14:28:25,354 DEBUG [DbPersistenceService] creating hibernate session
      14:28:25,354 DEBUG [DbPersistenceService] beginning hibernate transaction
      14:28:25,354 DEBUG [JbpmContext] closing JbpmContext
      14:28:25,354 DEBUG [Services] closing service 'persistence': org.jbpm.persistence.db.DbPersistenceService@13cca0e
      14:28:25,354 DEBUG [DbPersistenceService] committing hibernate transaction
      14:28:25,354 DEBUG [DbPersistenceService] closing hibernate session
      14:28:25,354 DEBUG [Services] closing service 'message': org.jbpm.msg.db.DbMessageService@1f5910e
      14:28:25,354 DEBUG [CommandExecutorThread] waiting for more messages
      14:28:25,354 DEBUG [StaticNotifier] going to wait for (CMD_EXECUTOR, java.lang.Object@13ac14d)
      14:28:25,464 DEBUG [JbpmContextInfo] creating jbpm context with service factories '[message, scheduler, logging, persistence, authentication]'
      14:28:25,464 DEBUG [JbpmContext] creating JbpmContext
      14:28:25,464 DEBUG [DbPersistenceServiceFactory] creating persistence service
      14:28:25,464 DEBUG [DbPersistenceService] creating hibernate session
      14:28:25,464 DEBUG [DbPersistenceService] beginning hibernate transaction
      14:28:25,464 DEBUG [SchedulerThread] checking for timers
      14:28:25,479 DEBUG [SchedulerThread] found timer timer(Temporizador [00001200603170100013],14:25:30,000)
      14:28:25,479 DEBUG [SchedulerThread] executing timer 'timer(Temporizador [00001200603170100013],14:25:30,000)'
      14:28:25,495 DEBUG [GraphElement] event 'before-signal' on 'Node(EsperarFinVentana)' for 'Token(/tr2/tr2)'
      14:28:25,495 DEBUG [GraphElement] event 'node-leave' on 'Node(EsperarFinVentana)' for 'Token(/tr2/tr2)'
      14:28:25,495 DEBUG [GraphElement] event 'transition' on 'Transition(tr1)' for 'Token(/tr2/tr2)'
      14:28:25,495 DEBUG [GraphElement] event 'node-enter' on 'Join(join1)' for 'Token(/tr2/tr2)'
      14:28:25,495 DEBUG [GraphElement] event 'node-leave' on 'Join(join1)' for 'Token(/tr2)'
      14:28:25,495 DEBUG [GraphElement] event 'transition' on 'Transition(tr1)' for 'Token(/tr2)'
      14:28:25,495 DEBUG [GraphElement] event 'node-enter' on 'Join(join2)' for 'Token(/tr2)'
      14:28:25,495 DEBUG [GraphElement] event 'node-leave' on 'Join(join2)' for 'Token(/)'
      14:28:25,510 DEBUG [GraphElement] event 'transition' on 'Transition(tr1)' for 'Token(/)'
      14:28:25,510 DEBUG [GraphElement] event 'node-enter' on 'EndState(end3)' for 'Token(/)'
      14:28:25,510 DEBUG [GraphElement] event 'process-end' on 'ProcessDefinition(01OT)' for 'Token(/)'
      14:28:25,526 DEBUG [GraphElement] event 'after-signal' on 'Node(EsperarFinVentana)' for 'Token(/tr2/tr2)'
      14:28:27,511 DEBUG [Services] executing default save operations
      14:28:27,511 DEBUG [HibernateSaveOperation] saving process instance
      14:28:27,511 DEBUG [SaveLogsOperation] flushing logs to logging service.
      14:28:27,526 DEBUG [CascadeSaveOperation] cascading save of 'org.jbpm.graph.exe.ProcessInstance@130b682'
      14:28:27,526 DEBUG [SchedulerThread] deleting timer 'timer(Temporizador [00001200603170100013],14:25:30,000)'
      14:28:27,526 DEBUG [JbpmContext] closing JbpmContext
      14:28:27,526 DEBUG [Services] closing service 'persistence': org.jbpm.persistence.db.DbPersistenceService@11b456f
      14:28:27,526 DEBUG [DbPersistenceService] committing hibernate transaction
      14:28:27,542 ERROR [AbstractBatcher] Exception executing batch:
      org.hibernate.StaleStateException: Batch update returned unexpected row count from update: 0 actual row count: 0 expected: 1
      at org.hibernate.jdbc.BatchingBatcher.checkRowCount(BatchingBatcher.java:93)
      at org.hibernate.jdbc.BatchingBatcher.checkRowCounts(BatchingBatcher.java:79)
      at org.hibernate.jdbc.BatchingBatcher.doExecuteBatch(BatchingBatcher.java:58)
      at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:195)
      at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:230)
      at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:145)
      at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:296)
      at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:27)
      at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:980)
      at org.hibernate.impl.SessionImpl.managedFlush(SessionImpl.java:353)
      at org.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:106)
      at org.jbpm.persistence.db.DbPersistenceService.close(DbPersistenceService.java:161)
      at org.jbpm.svc.Services.close(Services.java:211)
      at org.jbpm.JbpmContext.close(JbpmContext.java:138)
      at org.jbpm.scheduler.impl.SchedulerThread.executeTimers(SchedulerThread.java:161)
      at org.jbpm.scheduler.impl.SchedulerThread.run(SchedulerThread.java:70)
      14:28:27,542 ERROR [AbstractFlushingEventListener] Could not synchronize database state with session
      org.hibernate.StaleStateException: Batch update returned unexpected row count from update: 0 actual row count: 0 expected: 1
      at org.hibernate.jdbc.BatchingBatcher.checkRowCount(BatchingBatcher.java:93)
      at org.hibernate.jdbc.BatchingBatcher.checkRowCounts(BatchingBatcher.java:79)
      at org.hibernate.jdbc.BatchingBatcher.doExecuteBatch(BatchingBatcher.java:58)
      at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:195)
      at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:230)
      at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:145)
      at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:296)
      at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:27)
      at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:980)
      at org.hibernate.impl.SessionImpl.managedFlush(SessionImpl.java:353)
      at org.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:106)
      at org.jbpm.persistence.db.DbPersistenceService.close(DbPersistenceService.java:161)
      at org.jbpm.svc.Services.close(Services.java:211)
      at org.jbpm.JbpmContext.close(JbpmContext.java:138)
      at org.jbpm.scheduler.impl.SchedulerThread.executeTimers(SchedulerThread.java:161)
      at org.jbpm.scheduler.impl.SchedulerThread.run(SchedulerThread.java:70)
      14:28:27,573 INFO [STDOUT] org.jbpm.persistence.JbpmPersistenceException: couldn't commit hibernate session
      14:28:27,573 INFO [STDOUT] at org.jbpm.persistence.db.DbPersistenceService.close(DbPersistenceService.java:171)
      14:28:27,573 INFO [STDOUT] at org.jbpm.svc.Services.close(Services.java:211)
      14:28:27,573 INFO [STDOUT] at org.jbpm.JbpmContext.close(JbpmContext.java:138)
      14:28:27,573 INFO [STDOUT] at org.jbpm.scheduler.impl.SchedulerThread.executeTimers(SchedulerThread.java:161)
      14:28:27,573 INFO [STDOUT] at org.jbpm.scheduler.impl.SchedulerThread.run(SchedulerThread.java:70)
      14:28:27,573 INFO [STDOUT] Caused by: org.hibernate.StaleStateException: Batch update returned unexpected row count from update: 0 actual row count: 0 expected:
      14:28:27,573 INFO [STDOUT] at org.hibernate.jdbc.BatchingBatcher.checkRowCount(BatchingBatcher.java:93)
      14:28:27,573 INFO [STDOUT] at org.hibernate.jdbc.BatchingBatcher.checkRowCounts(BatchingBatcher.java:79)
      14:28:27,573 INFO [STDOUT] at org.hibernate.jdbc.BatchingBatcher.doExecuteBatch(BatchingBatcher.java:58)
      14:28:27,573 INFO [STDOUT] at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:195)
      14:28:27,573 INFO [STDOUT] at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:230)
      14:28:27,573 INFO [STDOUT] at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:145)
      14:28:27,573 INFO [STDOUT] at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:296)
      14:28:27,573 INFO [STDOUT] at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:27)
      14:28:27,573 INFO [STDOUT] at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:980)
      14:28:27,573 INFO [STDOUT] at org.hibernate.impl.SessionImpl.managedFlush(SessionImpl.java:353)
      14:28:27,573 INFO [STDOUT] at org.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:106)
      14:28:27,573 INFO [STDOUT] at org.jbpm.persistence.db.DbPersistenceService.close(DbPersistenceService.java:161)
      14:28:27,573 INFO [STDOUT] ... 4 more
      14:28:27,573 ERROR [Services] problem closing service 'persistence'
      org.jbpm.persistence.JbpmPersistenceException: couldn't commit hibernate session
      at org.jbpm.persistence.db.DbPersistenceService.close(DbPersistenceService.java:171)
      at org.jbpm.svc.Services.close(Services.java:211)
      at org.jbpm.JbpmContext.close(JbpmContext.java:138)
      at org.jbpm.scheduler.impl.SchedulerThread.executeTimers(SchedulerThread.java:161)
      at org.jbpm.scheduler.impl.SchedulerThread.run(SchedulerThread.java:70)
      Caused by: org.hibernate.StaleStateException: Batch update returned unexpected row count from update: 0 actual row count: 0 expected: 1
      at org.hibernate.jdbc.BatchingBatcher.checkRowCount(BatchingBatcher.java:93)
      at org.hibernate.jdbc.BatchingBatcher.checkRowCounts(BatchingBatcher.java:79)
      at org.hibernate.jdbc.BatchingBatcher.doExecuteBatch(BatchingBatcher.java:58)
      at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:195)
      at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:230)
      at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:145)
      at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:296)
      at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:27)
      at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:980)
      at org.hibernate.impl.SessionImpl.managedFlush(SessionImpl.java:353)
      at org.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:106)
      at org.jbpm.persistence.db.DbPersistenceService.close(DbPersistenceService.java:161)
      ... 4 more
      14:28:27,573 DEBUG [Services] closing service 'scheduler': org.jbpm.scheduler.db.DbSchedulerService@19dd520
      14:28:27,573 DEBUG [Services] closing service 'logging': org.jbpm.logging.db.DbLoggingService@1136019
      14:28:27,573 INFO [SchedulerThread] runtime exception while executing timers
      org.jbpm.JbpmException: problem closing services {persistence=org.jbpm.persistence.JbpmPersistenceException: couldn't commit hibernate session}
      at org.jbpm.svc.Services.close(Services.java:223)
      at org.jbpm.JbpmContext.close(JbpmContext.java:138)
      at org.jbpm.scheduler.impl.SchedulerThread.executeTimers(SchedulerThread.java:161)
      at org.jbpm.scheduler.impl.SchedulerThread.run(SchedulerThread.java:70)
      Caused by: org.jbpm.persistence.JbpmPersistenceException: couldn't commit hibernate session
      at org.jbpm.persistence.db.DbPersistenceService.close(DbPersistenceService.java:171)
      at org.jbpm.svc.Services.close(Services.java:211)
      ... 3 more
      Caused by: org.hibernate.StaleStateException: Batch update returned unexpected row count from update: 0 actual row count: 0 expected: 1
      at org.hibernate.jdbc.BatchingBatcher.checkRowCount(BatchingBatcher.java:93)
      at org.hibernate.jdbc.BatchingBatcher.checkRowCounts(BatchingBatcher.java:79)
      at org.hibernate.jdbc.BatchingBatcher.doExecuteBatch(BatchingBatcher.java:58)
      at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:195)
      at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:230)
      at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:145)
      at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:296)
      at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:27)
      at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:980)
      at org.hibernate.impl.SessionImpl.managedFlush(SessionImpl.java:353)
      at org.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:106)
      at org.jbpm.persistence.db.DbPersistenceService.close(DbPersistenceService.java:161)
      ... 4 more

      I were thinking that it was caused because I had not implemented de join nodes, but it still happends now with the pairs fork-join made correctly.

      Any idea?

      Thx very much.