-
Bug Report
-
Resolution: Won't Fix
-
L3 - Default
-
None
-
None
-
None
Environment (Required on creation):
Camunda v7.14.0
Description (Required on creation; please attach any relevant screenshots, stacktraces, log files, etc. to the ticket):
The null pointer exception in the following stack trace is not related to the process application code it is occurring at when called from a task listener:
11-Jun-2021 10:27:42.997 SEVERE [pool-2-thread-2] org.camunda.commons.logging.BaseLogger.logError ENGINE-16004 Exception while closing command context: ENGINE-03051 There was an exception while invoking the TaskListener. Message: 'Exception while invoking TaskListener: null' org.camunda.bpm.engine.ProcessEngineException: ENGINE-03051 There was an exception while invoking the TaskListener. Message: 'Exception while invoking TaskListener: null' at org.camunda.bpm.engine.impl.db.EnginePersistenceLogger.invokeTaskListenerException(EnginePersistenceLogger.java:451) at org.camunda.bpm.engine.impl.persistence.entity.TaskEntity.invokeListener(TaskEntity.java:1076) at org.camunda.bpm.engine.impl.persistence.entity.TaskEntity.triggerTimeoutEvent(TaskEntity.java:1200) at org.camunda.bpm.engine.impl.jobexecutor.TimerTaskListenerJobHandler.execute(TimerTaskListenerJobHandler.java:48) at org.camunda.bpm.engine.impl.jobexecutor.TimerTaskListenerJobHandler.execute(TimerTaskListenerJobHandler.java:30) at org.camunda.bpm.engine.impl.persistence.entity.JobEntity.execute(JobEntity.java:133) at org.camunda.bpm.engine.impl.cmd.ExecuteJobsCmd.execute(ExecuteJobsCmd.java:110) at org.camunda.bpm.engine.impl.cmd.ExecuteJobsCmd.execute(ExecuteJobsCmd.java:43) 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.impl.interceptor.ProcessApplicationContextInterceptor.execute(ProcessApplicationContextInterceptor.java:70) at org.camunda.bpm.engine.impl.interceptor.CommandCounterInterceptor.execute(CommandCounterInterceptor.java:35) 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.executeJob(ExecuteJobsRunnable.java:110) at org.camunda.bpm.engine.impl.jobexecutor.ExecuteJobsRunnable.run(ExecuteJobsRunnable.java:71) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) at java.base/java.lang.Thread.run(Thread.java:834) Caused by: org.camunda.bpm.engine.ProcessEngineException: Exception while invoking TaskListener: null at org.camunda.bpm.engine.impl.task.listener.ClassDelegateTaskListener.notify(ClassDelegateTaskListener.java:53) at org.camunda.bpm.engine.impl.task.delegate.TaskListenerInvocation.invoke(TaskListenerInvocation.java:45) at org.camunda.bpm.engine.impl.delegate.DelegateInvocation.proceed(DelegateInvocation.java:58) at org.camunda.bpm.engine.impl.delegate.DefaultDelegateInterceptor.handleInvocationInContext(DefaultDelegateInterceptor.java:92) at org.camunda.bpm.engine.impl.delegate.DefaultDelegateInterceptor.handleInvocation(DefaultDelegateInterceptor.java:63) at org.camunda.bpm.engine.impl.persistence.entity.TaskEntity.invokeListener(TaskEntity.java:1090) at org.camunda.bpm.engine.impl.persistence.entity.TaskEntity.invokeListener(TaskEntity.java:1070) ... 17 more Caused by: java.lang.NullPointerException 11-Jun-2021 10:27:43.008 WARNING [pool-2-thread-2] org.camunda.commons.logging.BaseLogger.logWarn ENGINE-14006 Exception while executing job ec162621-ca9e-11eb-8aee-0242ac120003: org.camunda.bpm.engine.ProcessEngineException: ENGINE-03051 There was an exception while invoking the TaskListener. Message: 'Exception while invoking TaskListener: null' at org.camunda.bpm.engine.impl.db.EnginePersistenceLogger.invokeTaskListenerException(EnginePersistenceLogger.java:451) at org.camunda.bpm.engine.impl.persistence.entity.TaskEntity.invokeListener(TaskEntity.java:1076) at org.camunda.bpm.engine.impl.persistence.entity.TaskEntity.triggerTimeoutEvent(TaskEntity.java:1200) at org.camunda.bpm.engine.impl.jobexecutor.TimerTaskListenerJobHandler.execute(TimerTaskListenerJobHandler.java:48) at org.camunda.bpm.engine.impl.jobexecutor.TimerTaskListenerJobHandler.execute(TimerTaskListenerJobHandler.java:30) at org.camunda.bpm.engine.impl.persistence.entity.JobEntity.execute(JobEntity.java:133) at org.camunda.bpm.engine.impl.cmd.ExecuteJobsCmd.execute(ExecuteJobsCmd.java:110) at org.camunda.bpm.engine.impl.cmd.ExecuteJobsCmd.execute(ExecuteJobsCmd.java:43) 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.impl.interceptor.ProcessApplicationContextInterceptor.execute(ProcessApplicationContextInterceptor.java:70) at org.camunda.bpm.engine.impl.interceptor.CommandCounterInterceptor.execute(CommandCounterInterceptor.java:35) 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.executeJob(ExecuteJobsRunnable.java:110) at org.camunda.bpm.engine.impl.jobexecutor.ExecuteJobsRunnable.run(ExecuteJobsRunnable.java:71) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) at java.base/java.lang.Thread.run(Thread.java:834) Caused by: org.camunda.bpm.engine.ProcessEngineException: Exception while invoking TaskListener: null at org.camunda.bpm.engine.impl.task.listener.ClassDelegateTaskListener.notify(ClassDelegateTaskListener.java:53) at org.camunda.bpm.engine.impl.task.delegate.TaskListenerInvocation.invoke(TaskListenerInvocation.java:45) at org.camunda.bpm.engine.impl.delegate.DelegateInvocation.proceed(DelegateInvocation.java:58) at org.camunda.bpm.engine.impl.delegate.DefaultDelegateInterceptor.handleInvocationInContext(DefaultDelegateInterceptor.java:92) at org.camunda.bpm.engine.impl.delegate.DefaultDelegateInterceptor.handleInvocation(DefaultDelegateInterceptor.java:63) at org.camunda.bpm.engine.impl.persistence.entity.TaskEntity.invokeListener(TaskEntity.java:1090) at org.camunda.bpm.engine.impl.persistence.entity.TaskEntity.invokeListener(TaskEntity.java:1070) ... 17 more Caused by: java.lang.NullPointerException 11-Jun-2021 10:27:43.014 SEVERE [pool-2-thread-1] org.camunda.commons.logging.BaseLogger.logError ENGINE-16004 Exception while closing command context: ENGINE-03051 There was an exception while invoking the TaskListener. Message: 'Exception while invoking TaskListener: null' org.camunda.bpm.engine.ProcessEngineException: ENGINE-03051 There was an exception while invoking the TaskListener. Message: 'Exception while invoking TaskListener: null' at org.camunda.bpm.engine.impl.db.EnginePersistenceLogger.invokeTaskListenerException(EnginePersistenceLogger.java:451) at org.camunda.bpm.engine.impl.persistence.entity.TaskEntity.invokeListener(TaskEntity.java:1076) at org.camunda.bpm.engine.impl.persistence.entity.TaskEntity.triggerTimeoutEvent(TaskEntity.java:1200) at org.camunda.bpm.engine.impl.jobexecutor.TimerTaskListenerJobHandler.execute(TimerTaskListenerJobHandler.java:48) at org.camunda.bpm.engine.impl.jobexecutor.TimerTaskListenerJobHandler.execute(TimerTaskListenerJobHandler.java:30) at org.camunda.bpm.engine.impl.persistence.entity.JobEntity.execute(JobEntity.java:133) at org.camunda.bpm.engine.impl.cmd.ExecuteJobsCmd.execute(ExecuteJobsCmd.java:110) at org.camunda.bpm.engine.impl.cmd.ExecuteJobsCmd.execute(ExecuteJobsCmd.java:43) 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.impl.interceptor.ProcessApplicationContextInterceptor.execute(ProcessApplicationContextInterceptor.java:70) at org.camunda.bpm.engine.impl.interceptor.CommandCounterInterceptor.execute(CommandCounterInterceptor.java:35) 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.executeJob(ExecuteJobsRunnable.java:110) at org.camunda.bpm.engine.impl.jobexecutor.ExecuteJobsRunnable.run(ExecuteJobsRunnable.java:71) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) at java.base/java.lang.Thread.run(Thread.java:834) Caused by: org.camunda.bpm.engine.ProcessEngineException: Exception while invoking TaskListener: null at org.camunda.bpm.engine.impl.task.listener.ClassDelegateTaskListener.notify(ClassDelegateTaskListener.java:53) at org.camunda.bpm.engine.impl.task.delegate.TaskListenerInvocation.invoke(TaskListenerInvocation.java:45) at org.camunda.bpm.engine.impl.delegate.DelegateInvocation.proceed(DelegateInvocation.java:58) at org.camunda.bpm.engine.impl.delegate.DefaultDelegateInterceptor.handleInvocationInContext(DefaultDelegateInterceptor.java:92) at org.camunda.bpm.engine.impl.delegate.DefaultDelegateInterceptor.handleInvocation(DefaultDelegateInterceptor.java:63) at org.camunda.bpm.engine.impl.persistence.entity.TaskEntity.invokeListener(TaskEntity.java:1090) at org.camunda.bpm.engine.impl.persistence.entity.TaskEntity.invokeListener(TaskEntity.java:1070) ... 17 more Caused by: java.lang.NullPointerException 11-Jun-2021 10:27:43.019 WARNING [pool-2-thread-1] org.camunda.commons.logging.BaseLogger.logWarn ENGINE-14006 Exception while executing job ec162621-ca9e-11eb-8aee-0242ac120003: org.camunda.bpm.engine.ProcessEngineException: ENGINE-03051 There was an exception while invoking the TaskListener. Message: 'Exception while invoking TaskListener: null' at org.camunda.bpm.engine.impl.db.EnginePersistenceLogger.invokeTaskListenerException(EnginePersistenceLogger.java:451) at org.camunda.bpm.engine.impl.persistence.entity.TaskEntity.invokeListener(TaskEntity.java:1076) at org.camunda.bpm.engine.impl.persistence.entity.TaskEntity.triggerTimeoutEvent(TaskEntity.java:1200) at org.camunda.bpm.engine.impl.jobexecutor.TimerTaskListenerJobHandler.execute(TimerTaskListenerJobHandler.java:48) at org.camunda.bpm.engine.impl.jobexecutor.TimerTaskListenerJobHandler.execute(TimerTaskListenerJobHandler.java:30) at org.camunda.bpm.engine.impl.persistence.entity.JobEntity.execute(JobEntity.java:133) at org.camunda.bpm.engine.impl.cmd.ExecuteJobsCmd.execute(ExecuteJobsCmd.java:110) at org.camunda.bpm.engine.impl.cmd.ExecuteJobsCmd.execute(ExecuteJobsCmd.java:43) 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.impl.interceptor.ProcessApplicationContextInterceptor.execute(ProcessApplicationContextInterceptor.java:70) at org.camunda.bpm.engine.impl.interceptor.CommandCounterInterceptor.execute(CommandCounterInterceptor.java:35) 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.executeJob(ExecuteJobsRunnable.java:110) at org.camunda.bpm.engine.impl.jobexecutor.ExecuteJobsRunnable.run(ExecuteJobsRunnable.java:71) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) at java.base/java.lang.Thread.run(Thread.java:834) Caused by: org.camunda.bpm.engine.ProcessEngineException: Exception while invoking TaskListener: null at org.camunda.bpm.engine.impl.task.listener.ClassDelegateTaskListener.notify(ClassDelegateTaskListener.java:53) at org.camunda.bpm.engine.impl.task.delegate.TaskListenerInvocation.invoke(TaskListenerInvocation.java:45) at org.camunda.bpm.engine.impl.delegate.DelegateInvocation.proceed(DelegateInvocation.java:58) at org.camunda.bpm.engine.impl.delegate.DefaultDelegateInterceptor.handleInvocationInContext(DefaultDelegateInterceptor.java:92) at org.camunda.bpm.engine.impl.delegate.DefaultDelegateInterceptor.handleInvocation(DefaultDelegateInterceptor.java:63) at org.camunda.bpm.engine.impl.persistence.entity.TaskEntity.invokeListener(TaskEntity.java:1090) at org.camunda.bpm.engine.impl.persistence.entity.TaskEntity.invokeListener(TaskEntity.java:1070) ... 17 more Caused by: java.lang.NullPointerException 11-Jun-2021 10:27:43.035 SEVERE [pool-2-thread-3] org.camunda.commons.logging.BaseLogger.logError ENGINE-16004 Exception while closing command context: ENGINE-03051 There was an exception while invoking the TaskListener. Message: 'Exception while invoking TaskListener: null' org.camunda.bpm.engine.ProcessEngineException: ENGINE-03051 There was an exception while invoking the TaskListener. Message: 'Exception while invoking TaskListener: null' at org.camunda.bpm.engine.impl.db.EnginePersistenceLogger.invokeTaskListenerException(EnginePersistenceLogger.java:451) at org.camunda.bpm.engine.impl.persistence.entity.TaskEntity.invokeListener(TaskEntity.java:1076) at org.camunda.bpm.engine.impl.persistence.entity.TaskEntity.triggerTimeoutEvent(TaskEntity.java:1200) at org.camunda.bpm.engine.impl.jobexecutor.TimerTaskListenerJobHandler.execute(TimerTaskListenerJobHandler.java:48) at org.camunda.bpm.engine.impl.jobexecutor.TimerTaskListenerJobHandler.execute(TimerTaskListenerJobHandler.java:30) at org.camunda.bpm.engine.impl.persistence.entity.JobEntity.execute(JobEntity.java:133) at org.camunda.bpm.engine.impl.cmd.ExecuteJobsCmd.execute(ExecuteJobsCmd.java:110) at org.camunda.bpm.engine.impl.cmd.ExecuteJobsCmd.execute(ExecuteJobsCmd.java:43) 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.impl.interceptor.ProcessApplicationContextInterceptor.execute(ProcessApplicationContextInterceptor.java:70) at org.camunda.bpm.engine.impl.interceptor.CommandCounterInterceptor.execute(CommandCounterInterceptor.java:35) 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.executeJob(ExecuteJobsRunnable.java:110) at org.camunda.bpm.engine.impl.jobexecutor.ExecuteJobsRunnable.run(ExecuteJobsRunnable.java:71) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) at java.base/java.lang.Thread.run(Thread.java:834) Caused by: org.camunda.bpm.engine.ProcessEngineException: Exception while invoking TaskListener: null at org.camunda.bpm.engine.impl.task.listener.ClassDelegateTaskListener.notify(ClassDelegateTaskListener.java:53) at org.camunda.bpm.engine.impl.task.delegate.TaskListenerInvocation.invoke(TaskListenerInvocation.java:45) at org.camunda.bpm.engine.impl.delegate.DelegateInvocation.proceed(DelegateInvocation.java:58) at org.camunda.bpm.engine.impl.delegate.DefaultDelegateInterceptor.handleInvocationInContext(DefaultDelegateInterceptor.java:92) at org.camunda.bpm.engine.impl.delegate.DefaultDelegateInterceptor.handleInvocation(DefaultDelegateInterceptor.java:63) at org.camunda.bpm.engine.impl.persistence.entity.TaskEntity.invokeListener(TaskEntity.java:1090) at org.camunda.bpm.engine.impl.persistence.entity.TaskEntity.invokeListener(TaskEntity.java:1070) ... 17 more Caused by: java.lang.NullPointerException 11-Jun-2021 10:27:43.049 WARNING [pool-2-thread-3] org.camunda.commons.logging.BaseLogger.logWarn ENGINE-14006 Exception while executing job ec162621-ca9e-11eb-8aee-0242ac120003: org.camunda.bpm.engine.ProcessEngineException: ENGINE-03051 There was an exception while invoking the TaskListener. Message: 'Exception while invoking TaskListener: null' at org.camunda.bpm.engine.impl.db.EnginePersistenceLogger.invokeTaskListenerException(EnginePersistenceLogger.java:451) at org.camunda.bpm.engine.impl.persistence.entity.TaskEntity.invokeListener(TaskEntity.java:1076) at org.camunda.bpm.engine.impl.persistence.entity.TaskEntity.triggerTimeoutEvent(TaskEntity.java:1200) at org.camunda.bpm.engine.impl.jobexecutor.TimerTaskListenerJobHandler.execute(TimerTaskListenerJobHandler.java:48) at org.camunda.bpm.engine.impl.jobexecutor.TimerTaskListenerJobHandler.execute(TimerTaskListenerJobHandler.java:30) at org.camunda.bpm.engine.impl.persistence.entity.JobEntity.execute(JobEntity.java:133) at org.camunda.bpm.engine.impl.cmd.ExecuteJobsCmd.execute(ExecuteJobsCmd.java:110) at org.camunda.bpm.engine.impl.cmd.ExecuteJobsCmd.execute(ExecuteJobsCmd.java:43) 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.impl.interceptor.ProcessApplicationContextInterceptor.execute(ProcessApplicationContextInterceptor.java:70) at org.camunda.bpm.engine.impl.interceptor.CommandCounterInterceptor.execute(CommandCounterInterceptor.java:35) 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.executeJob(ExecuteJobsRunnable.java:110) at org.camunda.bpm.engine.impl.jobexecutor.ExecuteJobsRunnable.run(ExecuteJobsRunnable.java:71) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) at java.base/java.lang.Thread.run(Thread.java:834) Caused by: org.camunda.bpm.engine.ProcessEngineException: Exception while invoking TaskListener: null at org.camunda.bpm.engine.impl.task.listener.ClassDelegateTaskListener.notify(ClassDelegateTaskListener.java:53) at org.camunda.bpm.engine.impl.task.delegate.TaskListenerInvocation.invoke(TaskListenerInvocation.java:45) at org.camunda.bpm.engine.impl.delegate.DelegateInvocation.proceed(DelegateInvocation.java:58) at org.camunda.bpm.engine.impl.delegate.DefaultDelegateInterceptor.handleInvocationInContext(DefaultDelegateInterceptor.java:92) at org.camunda.bpm.engine.impl.delegate.DefaultDelegateInterceptor.handleInvocation(DefaultDelegateInterceptor.java:63) at org.camunda.bpm.engine.impl.persistence.entity.TaskEntity.invokeListener(TaskEntity.java:1090) at org.camunda.bpm.engine.impl.persistence.entity.TaskEntity.invokeListener(TaskEntity.java:1070) ... 17 more Caused by: java.lang.NullPointerException
Steps to reproduce (Required on creation):
- Add a task listener to your task calling process application code
- Let the application code throw an exception when called
Observed Behavior (Required on creation):
The exception stack trace does not show any relation to the process application code for the exception.
Expected behavior (Required on creation):
The exception is related to the application code so the user is able to determine where the exception is coming from.
Root Cause (Required on prioritization):
Solution Ideas (Optional):
Hints (Optional):
- The exception in the stack trace is enriched with the called class when this class is located next to the test case executing the process for example.
Hi @Tobias,
Upon further investigation I realised that the stack trace was indeed incomplete. You can reproduce this issue by having a custom class that accesses null due date from `delegateTask`.
Is there a buffer limit of stack traces because the above trace is quite long?