Hi
While trying to run a custom workflow AEM 6.5 sp13 I am getting
Solved! Go to Solution.
Views
Replies
Total Likes
As i already mentioned, Check your Hashtable.java:475, the error occurs at line 475 in the Hashtable class, specifically in the put() method. It seems that a null value is being passed to the put() method, causing the exception. Debugging the code and inspecting the relevant variables at runtime may help pinpoint the root cause of the issue.
Hi @tasunil1 ,
The exception java.lang.NullPointerException indicates that a null value was encountered where it was not expected. In this specific case, the exception is being thrown at the line java.util.Hashtable.put(Hashtable.java:475), which suggests that there is an issue with adding a value to a Hashtable. Also the stack trace shows that the exception is being triggered within the com.adobe.granite.workflow.core.event.EventPublishUtil.publishWorkflowStartedEvent method, which is responsible for publishing events related to workflow start.
Hello @MayurSatav ,
The null pointer was understandable that it is failing to put data related to workflow start, but to clear out more what exactly is it failing at, what detail to pin point ?
As i already mentioned, Check your Hashtable.java:475, the error occurs at line 475 in the Hashtable class, specifically in the put() method. It seems that a null value is being passed to the put() method, causing the exception. Debugging the code and inspecting the relevant variables at runtime may help pinpoint the root cause of the issue.
Hi @tasunil1 ,
Start the debugger in your local, put debugger point at line number 159 in EventPublishUtil.java. There should be some object which is null and some operation is being performed on the same object.
Also, please use Optional wherever applicable instead of handling NullPointerException.
Thanks,
Ritesh Mittal
Hi @MayurSatav & @Ritesh_Mittal
This means i would need to debug granite code. Thanks
You are not reading correctly the log, the exception is thrown in java.util.Hashtable.put(Hashtable.java:475) but there is a stack behind that, if you read the log downwards you will find which class/action is initiating the action that ultimately will cause a NULLPOINTER in granite code.
With the couple of lines you have provided it is not possible to see what is the real issue initiator if that makes sense.
I recommend checking how to read logs here: https://stackoverflow.com/questions/12688068/how-to-read-and-understand-the-java-stack-trace
Hi @EstebanBustamante ,
I tried as much I could do
instance.getworkflowmodel().gettitle() is null even when the title is there in the model