NullPointerException while executing async service tasks

cancel
Showing results for 
Search instead for 
Did you mean: 
moskalap
Member II

NullPointerException while executing async service tasks

Jump to solution

I am trying to execute following process:

[XML] <definitions xmlns="http://www.omg.org/s - Pastebin.com 

and all of those service tasks are being finished, but at the end the main process crashes with following exception:

2:17:10,644 ERROR [org.activiti.engine.impl.asyncexecutor.ExecuteAsyncRunnable] (pool-8-thread-2) Job 927744 failed: java.lang.NullPointerException
    at org.activiti.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:96)
    at org.activiti.engine.impl.jobexecutor.AsyncContinuationJobHandler.execute(AsyncContinuationJobHandler.java:35)
    at org.activiti.engine.impl.persistence.entity.JobEntity.execute(JobEntity.java:85)
    at org.activiti.engine.impl.persistence.entity.MessageEntity.execute(MessageEntity.java:34)
    at org.activiti.engine.impl.cmd.ExecuteAsyncJobCmd.execute(ExecuteAsyncJobCmd.java:52)
    at org.activiti.engine.impl.interceptor.CommandInvoker.execute(CommandInvoker.java:24)
    at org.activiti.engine.impl.interceptor.CommandContextInterceptor.execute(CommandContextInterceptor.java:57)
    at org.activiti.spring.SpringTransactionInterceptor$1.doInTransaction(SpringTransactionInterceptor.java:47)
    at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:133)
    at org.activiti.spring.SpringTransactionInterceptor.execute(SpringTransactionInterceptor.java:45)
    at org.activiti.engine.impl.interceptor.LogInterceptor.execute(LogInterceptor.java:31)
    at org.activiti.engine.impl.cfg.CommandExecutorImpl.execute(CommandExecutorImpl.java:40)
    at org.activiti.engine.impl.cfg.CommandExecutorImpl.execute(CommandExecutorImpl.java:35)
    at org.activiti.engine.impl.asyncexecutor.ExecuteAsyncRunnable.run(ExecuteAsyncRunnable.java:69)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)

Is this XML correct? How to fix this NP issue?

1 Solution

Accepted Solutions
moskalap
Member II

Re: NullPointerException while executing async service tasks

Jump to solution

I solved the problem by adding parallel gateways before and after my asyncrhonous service tasks.

View solution in original post

1 Reply
moskalap
Member II

Re: NullPointerException while executing async service tasks

Jump to solution

I solved the problem by adding parallel gateways before and after my asyncrhonous service tasks.