AnsweredAssumed Answered

NullPointerException while running async tasks

Question asked by adi123 on May 14, 2018
Latest reply on May 23, 2018 by adi123

Hi,

 

All of my tasks are async but while running I get this error and execution stops for a while and then starts again.

I don't want this to happen.Also I am facing alot of issues while debugging my code because of this error.

How can I solve this?

 

 

2018-05-14 13:06:22.514 ERROR 19368 --- [TaskExecutor-26] o.a.e.impl.interceptor.CommandContext    : Error while closing command context

 

java.lang.NullPointerException: null

                at org.activiti.engine.impl.persistence.entity.JobEntityManagerImpl.delete(JobEntityManagerImpl.java:151) ~[activiti-engine-6.0.0.jar:6.0.0]

                at org.activiti.engine.impl.persistence.entity.JobEntityManagerImpl.delete(JobEntityManagerImpl.java:35) ~[activiti-engine-6.0.0.jar:6.0.0]

                at org.activiti.engine.impl.persistence.entity.AbstractEntityManager.delete(AbstractEntityManager.java:87) ~[activiti-engine-6.0.0.jar:6.0.0]

                at org.activiti.engine.impl.persistence.entity.JobEntityManagerImpl.delete(JobEntityManagerImpl.java:137) ~[activiti-engine-6.0.0.jar:6.0.0]

                at org.activiti.engine.impl.persistence.entity.JobEntityManagerImpl.delete(JobEntityManagerImpl.java:35) ~[activiti-engine-6.0.0.jar:6.0.0]

                at org.activiti.engine.impl.persistence.entity.AbstractEntityManager.delete(AbstractEntityManager.java:82) ~[activiti-engine-6.0.0.jar:6.0.0]

                at org.activiti.engine.impl.asyncexecutor.DefaultJobManager.unacquire(DefaultJobManager.java:230) ~[activiti-engine-6.0.0.jar:6.0.0]

                at org.activiti.engine.impl.asyncexecutor.ExecuteAsyncRunnable$3.execute(ExecuteAsyncRunnable.java:169) ~[activiti-engine-6.0.0.jar:6.0.0]

                at org.activiti.engine.impl.asyncexecutor.ExecuteAsyncRunnable$3.execute(ExecuteAsyncRunnable.java:167) ~[activiti-engine-6.0.0.jar:6.0.0]

                at org.activiti.engine.impl.interceptor.CommandInvoker$1.run(CommandInvoker.java:37) ~[activiti-engine-6.0.0.jar:6.0.0]

                at org.activiti.engine.impl.interceptor.CommandInvoker.executeOperation(CommandInvoker.java:78) ~[activiti-engine-6.0.0.jar:6.0.0]

                at org.activiti.engine.impl.interceptor.CommandInvoker.executeOperations(CommandInvoker.java:57) ~[activiti-engine-6.0.0.jar:6.0.0]

                at org.activiti.engine.impl.interceptor.CommandInvoker.execute(CommandInvoker.java:42) ~[activiti-engine-6.0.0.jar:6.0.0]

                at org.activiti.engine.impl.interceptor.TransactionContextInterceptor.execute(TransactionContextInterceptor.java:48) ~[activiti-engine-6.0.0.jar:6.0.0]

                at org.activiti.engine.impl.interceptor.CommandContextInterceptor.execute(CommandContextInterceptor.java:63) ~[activiti-engine-6.0.0.jar:6.0.0]

                at org.activiti.spring.SpringTransactionInterceptor$1.doInTransaction(SpringTransactionInterceptor.java:47) [activiti-spring-6.0.0.jar:6.0.0]

                at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:133) [spring-tx-4.3.7.RELEASE.jar:4.3.7.RELEASE]

                at org.activiti.spring.SpringTransactionInterceptor.execute(SpringTransactionInterceptor.java:45) [activiti-spring-6.0.0.jar:6.0.0]

                at org.activiti.engine.impl.interceptor.LogInterceptor.execute(LogInterceptor.java:29) [activiti-engine-6.0.0.jar:6.0.0]

                at org.activiti.engine.impl.cfg.CommandExecutorImpl.execute(CommandExecutorImpl.java:44) [activiti-engine-6.0.0.jar:6.0.0]

                at org.activiti.engine.impl.cfg.CommandExecutorImpl.execute(CommandExecutorImpl.java:39) [activiti-engine-6.0.0.jar:6.0.0]

                at org.activiti.engine.impl.asyncexecutor.ExecuteAsyncRunnable.unacquireJob(ExecuteAsyncRunnable.java:167) [activiti-engine-6.0.0.jar:6.0.0]

                at org.activiti.engine.impl.asyncexecutor.ExecuteAsyncRunnable.lockJobIfNeeded(ExecuteAsyncRunnable.java:154) [activiti-engine-6.0.0.jar:6.0.0]

                at org.activiti.engine.impl.asyncexecutor.ExecuteAsyncRunnable.run(ExecuteAsyncRunnable.java:72) [activiti-engine-6.0.0.jar:6.0.0]

                at java.lang.Thread.run(Thread.java:745) [na:1.8.0_73]

 

Thanks

Adi

Outcomes