cancel
Showing results for 
Search instead for 
Did you mean: 

How to add classes to the engine classpath

afshad
Champ in-the-making
Champ in-the-making
I am using the ant demo.start (in C:\BPM_BatchSoftware\activiti-5.8\setup) to launch the activiti engine.
I created an eclipse Activiti project in the workspace at the location: C:\Workspace\activitiProj\ActivitiTest
In my project I created an Activiti diagram (bpmn file auto generated)
I created a deployment bar using Create Deployment Artifacts in eclipse.

Then in the Activiti explorer, I uploaded this bar file successfully.
However when I try to start the process in the explorer I get the exception:
Cause: org.activiti.engine.ActivitiException: couldn't instantiate class org.activiti.delegates.LoadPointSetDelegate
See log attached.

I have the tomcat server running through ant demo.start

The documentation says: "Note that Java classes present in the business archive will not be added to the classpath. All custom classes used in process definitions in the business archive (for example Java service tasks or event listener implementations) should be present on the activiti-engine's classpath in order to run the processes."

How do I add my custom class and other dependencies to the activiti-engine's classpath when running the ant demo.start??
I also tried making a jar file out of everything in my project and putting it in:
C:\BPM_BatchSoftware\activiti-5.8\apps\apache-tomcat-6.0.32\webapps\activiti-rest\WEB-INF\lib
That didnt work either. The jar file does contain the class.

Thanks.
3 REPLIES 3

dwoodbury
Champ in-the-making
Champ in-the-making
Are you using the latest version of the Eclipse Designer? There was a bug with respect to jar file creation. 

http://forums.activiti.org/en/viewtopic.php?f=8&t=3396&hilit=bug+in+designer+jar+file

cweber
Champ in-the-making
Champ in-the-making
Hi,

I am not really sure about that but I think I had the same problem. I could resolve it by copying the java.jar file not in the Rest folder.
C:\BPM_BatchSoftware\activiti-5.8\apps\apache-tomcat-6.0.32\webapps\activiti-rest\WEB-INF\lib

I think you have to copy it into the explorer folder.
C:\BPM_BatchSoftware\activiti-5.8\apps\apache-tomcat-6.0.32\webapps\activiti-explorer\WEB-INF\lib


Then it should work because the activiti explorer has its own engine as it is said here:

http://forums.activiti.org/en/viewtopic.php?f=6&t=3315&hilit

afshad
Champ in-the-making
Champ in-the-making
Hi,

I am not really sure about that but I think I had the same problem. I could resolve it by copying the java.jar file not in the Rest folder.
C:\BPM_BatchSoftware\activiti-5.8\apps\apache-tomcat-6.0.32\webapps\activiti-rest\WEB-INF\lib

I think you have to copy it into the explorer folder.
C:\BPM_BatchSoftware\activiti-5.8\apps\apache-tomcat-6.0.32\webapps\activiti-explorer\WEB-INF\lib


Then it should work because the activiti explorer has its own engine as it is said here:

http://forums.activiti.org/en/viewtopic.php?f=6&t=3315&hilit

Thanks so much. that worked. It does need to be in the lib of the activiti explorer webapp as you have mentioned. By mistake I had two versions of apache installed and i kept putting it in the wrong apache all this time thats why it didnt work. Its working now.