Bug 779202 (SOA-1596) - NullPointerException in jbpm-console when viewing running process
Summary: NullPointerException in jbpm-console when viewing running process
Keywords:
Status: CLOSED NEXTRELEASE
Alias: SOA-1596
Deadline: 2010-03-08
Product: JBoss Enterprise SOA Platform 4
Classification: JBoss
Component: JBPM - within SOA, JBPM - standalone
Version: 4.3 CP01,4.3 CP02
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ---
: 4.3 CP04 ER1
Assignee: Alejandro Guizar
QA Contact:
URL: http://jira.jboss.org/jira/browse/SOA...
Whiteboard:
Depends On:
Blocks: SOA-1709
TreeView+ depends on / blocked
 
Reported: 2009-11-12 13:49 UTC by Toshiya Kobayashi
Modified: 2010-05-03 10:46 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-03-24 09:51:43 UTC
Type: Bug


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker SOA-1596 0 Major Closed NullPointerException in jbpm-console when viewing running process 2012-09-19 12:12:13 UTC

Description Toshiya Kobayashi 2009-11-12 13:49:48 UTC
Affects: Release Notes
Date of First Response: 2010-02-24 22:52:28
Help Desk Ticket Reference: https://enterprise.redhat.com/issue-tracker/363907
Workaround: Workaround Exists
Workaround Description: Modify jbpm-console.war/app/t_tokens.xhtml

<gd:sort source="#{token.availableTransitions}" target="#{transitions}" entryVar="e" argument="#{e.name}"/>

to

<gd:sort if="#{! empty token.availableTransitions}"  source="#{token.availableTransitions}" target="#{transitions}" entryVar="e" argument="#{e.name == null ? '' : e.name}"/>
project_key: SOA

When I access process instances through jbpm-console, ServletException is thrown.

Stack Trace:
14:17:38,640 ERROR [viewhandler] Error Rendering View[/app/procins.xhtml]
java.lang.NullPointerException
        at java.lang.String.compareTo(String.java:997)
        at java.lang.String.compareTo(String.java:90)
        at org.jboss.gravel.data.action.SortActionListener$ELComparator.compare(SortActionListener.java:144)
        at java.util.Arrays.mergeSort(Arrays.java:1284)
        at java.util.Arrays.sort(Arrays.java:1223)
        at java.util.Collections.sort(Collections.java:159)
        at org.jboss.gravel.data.action.SortActionListener.processAction(SortActionListener.java:83)
        at javax.faces.event.ActionEvent.processListener(ActionEvent.java:88)
        at javax.faces.component.UIComponentBase.broadcast(UIComponentBase.java:771)
        at javax.faces.component.UICommand.broadcast(UICommand.java:372)
        at org.jboss.gravel.action.handler.ResponseActionsHandler.onComponentPopulated(ResponseActionsHandler.java:24)
        at com.sun.facelets.tag.jsf.ComponentHandler.apply(ComponentHandler.java:180)
        at com.sun.facelets.tag.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:47)
...

processdefinition.xml:
<process-definition  xmlns="urn:jbpm.org:jpdl-3.2"  name="sample1">
        <start-state name="start-state1">
                <transition to="fork1"></transition>
        </start-state>
        <fork name="fork1">
                <transition to="state1"></transition>
                <transition to="state2" name="to state2"></transition>
        </fork>
        <state name="state1">
                <transition to="join1"></transition>
        </state>
        <state name="state2">
                <transition to="join1"></transition>
        </state>
        <join name="join1">
                <transition to="end-state1"></transition>
        </join>
        <end-state name="end-state1"></end-state>
</process-definition>

I see the same Exception with process definitions which have <fork> with  <state> , <task> or <node async="true">.

Procedure to reproduce:
- login to jbpm-console
- click [Examine] of the process definition
- click [Start] in the left pane 
- click [Tokens] in the left pane
- click [Signal] of the token

Comment 1 Toshiya Kobayashi 2009-11-12 13:52:13 UTC
Link: Added: This issue incorporates JBPM-1930


Comment 2 Jaroslaw Kijanowski 2009-12-11 13:10:08 UTC
Link: Added: This issue is a dependency of SOA-1709


Comment 3 Alejandro Guizar 2010-02-25 03:52:28 UTC
Resolving, project issue JBPM-1930 done.
Fix committed to https://svn.jboss.org/repos/jbpm/projects/jsf-console/branches/jsf-console-3.2-soa

Comment 5 Anne-Louise Tangring 2010-02-25 19:35:38 UTC
Approved for SOA 4.3 CP03.

Comment 6 David Le Sage 2010-03-14 23:46:44 UTC
Draft text for the Resolved Issues section of the Release Notes states:


https://jira.jboss.org/jira/browse/SOA-1591

    The org.jbpm.command.GetTaskListCommand.execute() would throw a
    JbpmPersistenceException exception if there were no pooled task instances for a given
    actor, even if that actor had been specifically assigned some. This occurred because a check for
    empty lists had been removed as it was no longer supported in JDK 1.4.

    A fix has been applied so that the software now checks
    TaskMgmtSession.findTaskInstancesByIds in order to determine whether or not the
    taskInstanceIds list is empty. As a result, the exception no longer occurs.


Comment 8 David Le Sage 2010-03-15 00:41:23 UTC
Sorry, Toshiya! ;-p 


The correct draft text for SOA-1596 is: 



https://jira.jboss.org/jira/browse/JBPM-1930 

    A java.lang.NullPointerException would be thrown when the user tried to access process 
    instances via the jBPM Console. This would happen because one of the transitions lacked a 
    name attribute. 

    To fix this issue, the software has been modified so that it now checks for a transition name of 
    "null" in the t_tokens.xhtml file. As a result, the page now displays as one would expect and 
    the exception does not occur. 


Comment 9 Martin Vecera 2010-03-24 09:51:43 UTC
Verified in 4.3.CP03 ER1

Comment 10 Martin Vecera 2010-05-03 10:46:03 UTC
Link: Added: This issue is incorporated by JBQA-3342



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