Null Pointer Exceptions from Workflow Related URLs
We've created a new instance of CQ and wanted it to mirror another already existing instance. We packaged /apps, /etc/designs, and /etc/workflow in the old instance and installed it in the new instance. Everything seemed to be going well but we've found that whenever a url is hit that tries to use the WorkflowSessionFactory class, it throws a null pointer exception. This doesn't happen with the admin user account, everything works fine. Even if i create a new user and give it access to everything, the URLs will fail (i'm assuming because it isn't a super user). What would cause this method to throw a null pointer? I've listed examples below -
(From a content page)
/libs/wcm/core/content/pageinfo.json?path=/content
org.apache.sling.engine.impl.SlingRequestProcessorImpl service: Uncaught Throwable java.lang.NullPointerException at com.adobe.granite.workflow.core.WorkflowSessionFactory.isSuperUser(WorkflowSessionFactory.java:278) at com.adobe.granite.workflow.core.WorkflowSessionFactory.getWorkflowSession(WorkflowSessionFactory.java:304) at com.adobe.granite.workflow.core.WorkflowSessionFactory.getAdapter(WorkflowSessionFactory.java:435) at org.apache.sling.adapter.internal.AdapterManagerImpl.getAdapter(AdapterManagerImpl.java:140) at com.day.cq.workflow.impl.CQWorkflowService.getWorkflowSession(CQWorkflowService.java:148) at com.day.cq.wcm.core.impl.DefaultPageStatusProvider.updatePageInfo(DefaultPageStatusProvider.java:146) at com.day.cq.wcm.core.impl.servlets.PageInfoServlet.doGet(PageInfoServlet.java:187)
(From the workflow console)
/libs/cq/workflow/content/console/instances.json
Caused by: java.lang.NullPointerException at com.adobe.granite.workflow.core.WorkflowSessionFactory.isSuperUser(WorkflowSessionFactory.java:278) at com.adobe.granite.workflow.core.WorkflowSessionFactory.getWorkflowSession(WorkflowSessionFactory.java:304) at com.adobe.granite.workflow.core.WorkflowSessionFactory.getAdapter(WorkflowSessionFactory.java:435) at org.apache.sling.adapter.internal.AdapterManagerImpl.getAdapter(AdapterManagerImpl.java:140) at com.day.cq.workflow.impl.CQWorkflowService.getWorkflowSession(CQWorkflowService.java:148) at org.apache.jsp.libs.cq.workflow.components.console.instances.json_jsp._jspService(json_jsp.java:134)
(Also from workflow console)
/libs/cq/workflow/content/console/archive.json
Caused by: java.lang.NullPointerException at com.adobe.granite.workflow.core.WorkflowSessionFactory.isSuperUser(WorkflowSessionFactory.java:278) at com.adobe.granite.workflow.core.WorkflowSessionFactory.getWorkflowSession(WorkflowSessionFactory.java:304) at com.adobe.granite.workflow.core.WorkflowSessionFactory.getAdapter(WorkflowSessionFactory.java:435) at org.apache.sling.adapter.internal.AdapterManagerImpl.getAdapter(AdapterManagerImpl.java:140) at com.day.cq.workflow.impl.CQWorkflowService.getWorkflowSession(CQWorkflowService.java:148) at org.apache.jsp.libs.cq.workflow.components.console.archive.json_jsp._jspService(json_jsp.java:129)
I don't think there is anything wrong with the nodes, as everything works as expected for admin. But it doesn't seem like a permissions problem because the user i created with all permissions still didn't work.
Thanks