I have simple bpmn process:
<?xml version="1.0" encoding="UTF-8"?>
<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" id="Definitions_0m0cnse" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="4.2.0">
<bpmn:process id="Process_1aegwvb" isExecutable="true">
<bpmn:sequenceFlow id="Flow_1dfd8um" sourceRef="StartEvent_1" targetRef="Activity_047mv6x" />
<bpmn:endEvent id="Event_1vradpp">
<bpmn:incoming>Flow_19hnbhv</bpmn:incoming>
</bpmn:endEvent>
<bpmn:sequenceFlow id="Flow_19hnbhv" sourceRef="Activity_047mv6x" targetRef="Event_1vradpp" />
<bpmn:startEvent id="StartEvent_1">
<bpmn:outgoing>Flow_1dfd8um</bpmn:outgoing>
<bpmn:timerEventDefinition id="TimerEventDefinition_1ah7red">
<bpmn:timeCycle xsi:type="bpmn:tFormalExpression">0 0/5 * * * ?</bpmn:timeCycle>
</bpmn:timerEventDefinition>
</bpmn:startEvent>
<bpmn:serviceTask id="Activity_047mv6x" name="Get users" camunda:class="*.Cron">
<bpmn:incoming>Flow_1dfd8um</bpmn:incoming>
<bpmn:outgoing>Flow_19hnbhv</bpmn:outgoing>
</bpmn:serviceTask>
</bpmn:process>
<bpmndi:BPMNDiagram id="BPMNDiagram_1">
<bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="Process_1aegwvb">
<bpmndi:BPMNEdge id="Flow_19hnbhv_di" bpmnElement="Flow_19hnbhv">
<di:waypoint x="370" y="117" />
<di:waypoint x="432" y="117" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_1dfd8um_di" bpmnElement="Flow_1dfd8um">
<di:waypoint x="215" y="117" />
<di:waypoint x="270" y="117" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="Event_1vradpp_di" bpmnElement="Event_1vradpp">
<dc:Bounds x="432" y="99" width="36" height="36" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Event_11i5xth_di" bpmnElement="StartEvent_1">
<dc:Bounds x="179" y="99" width="36" height="36" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Activity_01expgb_di" bpmnElement="Activity_047mv6x">
<dc:Bounds x="270" y="77" width="100" height="80" />
</bpmndi:BPMNShape>
</bpmndi:BPMNPlane>
</bpmndi:BPMNDiagram>
</bpmn:definitions>
- jar file with Authentication provider classes and class Cron added into folders
camunda/webapps/engine-rest/WEB-INF/lib/ camunda/webapps/camunda/WEB-INF/lib/
If I start this process manually in Camunda Webapp or via REST API, it works fine and make needful job. But every 5 minutes I see problem in logs .
Where do I need to add this class into classpath? It is a docker image with some extra features, custom authentication provider and so on.
Cron.java:
public class Cron implements JavaDelegate {
@Override public void execute(DelegateExecution delegateExecution) { System.out.println("Test"); }}
24-Sep-2020 10:40:05.164 SEVERE [pool-2-thread-3] org.camunda.commons.logging.BaseLogger.logError ENGINE-16006 BPMN Stack Trace: Activity_047mv6x (activity-execute, ProcessInstance[4ed42252-fe52-11ea-9efd-12baf36f6a87]) Activity_047mv6x, name=Get users ^ | StartEvent_1
24-Sep-2020 10:40:05.166 SEVERE [pool-2-thread-3] org.camunda.commons.logging.BaseLogger.logError ENGINE-16004 Exception while closing command context: ENGINE-09008 Exception while instantiating class '.Cron': ENGINE-09017 Cannot load class '.Cron': .Cron org.camunda.bpm.engine.ProcessEngineException: ENGINE-09008 Exception while instantiating class '.Cron': ENGINE-09017 Cannot load class '*.Cron': *.Cron at org.camunda.bpm.engine.impl.util.EngineUtilLogger.exceptionWhileInstantiatingClass(EngineUtilLogger.java:81)......................
Caused by: java.lang.ClassNotFoundException: *.Cron at java.net.URLClassLoader.findClass(URLClassLoader.java:382) at java.lang.ClassLoader.loadClass(ClassLoader.java:424) at java.lang.ClassLoader.loadClass(ClassLoader.java:357) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:348) at org.camunda.bpm.engine.impl.util.ReflectUtil.loadClass(ReflectUtil.java:87) ... 92 more