Support Article
Error in JSP execution for java.lang.NullPointerException
SA-8485
Summary
User gets a java.lang.NullPointerException when running custom JSP.
Error Messages
Error in JSP execution:
java.lang.NullPointerException
at com.pegarules.generated.html_section.ra_stream_mysection_bf7cd2354cc74b9f218c2ce6386382bc.execute(ra_stream_mySection_bf7cd2354cc74b9f218c2ce6386382bc.java:112)
Steps to Reproduce
Execute the command that generates the error.
Root Cause
The root cause of this problem is a defect in customer application code/rules.
Running the activity pyExtractCode with the parameter taken from the error message (com.pegarules.generated.html_section.ra_stream_mysection_bf7cd2354cc74b9f218c2ce6386382bc) User's code uses the method of an object (for example, myObject.myMethod()) without checking to see if the object is null.
Resolution
This issue is resolved through the following local-change:
Verify if the object is null before you attempt to execute one of its methods.
Published June 12, 2015 - 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.