Bug 832954 - Unable to begin transaction in JBPM running on WAS-8.0+DB2-9.7
Unable to begin transaction in JBPM running on WAS-8.0+DB2-9.7
Status: NEW
Product: JBoss Enterprise BRMS Platform 5
Classification: JBoss
Component: jBPM 5 (Show other bugs)
BRMS 5.3.0.GA
x86_64 Linux
unspecified Severity urgent
: ---
: ---
Assigned To: Kris Verlaenen
Radovan Synek
Depends On:
  Show dependency treegraph
Reported: 2012-06-18 05:24 EDT by kashi
Modified: 2018-06-09 17:28 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
error log (1.69 KB, application/octet-stream)
2012-06-18 05:24 EDT, kashi
no flags Details
my bpmn (8.37 KB, application/octet-stream)
2012-06-18 09:02 EDT, kashi
no flags Details
maven project - the reproducer (19.89 KB, application/zip)
2012-06-27 03:56 EDT, Radovan Synek
no flags Details

  None (edit)
Description kashi 2012-06-18 05:24:57 EDT
Created attachment 592569 [details]
error log

Description of problem:
Exception in thread "Thread-192" java.lang.RuntimeException: Unable to begin transaction and giving NPE
We have a simple process with start->First HT ->Second HT->end   and the localtaskservice has been used to call human tasks.
The process starts using api and first HT completes, howver at the end of the complete method it gives a nullpointer exception as attached.

Version-Release number of selected component (if applicable):

How reproducible:
1.Create the sample two HT process
2.create a ear file and ejb to process the jbpm methods like start 3.process,claim and complete task etc.
4.call ejb from servlets.
5.Deploy application on websphere using XA Db2 datasource.

Actual results:
It gives a error when NPE when it completes the first human task.

Expected results:
The process should execute bot the tasks and complete the process.

Additional info:
Comment 1 Zuzana Krejčová 2012-06-18 09:00:13 EDT
Could you please describe your process, perhaps attach it? It would help to know such things as - are those tasks skippable, are they assigned to a user, multiple users, or a group, what are the task names?
Comment 2 kashi 2012-06-18 09:02:31 EDT
Created attachment 592637 [details]
my bpmn
Comment 3 kashi 2012-06-19 01:53:17 EDT
Thes task is assigned to a user group and attached is the BPMN process.

The early solution on this would be appreciated.
Comment 4 kashi 2012-06-19 10:21:04 EDT
Hi All,
       When we added below change in our complete task in jbpm5 as below we are able to complete the process. The main change is 		workItemHandler.setLocal( true ); without it was calling some runnable thread and timeout.

	SyncWSHumanTaskHandler workItemHandler = new SyncWSHumanTaskHandler( taskService, session );
		workItemHandler.setLocal( true );
		session.getWorkItemManager().registerWorkItemHandler( "Human Task", workItemHandler );

In jbpm core , im not sure what the line does in runnable:-


private class TaskCompletedHandler extends AbstractBaseResponseHandler implements EventResponseHandler {


        public void execute(Payload payload) {

            TaskEvent event = ( TaskEvent ) payload.get();

            final long taskId = event.getTaskId();

            if (local) {


            } else {

                  Runnable runnable = new Runnable() {

                        public void run() {




                  new Thread(runnable).start();


        public boolean isRemove() {

            return false;

Comment 5 kashi 2012-06-19 10:22:11 EDT
Kindly can any one comment what could be the right approach for workItemHandler.setLocal( true );

secondly in WAS the EJB should be BMT.
Comment 6 Radovan Synek 2012-06-27 03:56:44 EDT
Created attachment 594708 [details]
maven project - the reproducer

Builds an .ear archive; deploy it on WAS (after small change in ProcessLauncher can be deployed on JBoss too). The web page shows whether the process was completed or not. For detailed information see the server log.
Comment 7 Radovan Synek 2012-06-27 04:07:01 EDT
As kashi stated, the problem is caused by handling the completed task in a new thread inside SyncWSHumanTaskHandler.TaskCompletedHandler, which can be disabled by setting the local flag: workItemHandler.setLocal(true);

On WAS, there is the described exception, deployed on JBoss the example behaves differently: process stays in the second task node because the task entity has not been written to the database yet and so there is no task to complete.

Note You need to log in before you can comment on or make changes to this bug.