This a probably a absolute beginners mistake.
I downloaded the 7.6.0 Tomcat distribution and I trying to get my first JavaDelegate.
I have created a WAR file that contains 2 simple classes & a BPMN file.
When copying the war file to the webapp folder, the process deploys automatically.
I can start a process instance using the Tasklist webgui, the process blocks at the service task:
The process could not be started. : Cannot instantiate process definition test:9:b2ce937e-e483-11e6-873f-0ecf8b62d705: ENGINE-09008 Exception while instantiating class 'eu.telecomplaza.test.simpleDelegate': ENGINE-09017 Cannot load class 'eu.telecomplaza.test.simpleDelegate': eu.telecomplaza.test.simpleDelegate
package eu.telecomplaza.test;
import org.camunda.bpm.application.ProcessApplication;
import org.camunda.bpm.application.impl.ServletProcessApplication;
@ProcessApplication("Test app")
public class Application extends ServletProcessApplication {
public Application() {
}
}
and the JavaDelegate:
package eu.telecomplaza.test;
import org.camunda.bpm.engine.delegate.DelegateExecution;
import org.camunda.bpm.engine.delegate.JavaDelegate;
public class simpleDelegate implements JavaDelegate{
public void execute(DelegateExecution execution) throws Exception {
execution.setVariable("channel", "EPT");
}
}
Can someone help me in setting up the classpath correctly so that the JavaDelegate is found in the war file?
start process instance via rest api ‘/engine-rest/process-definition/key/approve-loan/start’
Get the error: Cannot instantiate process definition approve-loan:2:cceac6d4-3ecf-11e7-ab3b-08002756ae3f: ENGINE-09008 Exception while instantiating class ‘org.camunda.bpm.getstarted.loanapproval.ProcessRequestDelegate’: ENGINE-09017 Cannot load class ‘org.camunda.bpm.getstarted.loanapproval.ProcessRequestDelegate’: org.camunda.bpm.getstarted.loanapproval.ProcessRequestDelegate
HOWEVER:
I just tried this again to verify my results and now I am not getting an error. It works fine.
I remember one time where I also used the Camunda Spin plugin to handle a Json variable and the error occured.
Sometimes I get the feeling that I can force this error if I just keep redeploying the application until it is broken.
I’m pretty new to Camunda and cannot provide any actual “qualified” hints on how to reproduce the error properly.
When I add the Camunda Spin plugin to the application, the error occurs again.
If I remove Spin afterwards and redeploy the application, the error remains.
I can only get rid of the error, if I delete all deployments in Camunda (using the gui) and then restart the Tomcat.
When I now deploy my application again, the error is gone.
When I stop Tomcat, delete the folder and replace the war file and start Tomcat -> I have the same problem.
When I don’t stop Tomcat and simply delete the folder and replace the war file -> The problem doesn’t occur.
If I deploy the model separately with the camunda modeler, I get the error ENGINE-09008 .
If the bpmn file is part of the *.war file, everything works just fine.