Uploaded image for project: 'JBoss BPMS Platform'
  1. JBoss BPMS Platform
  2. RHBPMS-918

NPE exception is thrown when using jbpm kie ProcessService to issue signal event

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Critical Critical
    • 6.3.0
    • 6.2.0
    • jBPM Core
    • None

      A NPE exeception is thrown when the following code is used to issue the signal event:
      processService.signalProcessInstance(pi.getId(), ROUTING_EXCEPTION, null);

      The stack trace is:

      Caused by: java.lang.NullPointerException
      at org.kie.spring.persistence.AbstractKieSpringJpaManager$EmHolderDelegateInvocationHandler.invoke(AbstractKieSpringJpaManager.java:141) [kie-spring-6.3.0.Final-redhat-5.jar:6.3.0.Final-redhat-5]
      at com.sun.proxy.$Proxy67.joinTransaction(Unknown Source)
      at org.jbpm.process.audit.JPAWorkingMemoryDbLogger.joinTransaction(JPAWorkingMemoryDbLogger.java:246) [jbpm-audit-6.3.0.Final-redhat-5.jar:6.3.0.Final-redhat-5]
      at org.jbpm.process.audit.JPAWorkingMemoryDbLogger.persist(JPAWorkingMemoryDbLogger.java:195) [jbpm-audit-6.3.0.Final-redhat-5.jar:6.3.0.Final-redhat-5]
      at org.jbpm.process.audit.JPAWorkingMemoryDbLogger.afterNodeLeft(JPAWorkingMemoryDbLogger.java:120) [jbpm-audit-6.3.0.Final-redhat-5.jar:6.3.0.Final-redhat-5]
      at org.drools.core.event.ProcessEventSupport.fireAfterNodeLeft(ProcessEventSupport.java:124) [drools-core-6.3.0.Final-redhat-5.jar:6.3.0.Final-redhat-5]
      at org.jbpm.workflow.instance.impl.NodeInstanceImpl.triggerNodeInstance(NodeInstanceImpl.java:375) [jbpm-flow-6.3.0.Final-redhat-5.jar:6.3.0.Final-redhat-5]
      at org.jbpm.workflow.instance.impl.NodeInstanceImpl.triggerCompleted(NodeInstanceImpl.java:325) [jbpm-flow-6.3.0.Final-redhat-5.jar:6.3.0.Final-redhat-5]
      at org.jbpm.workflow.instance.node.ActionNodeInstance.triggerCompleted(ActionNodeInstance.java:61) [jbpm-flow-6.3.0.Final-redhat-5.jar:6.3.0.Final-redhat-5]
      at org.jbpm.workflow.instance.node.ActionNodeInstance.internalTrigger(ActionNodeInstance.java:57) [jbpm-flow-6.3.0.Final-redhat-5.jar:6.3.0.Final-redhat-5]
      at org.jbpm.workflow.instance.impl.NodeInstanceImpl.trigger(NodeInstanceImpl.java:173) [jbpm-flow-6.3.0.Final-redhat-5.jar:6.3.0.Final-redhat-5]
      ... 50 more

      The problem is caused by the current implementation in org.jbpm.kie.services.impl.ProcessServiceImpl.
      Note that it disposes the runtime engine after sending the signal event:
      try

      { ksession.signalEvent(signalName, event, processInstanceId); }

      finally

      { disposeRuntimeEngine(manager, engine); }

      So the disposeRuntimeEngine needs to be fixed actually on runtime manager level to handle it properly for all possible cases.

              swiderski.maciej Maciej Swiderski (Inactive)
              rhn-support-ghu Gary Hu
              Tomáš Livora Tomáš Livora (Inactive)
              Tomáš Livora Tomáš Livora (Inactive)
              Kris Verlaenen, Tomáš Livora (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: