Ask Questions and Find Answers
Important:
Ask is now read-only. You can review any existing questions and answers, but not add anything new.
But - don't panic! While ask is no more, we've replaced it with discuss - the new Liferay Discussion Forum! Read more here here or just visit the site here:
discuss.liferay.com
RE: Error at the moment of creating users
I'm creating users with a thread and I get the following exception. This is being implemented with an osgi module, does somebody know how to fix it?
java.lang.NullPointerException: null
at com.liferay.portal.kernel.servlet.HttpSessionWrapper.getId(HttpSessionWrapper.java:60) ~[portal-kernel.jar:?]
at com.liferay.portal.workflow.UserWorkflowHandler._updateAuditRequestThreadLocal(UserWorkflowHandler.java:122) ~[portal-impl.jar:?]
at com.liferay.portal.workflow.UserWorkflowHandler.updateStatus(UserWorkflowHandler.java:78) ~[portal-impl.jar:?]
at com.liferay.portal.workflow.UserWorkflowHandler.updateStatus(UserWorkflowHandler.java:40) ~[portal-impl.jar:?]
at com.liferay.portal.kernel.workflow.WorkflowHandler.updateStatus(WorkflowHandler.java:126) ~[portal-kernel.jar:?]
at com.liferay.portal.kernel.workflow.WorkflowHandlerRegistryUtil.startWorkflowInstance(WorkflowHandlerRegistryUtil.java:156) ~[portal-kernel.jar:?]
at com.liferay.portal.service.impl.UserLocalServiceImpl.addUserWithWorkflow(UserLocalServiceImpl.java:1341) ~[portal-impl.jar:?]
at com.liferay.portal.service.impl.UserLocalServiceImpl.addUser(UserLocalServiceImpl.java:941) ~[portal-impl.jar:?]
What's the exact version you're running on (to make sense of the stacktrace)?
Where is your code located? Is it within a request that's being handled? That's because apparently there's a ThreadLocal mentioned, and it might not be initialized if you're running in a thread that's not properly initialized - but that part of the stacktrace is omitted in your message (more lines would help).
Powered by Liferay™