AnsweredAssumed Answered

NPE - JobEntityManagerImpl.delete(JobEntityManagerImpl.java:35) ~[activiti-engine-6.0.0.jar!/:6.0.0

Question asked by markcmueller on Sep 29, 2017
Latest reply on May 14, 2018 by lovik

We are consistently getting an NPE when running an application with all async tasks.  The errors only occur when a step is run by a SimpleAsyncTaskExecutor.  Any idea what could be causing the errors?

 

Here is the stack trace:

 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.interceptor.TransactionContextInterceptor.execute(TransactionContextInterceptor.java:48) ~[activiti-engine-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:39) [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]
 ERR  at org.activiti.engine.impl.persistence.entity.AbstractEntityManager.delete(AbstractEntityManager.java:87)
 ERR  at org.activiti.engine.impl.persistence.entity.JobEntityManagerImpl.delete(JobEntityManagerImpl.java:35)
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.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.asyncexecutor.ExecuteAsyncRunnable$3.execute(ExecuteAsyncRunnable.java:167) ~[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.spring.SpringTransactionInterceptor$1.doInTransaction(SpringTransactionInterceptor.java:47) [activiti-spring-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.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.interceptor.CommandInvoker.execute(CommandInvoker.java:42) ~[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]
 ERR  at org.activiti.engine.impl.persistence.entity.JobEntityManagerImpl.delete(JobEntityManagerImpl.java:35)
 ERR  at org.activiti.engine.impl.asyncexecutor.ExecuteAsyncRunnable$3.execute(ExecuteAsyncRunnable.java:169)
 ERR  at org.activiti.engine.impl.interceptor.CommandInvoker$1.run(CommandInvoker.java:37)
 ERR  at org.activiti.engine.impl.interceptor.CommandInvoker.executeOperation(CommandInvoker.java:78)
2017-09-29 12:43:48.232 ERROR 11 --- [TaskExecutor-26] o.a.e.impl.interceptor.CommandContext    : Error while closing command context
 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.executeOperations(CommandInvoker.java:57) ~[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.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:133) [spring-tx-4.3.7.RELEASE.jar!/:4.3.7.RELEASE]
 at java.lang.Thread.run(Thread.java:748) [na:1.8.0_131]
 ERR  at org.activiti.engine.impl.persistence.entity.JobEntityManagerImpl.delete(JobEntityManagerImpl.java:151)
 ERR  at org.activiti.engine.impl.persistence.entity.AbstractEntityManager.delete(AbstractEntityManager.java:82)
 ERR  at org.activiti.engine.impl.asyncexecutor.DefaultJobManager.unacquire(DefaultJobManager.java:230)
 ERR  at org.activiti.engine.impl.asyncexecutor.ExecuteAsyncRunnable$3.execute(ExecuteAsyncRunnable.java:167)
 ERR  at org.activiti.engine.impl.interceptor.CommandInvoker.executeOperations(CommandInvoker.java:57)
 ERR  at org.activiti.engine.impl.interceptor.CommandContextInterceptor.execute(CommandContextInterceptor.java:63)
 ERR  at org.activiti.engine.impl.asyncexecutor.ExecuteAsyncRunnable.run(ExecuteAsyncRunnable.java:72)
 at org.activiti.spring.SpringTransactionInterceptor.execute(SpringTransactionInterceptor.java:45) [activiti-spring-6.0.0.jar!/:6.0.0]
 ERR Exception in thread "SimpleAsyncTaskExecutor-26" java.lang.NullPointerException
 ERR  at org.activiti.engine.impl.persistence.entity.JobEntityManagerImpl.delete(JobEntityManagerImpl.java:137)
 at org.activiti.engine.impl.asyncexecutor.ExecuteAsyncRunnable.run(ExecuteAsyncRunnable.java:72) [activiti-engine-6.0.0.jar!/:6.0.0]
 ERR  at org.activiti.engine.impl.interceptor.CommandInvoker.execute(CommandInvoker.java:42)
 ERR  at org.activiti.spring.SpringTransactionInterceptor$1.doInTransaction(SpringTransactionInterceptor.java:47)
 ERR  at org.activiti.spring.SpringTransactionInterceptor.execute(SpringTransactionInterceptor.java:45)
 ERR  at org.activiti.engine.impl.cfg.CommandExecutorImpl.execute(CommandExecutorImpl.java:44)
 ERR  at org.activiti.engine.impl.asyncexecutor.ExecuteAsyncRunnable.unacquireJob(ExecuteAsyncRunnable.java:167)
 ERR  at org.activiti.engine.impl.asyncexecutor.ExecuteAsyncRunnable.lockJobIfNeeded(ExecuteAsyncRunnable.java:154)
 ERR  at org.activiti.engine.impl.interceptor.TransactionContextInterceptor.execute(TransactionContextInterceptor.java:48)
 ERR  at org.activiti.engine.impl.interceptor.LogInterceptor.execute(LogInterceptor.java:29)
 ERR  at java.lang.Thread.run(Thread.java:748)
 ERR  at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:133)
 ERR  at org.activiti.engine.impl.cfg.CommandExecutorImpl.execute(CommandExecutorImpl.java:39)

 

   Mark

Outcomes