Camunda class loading error

Hi,

I have created a camunda process and used service tasks there, but the classes that I have provided in these tasks are not working, they are giving errors on the camunda cockpit. The errors are as follows, ENGINE-09008 Exception while instantiating class, ENGINE-09017 Cannot load class. Anyone has any idea as to how do i resolve this error?.

Thanks.

You have to give us more information.
What’s you runtime envireonment ? Camunda Run ? Tomcat ? Wildfly ? Spring ?
Hao do you reference / call your code from the Service Task: Java Class, Expression, Delegate Expression ? Upload your bpmn model if possible.
Please paste a complete stack trace with the error message you get.

I am using Camunda Wildfly server and eclipse for the java classes , for the call I am using Java Class in the service task. The error message is shown on the cockpit and I am uploading the Image for the same. As for the bpmn model, it contains some sensitive information, but if you need some clarification in particular, I can provide that too.

Based on the info, you are using Camunda shared process Engine. How are you deploying the application to Wildfly. It looks like you are uploading the bpmn file to camunda engine from modeler. but you are not deploying the java code you intend to use.

you can refer the sample from Camunda documentation:

Hi, actually I have already created a war file for the project code in eclipse and put it in the deployment folder in wildfly, so the code is also getting deployed, moreover I have tried starting the process using postman as well but it is giving the same error even then.

Any solution to this issue would be highly appreciated.

Hi,
to investigate this issue further:

  1. Have you opened your war file and checked whether it contains the class that is supposed to be missing?
  2. If it is there, is the same class maybe provided via another artifact as well? This may lead to a version conflict.

Thomas,
you might have a look at either standalone.xml or standalone-full.xml and change

<property name="jobExecutorDeploymentAware">true</property>

to false.

In the shown screenshot you’re starting a new process instance from Camunda TaskList.
This get’s executed by the TaskList application and this has no access to your code.
As far as I know, this is necessary when deploying code and model independently of each other.

In my application I also deploy code and model separately as I want to be able to update the process model without deploying the application. “jobExecutorDeploymentAware” is still set to true.
Model deployment is done by my application using the Camunda Java API and at last

this.managementService.registerProcessApplication( deployment.getId(), this.camundaProcessApplication.getReference() );

is executed to “link” the newly deployed model and the current application.

Another try for me would be to set “Asynchronous continuation” to “Before” for the start event of your process model. Then the job executor will take over execution right after starting the process instance.

1 Like