I used the REST API to deploy new CMMN on the fly. After it is deployed, the new case instance can be created successfully, however, the task creation always failed with the ClassNotFoundException as shown below. It seems not able to locate the task listener java class defined in the custom process application. If I restart the Camunda server, it will work though. Could you please shed some light on this?
We have a shared process engine set up running in IBM WebSphere. Our own process application is deployed as a WAR which packages a bunch of task listener java classes, some built-in CMMN/BPMN diagrams and processes.xml.
2017-11-21 15:38:48,058 496204 [WebContainer : 0] ERROR org.camunda.bpm.engine.context - ENGINE-16004 Exception while closing command context: ENGINE-03051 There was an exception while invoking the TaskListener. Message: âENGINE-09008 Exception while instantiating class âca.on.gov.cac.ecor.workflow.listener.TaskAssignNotifyListenerâ: ENGINE-09017 Cannot load class âca.on.gov.cac.ecor.workflow.listener.TaskAssignNotifyListenerâ: ca.on.gov.cac.ecor.workflow.listener.TaskAssignNotifyListenerâ
org.camunda.bpm.engine.ProcessEngineException: ENGINE-03051 There was an exception while invoking the TaskListener. Message: âENGINE-09008 Exception while instantiating class âca.on.gov.cac.ecor.workflow.listener.TaskAssignNotifyListenerâ: ENGINE-09017 Cannot load class âca.on.gov.cac.ecor.workflow.listener.TaskAssignNotifyListenerâ: ca.on.gov.cac.ecor.workflow.listener.TaskAssignNotifyListenerâ
at org.camunda.bpm.engine.impl.db.EnginePersistenceLogger.invokeTaskListenerException(EnginePersistenceLogger.java:432) ~[camunda-engine-7.6.1-ee.jar:7.6.1-ee]
at org.camunda.bpm.engine.impl.persistence.entity.TaskEntity.fireEvent(TaskEntity.java:939) ~[camunda-engine-7.6.1-ee.jar:7.6.1-ee]
at org.camunda.bpm.engine.impl.persistence.entity.TaskEntity.setAssignee(TaskEntity.java:840) ~[camunda-engine-7.6.1-ee.jar:7.6.1-ee]
at org.camunda.bpm.engine.impl.task.TaskDecorator.initializeTaskAssignee(TaskDecorator.java:154) ~[camunda-engine-7.6.1-ee.jar:7.6.1-ee]
at org.camunda.bpm.engine.impl.task.TaskDecorator.initializeTaskAssignments(TaskDecorator.java:144) ~[camunda-engine-7.6.1-ee.jar:7.6.1-ee]
at org.camunda.bpm.engine.impl.task.TaskDecorator.decorate(TaskDecorator.java:59) ~[camunda-engine-7.6.1-ee.jar:7.6.1-ee]
at org.camunda.bpm.engine.impl.cmmn.execution.CmmnExecution.createTask(CmmnExecution.java:171) ~[camunda-engine-7.6.1-ee.jar:7.6.1-ee]
at org.camunda.bpm.engine.impl.cmmn.entity.runtime.CaseExecutionEntity.createTask(CaseExecutionEntity.java:340) ~[camunda-engine-7.6.1-ee.jar:7.6.1-ee]
at org.camunda.bpm.engine.impl.cmmn.entity.runtime.CaseExecutionEntity.createTask(CaseExecutionEntity.java:83) ~[camunda-engine-7.6.1-ee.jar:7.6.1-ee]
at org.camunda.bpm.engine.impl.cmmn.behavior.HumanTaskActivityBehavior.performStart(HumanTaskActivityBehavior.java:32) ~[camunda-engine-7.6.1-ee.jar:7.6.1-ee]
at org.camunda.bpm.engine.impl.cmmn.behavior.StageOrTaskActivityBehavior.started(StageOrTaskActivityBehavior.java:89) ~[camunda-engine-7.6.1-ee.jar:7.6.1-ee]
âŚ
Caused by: org.camunda.bpm.engine.ClassLoadingException: ENGINE-09017 Cannot load class âca.on.gov.cac.ecor.workflow.listener.TaskAssignNotifyListenerâ: ca.on.gov.cac.ecor.workflow.listener.TaskAssignNotifyListener
at org.camunda.bpm.engine.impl.util.EngineUtilLogger.classLoadingException(EngineUtilLogger.java:135) ~[camunda-engine-7.6.1-ee.jar:7.6.1-ee]
at org.camunda.bpm.engine.impl.util.ReflectUtil.loadClass(ReflectUtil.java:107) ~[camunda-engine-7.6.1-ee.jar:7.6.1-ee]
at org.camunda.bpm.engine.impl.util.ClassDelegateUtil.instantiateDelegate(ClassDelegateUtil.java:42) ~[camunda-engine-7.6.1-ee.jar:7.6.1-ee]
⌠128 common frames omitted
Caused by: java.lang.ClassNotFoundException: ca.on.gov.cac.ecor.workflow.listener.TaskAssignNotifyListener
at java.lang.Class.forNameImpl(Native Method) ~[na:1.7.0]
at java.lang.Class.forName(Class.java:176) ~[na:1.7.0]
at org.camunda.bpm.engine.impl.util.ReflectUtil.loadClass(ReflectUtil.java:84) ~[camunda-engine-7.6.1-ee.jar:7.6.1-ee]
⌠129 common frames omitted