cancel
Showing results for 
Search instead for 
Did you mean: 

java.lang.NullPointerException : null

romschn
Star Collaborator
Star Collaborator
Hi,

I have developed a custom advanced workflow using Activiti. I am using Alfresco 4.0 Share.

When I try to start a workflow, it is giving me the error - java.lang.NullPointerException : null in a pop-up. Admin user can start the workflow but no other user are able to start the workflow.

When I tried to analyze I found that formprocessor webscript when trying to submit the workflow form is returning 500 error. But as admin user is able to start the workflow, i assume that there is not a data issue.

Strange thing is that - on one alfresco instance it is working absolutely fine i.e. any user can start the workflow and it works fine. However, on other instance, it is not working, i.e. only admin user is able to start the workflow, no other users are able to start the workflow and are getting the nullpointer exception mentioned above in the popup.

It would be great if you could help me on this and give some pointers on this.

Thanks,
3 REPLIES 3

oleh
Champ in-the-making
Champ in-the-making
Have you looked at alfresco.log?

I've encountered simliar bugs while developing custom workflows, the symptoms are the same: Share will say it's a null pointer, but Alfresco has a full stacktrace.

Have a look and post it, along with the version you're using then I can probably point you in the right direction Smiley Happy

romschn
Star Collaborator
Star Collaborator
Hi,

In alfresco logs it was not mentioning anything except of the nullpointer exception.

However, I found what was going wrong.

This is fixed now for me. Actually, I had added few additional properties to OOTB user model through aspect in which one property was having type as d:text able to hold multiple values. It was not allowing to proceed me further and was giving me the null pointer error. For the specific user I was trying to start the workflow this property value was not required hence I made its value as blank (previously I was setting some value to this property) and it started allowing me to start the workflow.

It  looks like that if any property having multiple as true is present on the user metadata, it does not allow to start/assign the workflow to such user in this case.

Thanks,

oleh
Champ in-the-making
Champ in-the-making
Ahhh, you found the exact issue I reported some time ago:
https://forums.alfresco.com/en/viewtopic.php?f=5&t=45300

It has been fixed, but I'm not sure it's part of a release just yet:
https://issues.alfresco.com/jira/browse/ALF-14863

Unfortunately there's no workaround on this, so you'll either have to patch it manually or find another way around the multi-value issue.

It does however sound weird that you couldn't find a complete stacktrace in the alfresco log, there should be a lot of info.