Support Article
NullPointerException on Property-Set
SA-48465
Summary
User configured an activity to refer the function @getStepPageReference to get the current step page.
Using the value returned by the function, a property-set is been performed on the same in other called activity and some times a NullPointerException is thrown during runtime at that particular step where property-set is configured.
Error Messages
java.lang.NullPointerException
Steps to Reproduce
1. Configure the activity to refer the function:
2. In the called activity -
Root Cause
Issue with the code generation at user end.
When TempPage.pyNote is used, generation code is for that step is -
findPageWithException("TempPage","SRor-SRTest-Work-Sample").getString( ".pyNote"),"sTN", false, true);
Resolution
Since the page referred in the property-set is already configured as a step page for the same, it is not required to use the page again while referring the property on the same page.
After removing the page when referring the property, that is .pyNote, the generated java for the same step is as below:
.getString(".pyNote"), "sTN", false, true); and hence there is no exception.
Published April 12, 2018 - 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.