0 Replies Latest reply on Feb 4, 2008 10:14 AM by Peter Brewer

    null transaction when ending a process that was triggered by

    Peter Brewer Novice

      Hi, I've been using Seam 2.0.0.GA with jBPM 3.2.2 and have run into some issues with executing timer tasks.

      I have a simple process with a timer:

      <?xml version="1.0" encoding="UTF-8"?>
      <process-definition xmlns="urn:jbpm.org:jpdl-3.1"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xsi:schemaLocation="urn:jbpm.org:jpdl-3.1 http://jbpm.org/jpdl-3.1.xsd"
       name="timerTest">
      
       <start-state name="start">
       <transition name="" to="timerTest" />
       </start-state>
      
       <task-node name="timerTest" end-tasks="true">
       <event type="node-enter">
       <action expression="#{timerTestWorkflow.logNodeEnter}" />
       </event>
       <event type="node-leave">
       <action expression="#{timerTestWorkflow.logNodeLeave}" />
       </event>
      
       <task name="timerTestTask" description="TimerTestTask">
       <assignment actor-id="admin" />
       <event type="task-create">
       <action expression="#{timerTestWorkflow.logTaskCreate}" />
       </event>
      
      
       <event type="timer-create">
       <action expression="#{timerTestWorkflow.logTimerCreate}" />
       </event>
       <timer duedate="15 seconds" transition="finished">
       <action expression="#{timerTestWorkflow.logTimerFired}" />
       </timer>
      
       </task>
       <transition name="finished" to="end" />
       </task-node>
       <end-state name="end"></end-state>
      </process-definition>
      

      However, when the timer fires and the process instance is ending I receive the following error in the logs:
      2008-02-04 14:42:16,419 DEBUG [org.jbpm.job.executor.JobExecutorThread] acquiring jobs for execution...
      2008-02-04 14:42:16,419 DEBUG [org.jbpm.configuration.JbpmContextInfo] creating jbpm context with service factories '[message, tx, scheduler, authentication, persistence, logging]'
      2008-02-04 14:42:16,419 DEBUG [org.jbpm.JbpmContext] creating org.jbpm.JbpmContext@3f65df
      2008-02-04 14:42:16,419 DEBUG [org.jbpm.persistence.db.DbPersistenceServiceFactory] creating persistence service
      2008-02-04 14:42:16,419 DEBUG [org.jbpm.persistence.db.DbPersistenceService] creating hibernate session
      2008-02-04 14:42:16,419 DEBUG [org.jbpm.job.executor.JobExecutorThread] querying for acquirable job...
      2008-02-04 14:42:16,424 DEBUG [org.jbpm.job.executor.JobExecutorThread] trying to obtain a lock for 'timer(timerTestTask,08-02-04 14:42:12,446,TaskInstance: 1,Token: 1)'
      2008-02-04 14:42:16,430 WARN [org.hibernate.engine.StatefulPersistenceContext.ProxyWarnLog] Narrowing proxy to class org.jbpm.graph.node.TaskNode - this operation breaks ==
      2008-02-04 14:42:16,432 DEBUG [org.jbpm.JbpmContext] closing jbpmContext org.jbpm.JbpmContext@3f65df
      2008-02-04 14:42:16,433 DEBUG [org.jbpm.svc.Services] closing service 'persistence': org.jbpm.persistence.db.DbPersistenceService@3f671a
      2008-02-04 14:42:16,433 DEBUG [org.jbpm.persistence.db.DbPersistenceService] flushing hibernate session SessionImpl(PersistenceContext[entityKeys=[EntityKey[org.jbpm.taskmgmt.exe.TaskInstance#1], EntityKey[org.jbpm.graph.exe.Token#1], EntityKey[org.jbpm.taskmgmt.def.Task#1], EntityKey[org.jbpm.job.Job#1]],collectionKeys=[CollectionKey[org.jbpm.graph.exe.Token.children#1], CollectionKey[org.jbpm.taskmgmt.def.Task.exceptionHandlers#1], CollectionKey[org.jbpm.taskmgmt.def.Task.events#1], CollectionKey[org.jbpm.graph.exe.Token.comments#1], CollectionKey[org.jbpm.taskmgmt.exe.TaskInstance.variableInstances#1], CollectionKey[org.jbpm.taskmgmt.exe.TaskInstance.pooledActors#1], CollectionKey[org.jbpm.taskmgmt.exe.TaskInstance.comments#1]]];ActionQueue[insertions=[] updates=[] deletions=[] collectionCreations=[] collectionRemovals=[] collectionUpdates=[]])
      2008-02-04 14:42:16,434 DEBUG [org.jbpm.persistence.db.DbPersistenceService] closing hibernate session
      2008-02-04 14:42:16,434 DEBUG [org.jbpm.svc.Services] closing service 'tx': org.jbpm.tx.TxService@3feed1
      2008-02-04 14:42:16,434 DEBUG [org.jbpm.job.executor.JobExecutorThread] obtained locks on following jobs: [timer(timerTestTask,08-02-04 14:42:12,446,TaskInstance: 1,Token: 1)]
      2008-02-04 14:42:16,435 DEBUG [org.jbpm.configuration.JbpmContextInfo] creating jbpm context with service factories '[message, tx, scheduler, authentication, persistence, logging]'
      2008-02-04 14:42:16,435 DEBUG [org.jbpm.JbpmContext] creating org.jbpm.JbpmContext@401631
      2008-02-04 14:42:16,435 DEBUG [org.jbpm.persistence.db.DbPersistenceServiceFactory] creating persistence service
      2008-02-04 14:42:16,435 DEBUG [org.jbpm.persistence.db.DbPersistenceService] creating hibernate session
      2008-02-04 14:42:16,438 DEBUG [org.jbpm.job.executor.JobExecutorThread] executing job timer(timerTestTask,08-02-04 14:42:12,446,TaskInstance: 1,Token: 1)
      2008-02-04 14:42:16,442 WARN [org.hibernate.engine.StatefulPersistenceContext.ProxyWarnLog] Narrowing proxy to class org.jbpm.graph.node.TaskNode - this operation breaks ==
      2008-02-04 14:42:16,447 DEBUG [org.jbpm.job.Timer] executing timer 'timer(timerTestTask,08-02-04 14:42:12,446,TaskInstance: 1,Token: 1)'
      2008-02-04 14:42:16,451 DEBUG [org.jbpm.graph.def.GraphElement] executing action 'action[#{timerTestWorkflow.logTimerFired}]'
      2008-02-04 14:42:16,455 DEBUG [org.jbpm.configuration.JbpmContextInfo] creating jbpm context with service factories '[message, tx, scheduler, authentication, persistence, logging]'
      2008-02-04 14:42:16,455 DEBUG [org.jbpm.JbpmContext] creating org.jbpm.JbpmContext@4d638d
      2008-02-04 14:42:16,455 DEBUG [org.jbpm.configuration.JbpmContextInfo] creating jbpm context with service factories '[message, tx, scheduler, authentication, persistence, logging]'
      2008-02-04 14:42:16,455 DEBUG [org.jbpm.JbpmContext] creating org.jbpm.JbpmContext@4d65ce
      2008-02-04 14:42:16,455 DEBUG [org.jbpm.JbpmContext] closing jbpmContext org.jbpm.JbpmContext@4d65ce
      2008-02-04 14:42:16,455 DEBUG [org.jbpm.persistence.db.DbPersistenceServiceFactory] creating persistence service
      2008-02-04 14:42:16,455 DEBUG [org.jbpm.persistence.db.DbPersistenceService] creating hibernate session
      2008-02-04 14:42:16,466 INFO [uk.co.iblocks.timertest.TimerTestWorkflow] logTimerFired
      2008-02-04 14:42:16,470 DEBUG [org.jbpm.JbpmContext] closing jbpmContext org.jbpm.JbpmContext@4d638d
      2008-02-04 14:42:16,471 DEBUG [org.jbpm.svc.Services] executing default save operations
      2008-02-04 14:42:16,472 DEBUG [org.jbpm.svc.save.HibernateSaveOperation] saving process instance
      2008-02-04 14:42:16,474 DEBUG [org.jbpm.svc.save.SaveLogsOperation] flushing logs to logging service.
      2008-02-04 14:42:16,475 DEBUG [org.jbpm.svc.save.CascadeSaveOperation] cascading save of 'org.jbpm.graph.exe.ProcessInstance@4dd165'
      2008-02-04 14:42:16,476 DEBUG [org.jbpm.svc.Services] executing default save operations
      2008-02-04 14:42:16,476 DEBUG [org.jbpm.svc.save.HibernateSaveOperation] saving process instance
      2008-02-04 14:42:16,476 DEBUG [org.jbpm.svc.save.SaveLogsOperation] flushing logs to logging service.
      2008-02-04 14:42:16,476 DEBUG [org.jbpm.svc.save.CascadeSaveOperation] cascading save of 'org.jbpm.graph.exe.ProcessInstance@4dd165'
      2008-02-04 14:42:16,476 DEBUG [org.jbpm.svc.Services] closing service 'persistence': org.jbpm.persistence.db.DbPersistenceService@4d7172
      2008-02-04 14:42:16,477 DEBUG [org.jbpm.persistence.db.DbPersistenceService] flushing hibernate session 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.taskmgmt.exe.TaskMgmtInstance#2], EntityKey[org.jbpm.module.exe.ModuleInstance#1], EntityKey[org.jbpm.taskmgmt.exe.TaskInstance#1], EntityKey[org.jbpm.graph.exe.ProcessInstance#1]],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.graph.exe.ProcessInstance.instances#1], CollectionKey[org.jbpm.taskmgmt.exe.TaskMgmtInstance.swimlaneInstances#2], CollectionKey[org.jbpm.taskmgmt.exe.TaskMgmtInstance.taskInstances#2], CollectionKey[org.jbpm.taskmgmt.exe.TaskInstance.variableInstances#1], CollectionKey[org.jbpm.taskmgmt.exe.TaskInstance.pooledActors#1], CollectionKey[org.jbpm.taskmgmt.exe.TaskInstance.comments#1]]];ActionQueue[insertions=[] updates=[] deletions=[] collectionCreations=[] collectionRemovals=[] collectionUpdates=[]])
      2008-02-04 14:42:16,477 DEBUG [org.jbpm.persistence.db.DbPersistenceService] closing hibernate session
      2008-02-04 14:42:16,477 DEBUG [org.jbpm.svc.Services] closing service 'tx': org.jbpm.tx.TxService@4ec681
      2008-02-04 14:42:16,477 DEBUG [org.jbpm.svc.Services] closing service 'logging': org.jbpm.logging.db.DbLoggingService@4ea6d8
      2008-02-04 14:42:16,483 DEBUG [org.jbpm.graph.def.GraphElement] event 'before-signal' on 'TaskNode(timerTest)' for 'Token(/)'
      2008-02-04 14:42:16,492 DEBUG [org.jbpm.graph.def.GraphElement] event 'task-end' on 'Task(timerTestTask)' for 'Token(/)'
      2008-02-04 14:42:16,494 DEBUG [org.jbpm.graph.def.GraphElement] executing action 'CancelTimerAction(5acd1c)'
      2008-02-04 14:42:16,494 DEBUG [org.jbpm.graph.exe.Token] token[1] is locked by token[1]
      2008-02-04 14:42:16,496 WARN [org.hibernate.engine.StatefulPersistenceContext.ProxyWarnLog] Narrowing proxy to class org.jbpm.job.Timer - this operation breaks ==
      2008-02-04 14:42:16,498 DEBUG [org.jbpm.db.JobSession] deleting timer timer(timerTestTask,08-02-04 14:42:12,446,TaskInstance: 1,Token: 1) by name timerTestTask
      2008-02-04 14:42:16,507 DEBUG [org.jbpm.configuration.JbpmContextInfo] creating jbpm context with service factories '[message, tx, scheduler, authentication, persistence, logging]'
      2008-02-04 14:42:16,507 DEBUG [org.jbpm.JbpmContext] creating org.jbpm.JbpmContext@5b72f6
      2008-02-04 14:42:16,507 DEBUG [org.jbpm.configuration.JbpmContextInfo] creating jbpm context with service factories '[message, tx, scheduler, authentication, persistence, logging]'
      2008-02-04 14:42:16,507 DEBUG [org.jbpm.JbpmContext] creating org.jbpm.JbpmContext@5b751b
      2008-02-04 14:42:16,507 DEBUG [org.jbpm.JbpmContext] closing jbpmContext org.jbpm.JbpmContext@5b751b
      2008-02-04 14:42:16,507 DEBUG [org.jbpm.persistence.db.DbPersistenceServiceFactory] creating persistence service
      2008-02-04 14:42:16,507 DEBUG [org.jbpm.persistence.db.DbPersistenceService] creating hibernate session
      2008-02-04 14:42:16,508 DEBUG [org.jbpm.JbpmContext] closing jbpmContext org.jbpm.JbpmContext@5b72f6
      2008-02-04 14:42:16,508 DEBUG [org.jbpm.svc.Services] executing default save operations
      2008-02-04 14:42:16,508 DEBUG [org.jbpm.svc.save.HibernateSaveOperation] saving process instance
      2008-02-04 14:42:16,509 DEBUG [org.jbpm.svc.save.SaveLogsOperation] flushing logs to logging service.
      2008-02-04 14:42:16,509 DEBUG [org.jbpm.svc.save.CascadeSaveOperation] cascading save of 'org.jbpm.graph.exe.ProcessInstance@5b8f44'
      2008-02-04 14:42:16,509 DEBUG [org.jbpm.svc.Services] closing service 'persistence': org.jbpm.persistence.db.DbPersistenceService@5b7f11
      2008-02-04 14:42:16,509 DEBUG [org.jbpm.persistence.db.DbPersistenceService] flushing hibernate session 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=[]])
      2008-02-04 14:42:16,509 DEBUG [org.jbpm.persistence.db.DbPersistenceService] closing hibernate session
      2008-02-04 14:42:16,509 DEBUG [org.jbpm.svc.Services] closing service 'tx': org.jbpm.tx.TxService@5bc8ed
      2008-02-04 14:42:16,509 DEBUG [org.jbpm.svc.Services] closing service 'logging': org.jbpm.logging.db.DbLoggingService@5bc60b
      2008-02-04 14:42:16,510 DEBUG [org.jbpm.graph.exe.Token] token[1] is unlocked by token[1]
      2008-02-04 14:42:16,512 DEBUG [org.jbpm.graph.def.GraphElement] event 'node-leave' on 'TaskNode(timerTest)' for 'Token(/)'
      2008-02-04 14:42:16,512 DEBUG [org.jbpm.graph.def.GraphElement] executing action 'action[#{timerTestWorkflow.logNodeLeave}]'
      2008-02-04 14:42:16,512 DEBUG [org.jbpm.graph.exe.Token] token[1] is locked by token[1]
      2008-02-04 14:42:16,513 DEBUG [org.jbpm.configuration.JbpmContextInfo] creating jbpm context with service factories '[message, tx, scheduler, authentication, persistence, logging]'
      2008-02-04 14:42:16,513 DEBUG [org.jbpm.JbpmContext] creating org.jbpm.JbpmContext@5c7fd0
      2008-02-04 14:42:16,513 DEBUG [org.jbpm.configuration.JbpmContextInfo] creating jbpm context with service factories '[message, tx, scheduler, authentication, persistence, logging]'
      2008-02-04 14:42:16,513 DEBUG [org.jbpm.JbpmContext] creating org.jbpm.JbpmContext@5c81f5
      2008-02-04 14:42:16,513 DEBUG [org.jbpm.JbpmContext] closing jbpmContext org.jbpm.JbpmContext@5c81f5
      2008-02-04 14:42:16,513 DEBUG [org.jbpm.persistence.db.DbPersistenceServiceFactory] creating persistence service
      2008-02-04 14:42:16,513 DEBUG [org.jbpm.persistence.db.DbPersistenceService] creating hibernate session
      2008-02-04 14:42:16,516 INFO [uk.co.iblocks.timertest.TimerTestWorkflow] logNodeLeave
      2008-02-04 14:42:16,519 DEBUG [org.jbpm.JbpmContext] closing jbpmContext org.jbpm.JbpmContext@5c7fd0
      2008-02-04 14:42:16,519 DEBUG [org.jbpm.svc.Services] executing default save operations
      2008-02-04 14:42:16,519 DEBUG [org.jbpm.svc.save.HibernateSaveOperation] saving process instance
      2008-02-04 14:42:16,519 DEBUG [org.jbpm.svc.save.SaveLogsOperation] flushing logs to logging service.
      2008-02-04 14:42:16,519 DEBUG [org.jbpm.svc.save.CascadeSaveOperation] cascading save of 'org.jbpm.graph.exe.ProcessInstance@5c9ea1'
      2008-02-04 14:42:16,519 DEBUG [org.jbpm.svc.Services] executing default save operations
      2008-02-04 14:42:16,519 DEBUG [org.jbpm.svc.save.HibernateSaveOperation] saving process instance
      2008-02-04 14:42:16,519 DEBUG [org.jbpm.svc.save.SaveLogsOperation] flushing logs to logging service.
      2008-02-04 14:42:16,519 DEBUG [org.jbpm.svc.save.CascadeSaveOperation] cascading save of 'org.jbpm.graph.exe.ProcessInstance@5c9ea1'
      2008-02-04 14:42:16,519 DEBUG [org.jbpm.svc.Services] closing service 'persistence': org.jbpm.persistence.db.DbPersistenceService@5c8d04
      2008-02-04 14:42:16,519 DEBUG [org.jbpm.persistence.db.DbPersistenceService] flushing hibernate session SessionImpl(PersistenceContext[entityKeys=[EntityKey[org.jbpm.module.exe.ModuleInstance#2], EntityKey[org.jbpm.module.exe.ModuleInstance#1], EntityKey[org.jbpm.context.exe.VariableInstance#1], EntityKey[org.jbpm.graph.exe.Token#1], EntityKey[org.jbpm.graph.exe.ProcessInstance#1], EntityKey[org.jbpm.context.exe.TokenVariableMap#1]],collectionKeys=[CollectionKey[org.jbpm.graph.exe.Token.children#1], CollectionKey[org.jbpm.context.exe.TokenVariableMap.variableInstances#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.graph.exe.ProcessInstance.instances#1], CollectionKey[org.jbpm.taskmgmt.exe.TaskMgmtInstance.swimlaneInstances#2], CollectionKey[org.jbpm.taskmgmt.exe.TaskMgmtInstance.taskInstances#2]]];ActionQueue[insertions=[] updates=[] deletions=[] collectionCreations=[] collectionRemovals=[] collectionUpdates=[]])
      2008-02-04 14:42:16,519 DEBUG [org.jbpm.persistence.db.DbPersistenceService] closing hibernate session
      2008-02-04 14:42:16,519 DEBUG [org.jbpm.svc.Services] closing service 'tx': org.jbpm.tx.TxService@5d60d3
      2008-02-04 14:42:16,519 DEBUG [org.jbpm.svc.Services] closing service 'logging': org.jbpm.logging.db.DbLoggingService@5d5b8b
      2008-02-04 14:42:16,519 DEBUG [org.jbpm.graph.exe.Token] token[1] is unlocked by token[1]
      2008-02-04 14:42:16,520 DEBUG [org.jbpm.graph.def.GraphElement] event 'transition' on 'Transition(finished)' for 'Token(/)'
      2008-02-04 14:42:16,522 DEBUG [org.jbpm.graph.def.GraphElement] event 'node-enter' on 'EndState(end)' for 'Token(/)'
      2008-02-04 14:42:16,527 DEBUG [org.jbpm.graph.def.GraphElement] event 'process-end' on 'ProcessDefinition(timerTest)' for 'Token(/)'
      2008-02-04 14:42:16,532 ERROR [org.jbpm.db.JobSession] org.hibernate.TransactionException: could not register synchronization
      2008-02-04 14:42:16,534 DEBUG [org.jbpm.job.executor.JobExecutorThread] exception while executing 'timer(timerTestTask,08-02-04 14:42:12,446,TaskInstance: 1,Token: 1)'
      org.jbpm.JbpmException: couldn't delete jobs for 'org.jbpm.graph.exe.ProcessInstance@409df4'
       at org.jbpm.db.JobSession.deleteJobsForProcessInstance(JobSession.java:211)
       at org.jbpm.scheduler.db.DbSchedulerService.deleteTimersByProcessInstance(DbSchedulerService.java:54)
       at org.jbpm.graph.exe.ProcessInstance.end(ProcessInstance.java:330)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:597)
       at org.hibernate.proxy.pojo.javassist.JavassistLazyInitializer.invoke(JavassistLazyInitializer.java:173)
       at org.jbpm.graph.exe.ProcessInstance_$$_javassist_82.end(ProcessInstance_$$_javassist_82.java)
       at org.jbpm.graph.exe.Token.notifyParentOfTokenEnd(Token.java:332)
       at org.jbpm.graph.exe.Token.end(Token.java:304)
       at org.jbpm.graph.exe.Token.end(Token.java:254)
       at org.jbpm.graph.node.EndState.execute(EndState.java:59)
       at org.jbpm.graph.def.Node.enter(Node.java:319)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:597)
       at org.hibernate.proxy.pojo.javassist.JavassistLazyInitializer.invoke(JavassistLazyInitializer.java:173)
       at org.jbpm.graph.def.Node_$$_javassist_77.enter(Node_$$_javassist_77.java)
       at org.jbpm.graph.def.Transition.take(Transition.java:151)
       at org.jbpm.graph.def.Node.leave(Node.java:394)
       at org.jbpm.graph.node.TaskNode.leave(TaskNode.java:209)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:597)
       at org.hibernate.proxy.pojo.javassist.JavassistLazyInitializer.invoke(JavassistLazyInitializer.java:173)
       at org.jbpm.graph.def.Node_$$_javassist_77.leave(Node_$$_javassist_77.java)
       at org.jbpm.graph.exe.Token.signal(Token.java:195)
       at org.jbpm.graph.exe.Token.signal(Token.java:158)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:597)
       at org.hibernate.proxy.pojo.javassist.JavassistLazyInitializer.invoke(JavassistLazyInitializer.java:173)
       at org.jbpm.graph.exe.Token_$$_javassist_13.signal(Token_$$_javassist_13.java)
       at org.jbpm.job.Timer.execute(Timer.java:93)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:597)
       at org.hibernate.proxy.pojo.javassist.JavassistLazyInitializer.invoke(JavassistLazyInitializer.java:173)
       at org.jbpm.job.Job_$$_javassist_81.execute(Job_$$_javassist_81.java)
       at org.jbpm.job.executor.JobExecutorThread.executeJob(JobExecutorThread.java:164)
       at org.jbpm.job.executor.JobExecutorThread.run(JobExecutorThread.java:64)
      Caused by: org.hibernate.TransactionException: could not register synchronization
       at org.hibernate.transaction.JTATransaction.registerSynchronization(JTATransaction.java:309)
       at org.jbpm.db.JobSession.deleteJobsForProcessInstance(JobSession.java:208)
       ... 45 more
      Caused by: java.lang.NullPointerException
       at org.hibernate.transaction.JTATransaction.registerSynchronization(JTATransaction.java:306)
       at org.jbpm.db.JobSession.deleteJobsForProcessInstance(JobSession.java:208)
       at org.jbpm.scheduler.db.DbSchedulerService.deleteTimersByProcessInstance(DbSchedulerService.java:54)
       at org.jbpm.graph.exe.ProcessInstance.end(ProcessInstance.java:330)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:597)
       at org.hibernate.proxy.pojo.javassist.JavassistLazyInitializer.invoke(JavassistLazyInitializer.java:173)
       at org.jbpm.graph.exe.ProcessInstance_$$_javassist_82.end(ProcessInstance_$$_javassist_82.java)
       at org.jbpm.graph.exe.Token.notifyParentOfTokenEnd(Token.java:332)
       at org.jbpm.graph.exe.Token.end(Token.java:304)
       at org.jbpm.graph.exe.Token.end(Token.java:254)
       at org.jbpm.graph.node.EndState.execute(EndState.java:59)
       at org.jbpm.graph.def.Node.enter(Node.java:319)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:597)
       at org.hibernate.proxy.pojo.javassist.JavassistLazyInitializer.invoke(JavassistLazyInitializer.java:173)
       at org.jbpm.graph.def.Node_$$_javassist_77.enter(Node_$$_javassist_77.java)
       at org.jbpm.graph.def.Transition.take(Transition.java:151)
       at org.jbpm.graph.def.Node.leave(Node.java:394)
       at org.jbpm.graph.node.TaskNode.leave(TaskNode.java:209)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      2008-02-04 14:42:16,538 DEBUG [org.jbpm.JbpmContext] closing jbpmContext org.jbpm.JbpmContext@401631
      2008-02-04 14:42:16,538 DEBUG [org.jbpm.svc.Services] closing service 'persistence': org.jbpm.persistence.db.DbPersistenceService@40176c
      2008-02-04 14:42:16,538 DEBUG [org.jbpm.persistence.db.DbPersistenceService] flushing hibernate session SessionImpl(PersistenceContext[entityKeys=[EntityKey[org.jbpm.graph.def.ProcessDefinition#1], EntityKey[org.jbpm.graph.def.Event#5], EntityKey[org.jbpm.graph.exe.Token#1], EntityKey[org.jbpm.taskmgmt.exe.TaskInstance#1], EntityKey[org.jbpm.graph.def.Node#3], EntityKey[org.jbpm.graph.def.Event#3], EntityKey[org.jbpm.graph.def.Event#4], EntityKey[org.jbpm.taskmgmt.def.Task#1], EntityKey[org.jbpm.graph.exe.ProcessInstance#1], EntityKey[org.jbpm.graph.def.Event#1], EntityKey[org.jbpm.job.Job#1], EntityKey[org.jbpm.graph.node.TaskNode#2], EntityKey[org.jbpm.graph.def.Event#2], EntityKey[org.jbpm.graph.def.Transition#2], EntityKey[org.jbpm.module.exe.ModuleInstance#2], EntityKey[org.jbpm.module.exe.ModuleInstance#1], EntityKey[org.jbpm.graph.def.Action#7], EntityKey[org.jbpm.graph.def.Action#2], EntityKey[org.jbpm.graph.def.Action#3]],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#3], CollectionKey[org.jbpm.taskmgmt.exe.TaskMgmtInstance.taskInstances#2], CollectionKey[org.jbpm.graph.def.Node.exceptionHandlers#3], CollectionKey[org.jbpm.graph.def.Node.arrivingTransitions#2], CollectionKey[org.jbpm.graph.exe.Token.children#1], CollectionKey[org.jbpm.graph.def.Transition.exceptionHandlers#2], CollectionKey[org.jbpm.context.exe.ContextInstance.tokenVariableMaps#1], CollectionKey[org.jbpm.graph.def.Node.events#3], CollectionKey[org.jbpm.graph.def.Node.events#2], CollectionKey[org.jbpm.graph.def.Event.actions#1], CollectionKey[org.jbpm.taskmgmt.exe.TaskInstance.comments#1], CollectionKey[org.jbpm.graph.def.Node.leavingTransitions#3], CollectionKey[org.jbpm.graph.def.Node.leavingTransitions#2], CollectionKey[org.jbpm.graph.def.Event.actions#5], CollectionKey[org.jbpm.taskmgmt.def.Task.exceptionHandlers#1], CollectionKey[org.jbpm.graph.def.ProcessDefinition.exceptionHandlers#1], CollectionKey[org.jbpm.graph.def.Event.actions#4], 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.taskmgmt.exe.TaskInstance.pooledActors#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.Node.exceptionHandlers#2], CollectionKey[org.jbpm.graph.node.TaskNode.tasks#2], CollectionKey[org.jbpm.taskmgmt.def.Task.events#1], CollectionKey[org.jbpm.graph.def.Transition.events#2], CollectionKey[org.jbpm.taskmgmt.exe.TaskInstance.variableInstances#1]]];ActionQueue[insertions=[] updates=[] deletions=[EntityDeleteAction[org.jbpm.job.Timer#1]] collectionCreations=[] collectionRemovals=[] collectionUpdates=[]])
      2008-02-04 14:42:16,548 DEBUG [org.jbpm.persistence.db.DbPersistenceService] closing hibernate session
      2008-02-04 14:42:16,548 DEBUG [org.jbpm.svc.Services] closing service 'tx': org.jbpm.tx.TxService@5ec546
      2008-02-04 14:42:16,548 DEBUG [org.jbpm.svc.Services] closing service 'scheduler': org.jbpm.scheduler.db.DbSchedulerService@5ae756
      2008-02-04 14:42:16,548 DEBUG [org.jbpm.job.executor.JobExecutorThread] acquiring jobs for execution...
      2008-02-04 14:42:16,548 DEBUG [org.jbpm.configuration.JbpmContextInfo] creating jbpm context with service factories '[message, tx, scheduler, authentication, persistence, logging]'
      2008-02-04 14:42:16,548 DEBUG [org.jbpm.JbpmContext] creating org.jbpm.JbpmContext@5f2c3f
      2008-02-04 14:42:16,548 DEBUG [org.jbpm.persistence.db.DbPersistenceServiceFactory] creating persistence service
      2008-02-04 14:42:16,548 DEBUG [org.jbpm.persistence.db.DbPersistenceService] creating hibernate session
      2008-02-04 14:42:16,548 DEBUG [org.jbpm.job.executor.JobExecutorThread] querying for acquirable job...
      2008-02-04 14:42:16,549 DEBUG [org.jbpm.job.executor.JobExecutorThread] no acquirable jobs in job table
      2008-02-04 14:42:16,549 DEBUG [org.jbpm.JbpmContext] closing jbpmContext org.jbpm.JbpmContext@5f2c3f
      2008-02-04 14:42:16,549 DEBUG [org.jbpm.svc.Services] closing service 'persistence': org.jbpm.persistence.db.DbPersistenceService@5f2d7a
      2008-02-04 14:42:16,549 DEBUG [org.jbpm.persistence.db.DbPersistenceService] flushing hibernate session SessionImpl(PersistenceContext[entityKeys=[],collectionKeys=[]];ActionQueue[insertions=[] updates=[] deletions=[] collectionCreations=[] collectionRemovals=[] collectionUpdates=[]])
      2008-02-04 14:42:16,549 DEBUG [org.jbpm.persistence.db.DbPersistenceService] closing hibernate session
      2008-02-04 14:42:16,549 DEBUG [org.jbpm.svc.Services] closing service 'tx': org.jbpm.tx.TxService@5f3fef
      2008-02-04 14:42:16,549 DEBUG [org.jbpm.job.executor.JobExecutorThread] obtained locks on following jobs: []
      2008-02-04 14:42:16,549 DEBUG [org.jbpm.configuration.JbpmContextInfo] creating jbpm context with service factories '[message, tx, scheduler, authentication, persistence, logging]'
      2008-02-04 14:42:16,549 DEBUG [org.jbpm.JbpmContext] creating org.jbpm.JbpmContext@5f49f0
      2008-02-04 14:42:16,549 DEBUG [org.jbpm.persistence.db.DbPersistenceServiceFactory] creating persistence service
      2008-02-04 14:42:16,549 DEBUG [org.jbpm.persistence.db.DbPersistenceService] creating hibernate session
      2008-02-04 14:42:16,549 DEBUG [org.jbpm.JbpmContext] closing jbpmContext org.jbpm.JbpmContext@5f49f0
      2008-02-04 14:42:16,549 DEBUG [org.jbpm.svc.Services] closing service 'persistence': org.jbpm.persistence.db.DbPersistenceService@5f4b2b
      2008-02-04 14:42:16,549 DEBUG [org.jbpm.persistence.db.DbPersistenceService] flushing hibernate session SessionImpl(PersistenceContext[entityKeys=[],collectionKeys=[]];ActionQueue[insertions=[] updates=[] deletions=[] collectionCreations=[] collectionRemovals=[] collectionUpdates=[]])
      2008-02-04 14:42:16,549 DEBUG [org.jbpm.persistence.db.DbPersistenceService] closing hibernate session
      2008-02-04 14:42:16,549 DEBUG [org.jbpm.svc.Services] closing service 'tx': org.jbpm.tx.TxService@5f5cf9
      


      I have posted on the seam forums, but it was suggested that I try on this forum for any further ideas.

      seam forum: http://www.jboss.com/index.html?module=bb&op=viewtopic&t=123558

      I have also filed a seam jira with a full description and test code, available at:
      http://jira.jboss.org/jira/browse/JBSEAM-2575

      Any thoughts or suggestions on this issue would be gratefully received.

      Many thanks, Peter.