ENGINE-03051 There was an exception while invoking the TaskListener

Hi Guys,

Good day! I would just like to seek help from the team on how to resolve a particular issue I’m encountering while trying to execute a task listener on a very simple process instance.

Scenario: I have a simple process that sends an assignment email to a recipient.
Reference: https://github.com/camunda/camunda-bpm-examples/tree/master/usertask/task-assignment-email

I tried running the code provided on the github link above but it doesn’t work in my machine. I am currently running:

  • Camunda Platform Run 7.16
  • JDK 17

The code I’m using is a direct copy from the github link. Here’s a snippet of the error:

Thank you!!

It’s possible that JDK 17 is the problem. Camunda 7.16 doesn’t support it. You can either use Camunda 7.17 or you can use JDK 15

Hi @Niall

Followed your advice and reverted back to JDK 11 a version supported by 7.16, however I am still encountering the issue.

Just to mention as well, I have other classes which runs perfectly in my process its just this TaskAssignmentEmail class that generates the error. Here’s how I deployed it in Run.

  1. I created a JAR file for my java classes…

  2. I copied the jar file to the ‘userlib’ folder…


Here’s my current config in the process as well…


and here’s my project structure…

Thanks! let me know if you need more information. Thank you!!!

the image of the error might be hard to read… here’s the text…

" An error happened while claiming the task. : ENGINE-03051 There was an exception while invoking the TaskListener. Message: ‘ENGINE-09008 Exception while instantiating class ‘org.camunda.sieve.TaskAssignmentEmail’: ENGINE-09017 Cannot load class ‘org.camunda.sieve.TaskAssignmentEmail’: org/apache/commons/mail/Email’"

Hi @edcapulong,

the example project is build for the wildfly distro and uses this dependency in the pom.xml:


You need to put this jar at least to the userlib directory as well. Maybe it requires more jars as transitive dependencies.

Hope this helps, Ingo

Hi @Ingo_Richtsmeier

Thanks for the reply as always! :slight_smile: yup I observed that as well, when I tried placing the JAR for the apache commons in the userlib the error disappeared.