ENGINE-09017 Cannot load class

Hi All

I am getting ClassNotFoundException for one of my classes.
I read in a couple of discussions(In about 60% cases can not resolve JavaDelegate in Service after Timer) that Standalone Artifact(.war) is a better option for this apart from disabling JobExecutor. I am using WAR method only.
What else could be the reason for this?

Thanks and Regards,
Anuj Agrawal

Hi @Anuj28282828

do you have several camunda servers/applications that running on the same database?
For example, is the cockpit deployed separately or do you have multiple servers with different .war files?
If that is the case you should enable the deployment aware propertry (docs) and disable the job executor for your cockpit. I think that there is no other way.

Regards
Dominik

1 Like

Its all on the same server.
Where do I exactly specify the enablement of deployment aware property and disablement of the job executor?

Which server do you use?

I use Apache Server but I am still getting the ClassNotFoundException and below is my processes.xml looking like :

<process-archive name="CandidateMatchedToRequisition_WorkFlow">
    <process-engine>default</process-engine>
    <properties>
      <property name="isDeleteUponUndeploy">false</property>
      <property name="isScanForProcessDefinitions">true</property>
      <property name="jobExecutorDeploymentAware">true</property>
      <property name="jobExecutorActivate" value="false" />
    </properties>
  </process-archive>

Sorry I have to ask this again:
There is no other server that accesses the same database as e.g. the Cockpit or another tomcat with an engine?
And all applications run on the same Tomcat server?
And the class is sometimes found and sometimes not?

let me explain you what I have done.
I have downloaded the Camunda Engine installer and unzipped it.
I have donwloaded the Modeler and unzipped it
I created a sample gradle project very similar to that of the loan-approval.bpmn and deployed both the WARs i.e. loan-approval and my WAR into the same Tomcat server.
Now I go to modeler and try to deploy it using the deployment button on the Modeler UI and I try to create instances out of it.
The loan-approval instance gets created successfully, however my WARs instance fails with ClassNotFoundException

Also, the class is never found.

Ok, thanks for the detailed description. Can you upload your BPMN process and your WAR file? I think this has nothing to do with the Job Executor, but the class is not configured correctly.

CandidateMatchedToRequisition_WorkFlow.bpmn (17.7 KB)

It is not allowing me to upload WAR, let me try to find some other way.

This is the Dropbox link - Dropbox - vithi-workflow-0.0.1-SNAPSHOT.war - Simplify your life
let me know if that doesn’t work for you.

Hi @Anuj28282828,

At first view it looks good.
Can you upload the source code?
I think there is something in the Application class that is not defined correctly.

Hi @dominikh - Please see source code at - https://www.dropbox.com/s/r0yjcdt5hk5pwx6/vithi-workflow.zip?dl=0

Hi @Anuj28282828

your dependencies in your build.gradle are mixed up.
For this your .war does not get deployed successfully.
It seems like you want to use Spring Boot?
Is that correct or are the spring boot dependencies just in there?

@dominikh not really
I don’t want to use sprint boot at least in the starter app
Should I remove those and try?

Hi @Anuj28282828

change your dependencies to:

dependencies {

	runtimeOnly 'mysql:mysql-connector-java'
	compile group: 'org.camunda.bpm', name: 'camunda-bom', version: '7.13.0', ext: 'pom'
	compileOnly group: 'org.camunda.bpm', name: 'camunda-engine', version: '7.13.0'
	compileOnly 'javax.servlet:javax.servlet-api:3.0.1'

	compileOnly 'org.projectlombok:lombok:1.18.12'
	annotationProcessor 'org.projectlombok:lombok:1.18.12'
	
	testCompileOnly 'org.projectlombok:lombok:1.18.12'
	testAnnotationProcessor 'org.projectlombok:lombok:1.18.12'
} 

Then the deployment of your .war file should work and you don’t have to deploy the .bpmn manually.
Moreover you should change your Timer Boundary Event to P10D -> “10 Days” is not a valid definition for that (docs).

Where do we define the timer boundary?

Also, even after refactoring the dependencies to what you mentioned, it still doesn’t work and fails with below logs :

15-Oct-2020 02:06:06.178 INFO [main] org.camunda.commons.logging.BaseLogger.logInfo ENGINE-07015 Detected @ProcessApplication class 'com.abbf.vithi.workflow.CandidateMatchRequisition'
15-Oct-2020 02:06:06.198 INFO [main] org.apache.jasper.servlet.TldScanner.scanJars At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
15-Oct-2020 02:06:06.201 INFO [main] org.camunda.commons.logging.BaseLogger.logInfo ENGINE-08024 Found processes.xml file at file:/D:/Camunda/CamundaEngine_Cockpit/server/apache-tomcat-9.0.33/webapps/vithi-workflow-0.0.1-SNAPSHOT/WEB-INF/classes/META-INF/processes.xml
15-Oct-2020 02:06:06.214 SEVERE [main] org.apache.catalina.core.StandardContext.startInternal One or more listeners failed to start. Full details will be found in the appropriate container log file
15-Oct-2020 02:06:06.214 SEVERE [main] org.apache.catalina.core.StandardContext.startInternal Context [/vithi-workflow-0.0.1-SNAPSHOT] startup failed due to previous errors
15-Oct-2020 02:06:06.216 WARNING [main] org.camunda.commons.logging.BaseLogger.logWarn ENGINE-07017 Calling undeploy() on process application that is not deployed.
15-Oct-2020 02:06:06.228 INFO [main] org.apache.catalina.startup.HostConfig.deployWAR Deployment of web application archive [D:\Camunda\CamundaEngine_Cockpit\server\apache-tomcat-9.0.33\webapps\vithi-workflow-0.0.1-SNAPSHOT.war] has finished in [2,103] ms
15-Oct-2020 02:06:06.229 INFO [main] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory [D:\Camunda\CamundaEngine_Cockpit\server\apache-tomcat-9.0.33\webapps\camunda]
15-Oct-2020 02:06:09.711 INFO [main] org.apache.jasper.servlet.TldScanner.scanJars At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
15-Oct-2020 02:06:10.307 INFO [main] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [D:\Camunda\CamundaEngine_Cockpit\server\apache-tomcat-9.0.33\webapps\camunda] has finished in [4,078] ms

I got the problem.
The property config which I picked up for Job Executor was configured wrongly.
Earlier it was :

<property name="jobExecutorActivate" value="false" />

Now I changed it to :

<property name="jobExecutorActivate">false</property>

And this solved the problem for me!

Thanks a lot @dominikh for all your help here.

1 Like

Hi @Anuj28282828

You are welcome :slight_smile:

I think you want the Job Executor to be switched on. Therefore I would delete this property or set it to true.

1 Like