Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1081525

Summary: NPE when I look at the comments of a task and complete the task
Product: [Retired] JBoss BPMS Platform 6 Reporter: Ivo Bek <ibek>
Component: Business CentralAssignee: Marco Rietveld <mrietvel>
Status: CLOSED EOL QA Contact: Ivo Bek <ibek>
Severity: high Docs Contact:
Priority: high    
Version: 6.0.1CC: kverlaen
Target Milestone: ER3   
Target Release: 6.1.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-03-27 20:08:35 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Ivo Bek 2014-03-27 14:08:23 UTC
Description of problem:

When I complete a task after I see comments, an error dialog is opened with NullPointerException. I used BPMS 6.0.1.CR2.

Could not commit session: java.lang.NullPointerException
	at org.jbpm.services.task.impl.TaskCommentServiceImpl.getAllCommentsByTaskId(TaskCommentServiceImpl.java:61) [jbpm-human-task-core-6.0.2-redhat-6.jar:6.0.2-redhat-6]
	at org.jbpm.services.task.commands.GetAllCommentsCommand.execute(GetAllCommentsCommand.java:28) [jbpm-human-task-core-6.0.2-redhat-6.jar:6.0.2-redhat-6]
	at org.jbpm.services.task.commands.GetAllCommentsCommand.execute(GetAllCommentsCommand.java:12) [jbpm-human-task-core-6.0.2-redhat-6.jar:6.0.2-redhat-6]
	at org.jbpm.services.task.commands.TaskCommandExecutorImpl$SelfExecutionCommandService.execute(TaskCommandExecutorImpl.java:65) [jbpm-human-task-core-6.0.2-redhat-6.jar:6.0.2-redhat-6]
	at org.drools.core.command.impl.AbstractInterceptor.executeNext(AbstractInterceptor.java:41) [drools-core-6.0.2-redhat-6.jar:6.0.2-redhat-6]
	at org.jbpm.services.task.persistence.TaskTransactionInterceptor.execute(TaskTransactionInterceptor.java:54) [jbpm-human-task-core-6.0.2-redhat-6.jar:6.0.2-redhat-6]
	at org.jbpm.services.task.commands.TaskCommandExecutorImpl.execute(TaskCommandExecutorImpl.java:40) [jbpm-human-task-core-6.0.2-redhat-6.jar:6.0.2-redhat-6]
	at org.jbpm.services.task.impl.command.CommandBasedTaskService.getAllCommentsByTaskId(CommandBasedTaskService.java:665) [jbpm-human-task-core-6.0.2-redhat-6.jar:6.0.2-redhat-6]
	at org.jbpm.console.ng.ht.backend.server.TaskServiceEntryPointImpl.getAllCommentsByTaskId(TaskServiceEntryPointImpl.java:488) [jbpm-console-ng-human-tasks-backend-6.0.2-redhat-6.jar:6.0.2-redhat-6]
	at org.jbpm.console.ng.ht.backend.server.TaskServiceEntryPointImpl$Proxy$_$$_WeldClientProxy.getAllCommentsByTaskId(TaskServiceEntryPointImpl$Proxy$_$$_WeldClientProxy.java) [jbpm-console-ng-human-tasks-backend-6.0.2-redhat-6.jar:6.0.2-redhat-6]

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


How reproducible:


Steps to Reproduce:
1. Create a process with single human task
2. Start the process
3. Look at the task details in tasks list
4. Click on "Comments" button in the menu of task details.
5. Start the task.
6. Complete the task.
7. See the error dialog and NullPointerException in the server log.

Actual results:


Expected results:


Additional info:

Comment 1 Mauricio Salatino 2014-04-03 09:20:41 UTC
Ok this will only happen if you have a process with a single task or with the last task of the process, because the process instance and the task are erased from the database on completion. 

I've added the null check in the human task core code and it is fixed in 6.0.x: http://github.com/droolsjbpm/jbpm/commit/923896aa1

Comment 2 Ivo Bek 2014-04-29 14:23:44 UTC
Mauricio, it does not seem to be fixed in BPMS 6.0.2.ER2. I do not have any errors in the server log but the dialog error window will appear when I finish the task for which I looked at the comments.

Comment 3 Kris Verlaenen 2014-11-03 19:25:06 UTC
*** Bug 1144412 has been marked as a duplicate of this bug. ***

Comment 4 Mauricio Salatino 2014-11-21 12:35:00 UTC
The issue is not anymore on 6.2.x, it was fixed as part of the refactoring of the panels, and for that reason there is no single commit about this specific bug. 
It needs to be retested.

Comment 5 Ivo Bek 2014-12-17 14:14:07 UTC
Verified in BPMS 6.1.0.ER3

Comment 6 PnT Account Manager 2017-12-07 23:35:13 UTC
Employee 'msalatin' has left the company.