Legacy Async Exception

I am facing unexpected NPE issues in Camunda Code at isAsync() method in LegacyBehaviour.java

It is happening randomly at different activities like when call activity completes or long running service task ends.

Call is coming from JobEntity class via AsyncContinuationJobHandler.java class in execute()

I have been able to debug the code and found that in that execution, activity id is null there and when i check database, it reflects same for that executionId.

Please help me here to resolve the issue.

Camunda Version ( 7.12)
Database: postgres, 42.2.12
Server: Springboot and tomcat 9.0.33
Nothing changed in setup…its fresh installation.
Its not consistent but its quite often.
Pls find attached bpmns. dt_bng_junos_upgrade_parallel is the root process definition
dt_bng_backup_data.bpmn (11.9 KB) dt_bng_iceaaa_upgrade.bpmn (32.9 KB) dt_bng_image_upgrade.bpmn (30.8 KB) dt_bng_image_upload.bpmn (49.3 KB) dt_bng_junos_upgrade.bpmn (73.8 KB) dt_bng_junos_upgrade_parallel.bpmn (8.7 KB) dt_bng_memory_check.bpmn (18.6 KB) dt_bng_swim_postchecks.bpmn (13.0 KB) dt_bng_swim_prepostchecks.bpmn (101.8 KB) dt_bng_transient_config.bpmn (23.8 KB)

StackTrace:
java.lang.NullPointerException at org.camunda.bpm.engine.impl.pvm.runtime.LegacyBehavior.isAsync(LegacyBehavior.java:540}
at org.camunda.bpm.engine.impl.pvm.runtime.LegacyBehavior.repairMultiInstanceAsyncJob(LegacyBehavior.java:569}
at org.camunda.bpm.engine.impl.jobexecutor.AsyncContinuationJobHandler.execute(AsyncContinuationJobHandler.java:67}
at com.anuta.atom.workflow.async.CustomAsyncContinuationJobHandler.execute(CustomAsyncContinuationJobHandler.java:35}
at com.anuta.atom.workflow.async.CustomAsyncContinuationJobHandler.execute(CustomAsyncContinuationJobHandler.java:23}
at org.camunda.bpm.engine.impl.persistence.entity.JobEntity.execute(JobEntity.java:125}
at org.camunda.bpm.engine.impl.cmd.ExecuteJobsCmd.execute(ExecuteJobsCmd.java:109}
at org.camunda.bpm.engine.impl.cmd.ExecuteJobsCmd.execute(ExecuteJobsCmd.java:42}
at org.camunda.bpm.engine.impl.interceptor.CommandExecutorImpl.execute(CommandExecutorImpl.java:28}
at org.camunda.bpm.engine.impl.interceptor.CommandContextInterceptor.execute(CommandContextInterceptor.java:110}
at org.camunda.bpm.engine.spring.SpringTransactionInterceptor$1.doInTransaction(SpringTransactionInterceptor.java:46}
at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:140}
at org.camunda.bpm.engine.spring.SpringTransactionInterceptor.execute(SpringTransactionInterceptor.java:44}
at org.camunda.bpm.engine.impl.interceptor.ProcessApplicationContextInterceptor.execute(ProcessApplicationContextInterceptor.java:70}
at org.camunda.bpm.engine.impl.interceptor.LogInterceptor.execute(LogInterceptor.java:33}
at org.camunda.bpm.engine.impl.jobexecutor.ExecuteJobHelper.executeJob(ExecuteJobHelper.java:57}
at org.camunda.bpm.engine.impl.jobexecutor.ExecuteJobsRunnable.run(ExecuteJobsRunnable.java:71}
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149}
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624}
at java.lang.Thread.run(Thread.java:748}

CustomAsyncContinuationJobHandler.java is same as posted in the topic:Error on async after

Hi @gumang - sounds like it might be a good idea to create a JIRA ticket for this so that we can work out if it’s a bug or not. If you like you can then post a link to the ticket here

I have created the jira as u asked
https://jira.camunda.com/browse/CAM-12037

1 Like

One more observation is that when these async points exceptions are seen, for those exceptions, act_id in ACT_RU_EXECUTION table is also empty and data is there in act_inst_id.
May be if we figure out when this happen, it can give some clue