cancel
Showing results for 
Search instead for 
Did you mean: 

Timer Intermediate Catching Event cause NullPointerException

jones_wang
Champ in-the-making
Champ in-the-making
Exception in thread "pool-1-thread-3" java.lang.NullPointerException
   at org.activiti.engine.impl.jobexecutor.TimerCatchIntermediateEventJobHandler.execute(TimerCatchIntermediateEventJobHandler.java:35)
   at org.activiti.engine.impl.persistence.entity.JobEntity.execute(JobEntity.java:79)
   at org.activiti.engine.impl.persistence.entity.TimerEntity.execute(TimerEntity.java:62)
   at org.activiti.engine.impl.cmd.ExecuteJobsCmd.execute(ExecuteJobsCmd.java:70)
   at org.activiti.engine.impl.interceptor.CommandExecutorImpl.execute(CommandExecutorImpl.java:24)
   at org.activiti.engine.impl.interceptor.CommandContextInterceptor.execute(CommandContextInterceptor.java:61)
   at org.activiti.spring.SpringTransactionInterceptor$1.doInTransaction(SpringTransactionInterceptor.java:42)
   at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:130)
   at org.activiti.spring.SpringTransactionInterceptor.execute(SpringTransactionInterceptor.java:40)
   at org.activiti.engine.impl.interceptor.LogInterceptor.execute(LogInterceptor.java:31)
   at org.activiti.engine.impl.jobexecutor.ExecuteJobsRunnable.run(ExecuteJobsRunnable.java:46)
   at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
   at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
   at java.lang.Thread.run(Thread.java:662)
5 REPLIES 5

frederikherema1
Star Contributor
Star Contributor
Seems like no process definition ID is associated to the execution, which is really odd. Do you have a simple test-case for this issue? (see sticky on forum how to create unit-test)

lsmall
Champ in-the-making
Champ in-the-making
I have an example that can recreate this issue. I am new to Activiti, so I was not sure if this user had already posted an example in Jira which I have not used yet. What did you mean by "see sticky on forum"? Also, I have noticed process images posted on this site, but was not sure how to attach an image, can you advise?

lsmall
Champ in-the-making
Champ in-the-making
Our proprietary workflow implementation supports quartz-based timers and we allow designers to specify a time (when the timer fires) as well as a repeat cycle. So, I have a Review task that has a boundary timer event that fires after 3 min (PT3M). I added 2 transitions, one to a mail task and the other to an intermediate timer event that repeats twice every 2 mins. I get the first email after 3 min as expected as well as the second email 2 mins later, but the second firing of the intermediate timer event generates a NPE and the intermediate timer and its transition stay active in the Activiti Explorer instance view. See attached process template for details.

lsmall
Champ in-the-making
Champ in-the-making
I have a JIRA account, so I will open an issue in codehaus.

lsmall
Champ in-the-making
Champ in-the-making