ENGINE-02008 Class doesn't implement 'org.camunda.bpm.engine.delegate.JavaDelegate' nor 'org.camunda.bpm.engine.impl.pvm.delegate.ActivityBehavior'.`

Hi,
after trying to get access to different methods of a bean via cdi (not successful with my project) I now tried to use ejbs.

  • Camunda 7.14
  • Wildfly 20
  • Java 1.8

I get the following exception:
Caused by: org.camunda.bpm.engine.ProcessEngineException: ENGINE-02008 Class 'de.thm.mnd.ofv.businesslogic.thesiswk.ThesisWKBusinessLogic' doesn't implement 'org.camunda.bpm.engine.delegate.JavaDelegate' nor 'org.camunda.bpm.engine.impl.pvm.delegate.ActivityBehavior'.

I thougt if I use EJBs I do not have to implement JavaDelegate?

Here ist my EJB:

  @Stateless
  @Named
   public class ThesisWKBusinessLogic {

public void execute(DelegateExecution execution) throws Exception {
	getThesisWorkerViaREST(execution);
}

public void testBeanAccess(DelegateExecution execution) throws Exception {
	System.out.println("Zugriff auf Methode über erfolgreich");
}

Here is my pom.xml

<?xml version="1.0" encoding="UTF-8"?>
  <project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>de.thm.mnd</groupId>
<artifactId>isymnd</artifactId>
<version>1.0.0-SNAPSHOT</version>
<packaging>war</packaging>

<properties>
	<camunda.version>7.14.0</camunda.version>
	<maven.compiler.source>1.8</maven.compiler.source>
	<maven.compiler.target>1.8</maven.compiler.target>
</properties>

<dependencyManagement>
	<dependencies>
		<dependency>
			<groupId>org.camunda.bpm</groupId>
			<artifactId>camunda-bom</artifactId>
			<version>7.14.0</version>
			<scope>import</scope>
			<type>pom</type>
		</dependency>
	</dependencies>
</dependencyManagement>
<dependencies>
	<!-- LDAP Identity Service Plugin -->
	<dependency>
		<groupId>org.camunda.bpm.identity</groupId>
		<artifactId>camunda-identity-ldap</artifactId>
	</dependency>

	<dependency>
		<groupId>org.camunda.bpm</groupId>
		<artifactId>camunda-engine</artifactId>
		<scope>provided</scope>
	</dependency>

	<dependency>
		<groupId>javax.servlet</groupId>
		<artifactId>javax.servlet-api</artifactId>
		<version>3.0.1</version>
		<scope>provided</scope>
	</dependency>

	<!-- Java Mail -->
	<dependency>
		<groupId>javax.mail</groupId>
		<artifactId>mail</artifactId>
		<version>1.5.0-b01</version>
	</dependency>

	<!-- https://mvnrepository.com/artifact/mysql/mysql-connector-java -->
	<dependency>
		<groupId>mysql</groupId>
		<artifactId>mysql-connector-java</artifactId>
		<version>5.1.47</version>
	</dependency>

	<dependency>
		<groupId>org.camunda.bpm</groupId>
		<artifactId>camunda-engine-cdi</artifactId>
	</dependency>

	<!-- provides a default EjbProcessApplication -->
	<dependency>
		<groupId>org.camunda.bpm.javaee</groupId>
		<artifactId>camunda-ejb-client</artifactId>
	</dependency>

	<!-- Java EE 7 Specification -->
	<dependency>
		<groupId>org.jboss.spec</groupId>
		<artifactId>jboss-javaee-7.0</artifactId>
		<version>1.0.3.Final</version>
		<type>pom</type>
		<scope>provided</scope>
		<exclusions>
			<exclusion>
				<artifactId>xalan</artifactId>
				<groupId>xalan</groupId>
			</exclusion>
		</exclusions>
	</dependency>

	<!-- https://mvnrepository.com/artifact/javax.ws.rs/javax.ws.rs-api -->
	<dependency>
		<groupId>javax.ws.rs</groupId>
		<artifactId>javax.ws.rs-api</artifactId>
		<version>2.1.1</version>
	</dependency>

	<!-- https://mvnrepository.com/artifact/org.jboss.resteasy/resteasy-client -->
	<dependency>
		<groupId>org.jboss.resteasy</groupId>
		<artifactId>resteasy-client</artifactId>
		<version>3.15.1.Final</version>
	</dependency>

	<!-- https://mvnrepository.com/artifact/javax.json.bind/javax.json.bind-api -->
	<dependency>
		<groupId>javax.json.bind</groupId>
		<artifactId>javax.json.bind-api</artifactId>
		<version>1.0</version>
	</dependency>

	<!-- https://mvnrepository.com/artifact/com.fasterxml.jackson.core/jackson-databind -->
	<dependency>
		<groupId>com.fasterxml.jackson.core</groupId>
		<artifactId>jackson-databind</artifactId>
		<version>2.12.3</version>
	</dependency>

</dependencies>
<build>
	<finalName>isymnd</finalName>
	<plugins>
		<plugin>
			<groupId>org.apache.maven.plugins</groupId>
			<artifactId>maven-compiler-plugin</artifactId>
			<version>3.1</version>
			<configuration>
				<source>1.8</source>
				<target>1.8</target>
			</configuration>
		</plugin>
	</plugins>
</build>

Any ideas? Thank you a lot.
Nicole

Can you share the implementation on your model?

Now the strange thing is, I built and deployed everything new 3 times…now the first step works (“Thesisworkerdaten abrufen und in Formular füllen”) So the execute method of the bean ThesisWKBusinessLogic is called. But in my second servicetask “Thesis anlegen, ThesisProcessState setzen” , I try to call another method (thesisWKBusinessLogic.testBeanAccess(execution)). Now I get the following error:

Caused by: org.camunda.bpm.engine.impl.javax.el.MethodNotFoundException: Cannot find method testBeanAccess with 1 parameters in class de.thm.mnd.ofv.businesslogic.thesiswk.JavaDelegate$2002347991$Proxy$_$$_Weld$EnterpriseProxy$
	at org.camunda.bpm.engine.impl.javax.el.BeanELResolver.invoke(BeanELResolver.java:476)
	at org.camunda.bpm.engine.impl.el.AbstractElResolverDelegate.invoke(AbstractElResolverDelegate.java:97)...

grafik
The corresponding bpmn code:

   <bpmn:userTask id="Activity_1clt3q6" name="Thesisformular ausfüllen" camunda:formKey="embedded:app:thesis_wk_rp/thesisworker/antrag_ausfuellen.html" camunda:assignee="Demo">
      <bpmn:incoming>Flow_0s7cf7x</bpmn:incoming>
      <bpmn:outgoing>Flow_0c0dbbp</bpmn:outgoing>
    </bpmn:userTask>
    <bpmn:serviceTask id="Activity_1r7tmz9" name="Thesisworkerdaten abrufen und in Formular füllen" camunda:class="de.thm.mnd.ofv.businesslogic.thesiswk.ThesisWKBusinessLogic">
      <bpmn:incoming>Flow_0z9eheg</bpmn:incoming>
      <bpmn:outgoing>Flow_0s7cf7x</bpmn:outgoing>
    </bpmn:serviceTask>
    <bpmn:startEvent id="StartEvent_0yy0ufn" name="Start" camunda:initiator="initiator">
      <bpmn:outgoing>Flow_0z9eheg</bpmn:outgoing>
    </bpmn:startEvent>
    <bpmn:serviceTask id="Activity_0kjmhky" name="Thesis anlegen, ThesisProcessState setzen" camunda:expression="${thesisWKBusinessLogic.testBeanAccess(execution)}">
      <bpmn:incoming>Flow_0c0dbbp</bpmn:incoming>
      <bpmn:outgoing>Flow_1roagnr</bpmn:outgoing>
    </bpmn:serviceTask>

Thanks a lot for your help!
Regards, Nicole

I am really confused. Sometimes it works, sometimes not. The only thing I tried 5 minutes ago where to stop and start the server. I changed nothing else but I got the same error again. Then I stopped the server again, started it and it works. Arrrg. :roll_eyes:

Good morning,

now my “solution” was to install new eclipse, new server (wildfly22) and new camunda version (7.15) and make a new project from scratch via the maven archetypes. Now it works both.

I hate it not to know what the reason was but now it works and that ist fine.
Thank you for your help,
Nicole

1 Like