3 Replies Latest reply on Aug 16, 2011 7:33 PM by zhangjing2000

    NPE caused by Bitronix transaction glitch or drools transaction issue?

    zhangjing2000

      I wrote a simple java code to test jBPM5.1's JPAKnowledgeService.  I used Bitronix as transaction manager and H2 as database.

      The test java code could start a process, completed a work item and then ended the process successfully, but when I added a method call

      WorkflowProcessInstance.getNodeInstances().iterator().next().getNodeName() after starting the process instance, a NPE was caught.

      I found it is due to ProcessInstanceImpl.kruntime is null. After traced the startProcess's execution path, found ProcessInstanceImpl.kruntime has been reset to null after transaction committed in method org.drools.persistence.SingleSessionCommandService.execute(Command<T> command).

       

      Not sure if this is a Bitronix transaction issue or a jBPM5.1 transaction issue.