"NullPointerException" is thrown when using jbpm kie ProcessService to issue signal event in BPM Suite 6.x

Solution Unverified - Updated -

Environment

  • Red Hat JBoss BPM Suite (BPMS) 6.1.x, 6.2.0, 6.2.1

Issue

NullPointerException 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]
...

Resolution

There is not workaround for BPM Suite 6.1.x. If you are on BPM Suite 6.2.x, please apply Red Hat JBoss BPM Suite 6.2 Update 2 or upgrade to BPM Suite 6.3.0 when available.

Root Cause

This is an issue that affects BPM Suite 6.1.x, 6.2.0 and 6.2.1. 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.

Please refers to BZ-1304508 to obtain further details.

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.

Comments