12-21-2017 07:48 PM
Hi Team,
I have a timer task in my workflow. But sometime I am seeing NPE being thrown from Timer Event. Below is stacktrace of error. This is not coming always. Below is my timer event xml. Due to this error my workflow is ended abruptly, and it has moved to history table. When I check in ACT_HI_PROCINST table for my PROC_INST_ID_, I see value of END_TIME_ is NULL.
<intermediateCatchEvent id="restoreTimer" name="Restore Timer">
<documentation>This is a timer task which will keep checking for restore progress.</documentation>
<timerEventDefinition>
<timeCycle>R/PT1M</timeCycle>
</timerEventDefinition>
</intermediateCatchEvent>
java.lang.NullPointerException: null
at org.activiti.engine.impl.jobexecutor.TimerCatchIntermediateEventJobHandler.execute(TimerCatchIntermediateEventJobHandler.java:43) ~[activiti-engine-5.19.0.2.jar!/:5.19.0.2]
at org.activiti.engine.impl.persistence.entity.JobEntity.execute(JobEntity.java:85) ~[activiti-engine-5.19.0.2.jar!/:5.19.0.2]
at org.activiti.engine.impl.persistence.entity.TimerEntity.execute(TimerEntity.java:95) ~[activiti-engine-5.19.0.2.jar!/:5.19.0.2]
at org.activiti.engine.impl.cmd.ExecuteAsyncJobCmd.execute(ExecuteAsyncJobCmd.java:52) ~[activiti-engine-5.19.0.2.jar!/:5.19.0.2]
at org.activiti.engine.impl.interceptor.CommandInvoker.execute(CommandInvoker.java:24) ~[activiti-engine-5.19.0.2.jar!/:5.19.0.2]
at org.activiti.engine.impl.interceptor.CommandContextInterceptor.execute(CommandContextInterceptor.java:57) ~[activiti-engine-5.19.0.2.jar!/:5.19.0.2]
at org.activiti.spring.SpringTransactionInterceptor$1.doInTransaction(SpringTransactionInterceptor.java:47) ~[activiti-spring-5.19.0.2.jar!/:5.19.0.2]
at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:133) ~[spring-tx-4.2.4.RELEASE.jar!/:4.2.4.RELEASE]
at org.activiti.spring.SpringTransactionInterceptor.execute(SpringTransactionInterceptor.java:45) ~[activiti-spring-5.19.0.2.jar!/:5.19.0.2]
at org.activiti.engine.impl.interceptor.LogInterceptor.execute(LogInterceptor.java:31) ~[activiti-engine-5.19.0.2.jar!/:5.19.0.2]
at org.activiti.engine.impl.cfg.CommandExecutorImpl.execute(CommandExecutorImpl.java:40) ~[activiti-engine-5.19.0.2.jar!/:5.19.0.2]
at org.activiti.engine.impl.cfg.CommandExecutorImpl.execute(CommandExecutorImpl.java:35) ~[activiti-engine-5.19.0.2.jar!/:5.19.0.2]
at org.activiti.engine.impl.asyncexecutor.ExecuteAsyncRunnable.executeJob(ExecuteAsyncRunnable.java:96) [activiti-engine-5.19.0.2.jar!/:5.19.0.2]
at org.activiti.engine.impl.asyncexecutor.ExecuteAsyncRunnable.run(ExecuteAsyncRunnable.java:50) [activiti-engine-5.19.0.2.jar!/:5.19.0.2]
at java.lang.Thread.run(Thread.java:745) [na:1.8.0_77]
Is there a way to handle this kind of exception?
Regards.
12-27-2017 10:46 AM
I noticed that you are using version 5.19.0. Could you please upgrade to latest version on 5.x branch which is 5.22.0 or or even version 6 and check if it is happening in newer versions. While checking release notes, I can see that in version 5.21 there was a fix stating "It fixes some cases where the end time was not set for activities in a process definition under certain conditions." See Release Activiti 5.21.0 · Activiti/Activiti · GitHub for more details. Hopefully your issue is already addressed in newer versions!
Ciju
12-27-2017 10:46 AM
I noticed that you are using version 5.19.0. Could you please upgrade to latest version on 5.x branch which is 5.22.0 or or even version 6 and check if it is happening in newer versions. While checking release notes, I can see that in version 5.21 there was a fix stating "It fixes some cases where the end time was not set for activities in a process definition under certain conditions." See Release Activiti 5.21.0 · Activiti/Activiti · GitHub for more details. Hopefully your issue is already addressed in newer versions!
Ciju
12-31-2017 06:59 PM
Hi Ciju,
Thank you for response, I will try latest version and let you know if it's fixed or not.
Regards.
Explore our Alfresco products with the links below. Use labels to filter content by product module.