Support Article
Getting Null Pointer Exception while closing the work item
SA-5126
Summary
An operator gets a Null Pointer Exception on screen when they close a work object having previously sorted the workbasket from which they opened it.
Error Messages
2014-09-21 09:45:13,103 [xxxxxxxxxx] [OpenPortal] [ xxxxxxxxxxxxxxx] (zUserIdentifier_Control.Stream) ERROR xx.xxx.xx.xxx|xx.xxx.xx.xxx| yyyyyyyyyyyyyy - Error in JSP execution
java.lang.NullPointerException
at com.pegarules.generated.html_property.ra_stream_pzuseridentifier_control_08666f48f87b2129f4abd99f39697994.execute(ra_stream_pzuseridentifier_control_08666f48f87b2129f4abd99f39697994.java:112)
at com.pega.pegarules.session.internal.mgmt.StreamBuilderTools.appendProperty(StreamBuilderTools.java:862)
at com.pegarules.generated.html.ra_stream_showmessage_b530c7d752b20efa34852e1b0a957722.execute(ra_stream_showmessage_b530c7d752b20efa34852e1b0a957722.java:194)
at com.pega.pegarules.session.internal.mgmt.Executable.getStream(Executable.java:3606)
at com.pega.pegarules.session.internal.mgmt.Executable.getStream(Executable.java:3467)
at com.pegarules.generated.activity.ra_action_showview_634e0323a784fd80bf31c12f04dce802.step3_circum0(ra_action_showview_634e0323a784fd80bf31c12f04dce802.java:466)
at com.pegarules.generated.activity.ra_action_showview_634e0323a784fd80bf31c12f04dce802.perform(ra_action_showview_634e0323a784fd80bf31c12f04dce802.java:106)
at com.pega.pegarules.session.internal.mgmt.Executable.doActivity(Executable.java:3098)
Steps to Reproduce
Steps to Replicate:-
1) Login to the manager portal (based on WorkManager in this case)
2) Go to the Process Work (Allocate of Resort Option)
3) Sort the Column and Select the Item
4) Close it from the Pega Cross button.
5) Null pointer error over the screen.
Root Cause
In the customer system the Work- PostCloseResponce HTML rule has been customised to return the operator to the screen that they were previously on when the work item is closed.
The value of the previous URL is recorded by a custom activity called captureURL.
In the case that the operator has sorted the workbasket it seems that the URL captured is not a valid one for displaying the workbasket list view. The URL being loaded is the activity used to sort the list view:
http://<server ip address>/prweb/PRServlet/XXXXXXXXXXXXXXXXXXXXXXXXXXXXX/!STANDARD?pyActivity=Rule-Obj-ListView.sortColumn
It seems then that the problem is with how this captureURL activity is operating, and it is capturing an unsuitable URL.
Resolution
Advised to debug the custom captureURL activity and add a pre-condition to ignore the URL when it is a reference to the sortColumn activity.
Published January 31, 2016 - Updated October 8, 2020
Have a question? Get answers now.
Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.