Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.
SOLVED

Null pointer exception in the Product Asset Upload step.

Avatar

Level 4

I have a client that has some custom workflows. One uses mostly out of the box standard steps. One step is problematic and crashes every time. It is the standard "Product Asset Upload" step that uploads images to the dynamic media server.

The stack trace is as follows: 

java.lang.NullPointerException
    at com.adobe.granite.workflow.core.jcr.WorkItemManager.resolveTransition(WorkItemManager.java:540)
    at com.adobe.granite.workflow.core.jcr.WorkItemManager.getRoutes(WorkItemManager.java:304)
    at com.adobe.granite.workflow.core.WorkflowSessionImpl.getRoutes(WorkflowSessionImpl.java:728)
    at com.adobe.granite.workflow.core.job.JobHandler.getNextRouteToProcess(JobHandler.java:445)
    at com.adobe.granite.workflow.core.job.JobHandler.process(JobHandler.java:295)
    at org.apache.sling.event.impl.jobs.JobConsumerManager$JobConsumerWrapper.process(JobConsumerManager.java:512)
    at org.apache.sling.event.impl.jobs.queues.JobRunner.run(JobRunner.java:205)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:745)

 

Any ideas of what might be causing this? I leaves the workflow status in the "RUNNING" status but stops the execution of the workflow. I can terminate the workflows but there is another step after this one and I don't want to have to constantly manage the stale workflows.

 

Thanks in advance.

1 Accepted Solution

Avatar

Correct answer by
Level 4

I found the problem. We had modified the content.xml by removing a couple steps that we really didn't need but did not update the model.xml removing those steps from there and reordering the workflow. Thus when the model.xml was processed, it ran into a deleted step and didn't know where to go from there.

View solution in original post

2 Replies

Avatar

Correct answer by
Level 4

I found the problem. We had modified the content.xml by removing a couple steps that we really didn't need but did not update the model.xml removing those steps from there and reordering the workflow. Thus when the model.xml was processed, it ran into a deleted step and didn't know where to go from there.

Avatar

Level 10

Thanks for posting the solution!