cancel
Showing results for 
Search instead for 
Did you mean: 

ClassNotFoundException when trying implement a service task

tnfyj520
Champ in-the-making
Champ in-the-making
Hi everyone, I'm trying to implement a java service task on Activiti 5.8 .
The process was defined like this:

<?xml version="1.0" encoding="UTF-8"?>
<definitions xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:activiti="http://activiti.org/bpmn" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:omgdc="http://www.omg.org/spec/DD/20100524/DC" xmlns:omgdi="http://www.omg.org/spec/DD/20100524/DI" typeLanguage="http://www.w3.org/2001/XMLSchema" expressionLanguage="http://www.w3.org/1999/XPath" targetNamespace="http://www.activiti.org/test">
  <process id="TestServiceTask" name="TestServiceTask">
    <documentation>Place documentation for the 'TestServiceTask' process here.</documentation>
    <startEvent id="theStart" name="Start"></startEvent>
    <serviceTask id="serviceTask" name="Service Task" activiti:class="com.neusoft.nsop.test.HelloBPMN"></serviceTask>
    <sequenceFlow id="flow1" name="" sourceRef="theStart" targetRef="serviceTask"></sequenceFlow>
    <endEvent id="theEnd" name="End"></endEvent>
    <sequenceFlow id="flow2" name="" sourceRef="serviceTask" targetRef="theEnd"></sequenceFlow>
  </process>
</definitions>
After deploy the process on Activiti Engine, and place the implement jar file to the path : "%CATALINA_HOME%\webapps\activiti-rest\WEB-INF\lib\", I can see the corresponding diagram on Activiti Explorer, but when I trying to start it , I got an exception says tomcat can't find the implement class , which is, "com.neusoft.nsop.test.HelloBPMN" in this case.
I'm sure that the jar file contains the required class. I've try to redo the deployment work several times following the user guide, but didn't work at all.
Does anyone got any clue about this? I will be very appreciate for your help.
3 REPLIES 3

trademak
Star Contributor
Star Contributor
Hi,

Did you start the process from the Activiti Explorer?
Then you have to deploy the JAR file to %CATALINA_HOME%\webapps\activiti-explorer\WEB-INF\lib\

Best regards,

tnfyj520
Champ in-the-making
Champ in-the-making
Hi,

Did you start the process from the Activiti Explorer?
Then you have to deploy the JAR file to %CATALINA_HOME%\webapps\activiti-explorer\WEB-INF\lib\

Best regards,

Thanks for replying. It works for me.
Another question, as the user guide said, putting the jar file into %CATALINA_HOME%\webapps\activiti-rest\WEB-INF\lib\
is just for some programing start, right?
I still don't understand why activiti-explorer would need this jar file rather than the activiti engine, is there another activiti engine running in this activiti-explorer webapp?

Thanks again.

trademak
Star Contributor
Star Contributor
Hi,

Right, the Activiti Explorer also has its own Activiti Engine, that's the reason.

Best regards,