Unable to abort a process that "processInstanceByteArray" is null using business-central in BPM Suite 6
Environment
- Red Hat JBoss Business Process Management Suite (BPM Suite) 6.0.0, 6.0.1
- Database Mysql 5.1 and MySQLDialect dialect
Issue
A NullPointerException occurs when trying to abort a process that contains a Human Task:
09:59:02,261 WARN [org.drools.persistence.SingleSessionCommandService] (http-/172.31.46.246:8080-1) Could not commit session: java.lang.NullPointerException
at java.io.ByteArrayInputStream.<init>(ByteArrayInputStream.java:106) [rt.jar:1.7.0_45]
at org.jbpm.persistence.processinstance.ProcessInstanceInfo.getProcessInstance(ProcessInstanceInfo.java:162) [jbpm-persistence-jpa-6.0.2-redhat-6.jar:6.0.2-redhat-6]
An exception occurred when trying to start this process, but the rollback was not performed. Then, it is possible to view this process in business-central, but it is not possible to abort it. Also, Mysql 5.1 is used as external database.
Resolution
This issue was identified as a bug when using Mysql 5.1 as database. It works properly if using Mysql 5.5 and InnoDB dialect (org.hibernate.dialect.MySQL5InnoDBDialect
).
It is also necessary to change the underlying database engine to InnoDB (this can vary whether MySQL or MariaDB is being used).
In Mysql 5.1, as a workaround you can delete the process directly in database using the following queries:
delete from ProcessInstanceInfo where InstanceId=XX;
delete from ProcessInstanceLog where processInstanceId=XX;
According to the BZ, it will be fixed in JBoss BPM Suite 6.1.0.
Root Cause
This issue is a bug - BZ1116020 which should be fixed in a future release.
Diagnostic Steps
- Check if Mysql 5.1 is used as external database;
- Check in
processinstanceinfo
table ifprocessInstanceByteArray
field isNULL
for the problematic started process;
select * from ProcessInstanceInfo where InstanceId=XX;
- Check if any exception occurred when starting the problematic process;
- Look for NPE in
ByteArrayInputStream
inserver.log
(see full error in Issue section);
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