I am trying to deploy the sample Java Service Task (ToUpperCase).
my deployment failed with below error .
[deploy-bar] at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41) [deploy-bar] at org.apache.tools.ant.Project.executeTargets(Project.java:1189) [deploy-bar] at org.apache.tools.ant.Main.runBuild(Main.java:758) [deploy-bar] at org.apache.tools.ant.Main.startAnt(Main.java:217) [deploy-bar] at org.apache.tools.ant.launch.Launcher.run(Launcher.java:257) [deploy-bar] at org.apache.tools.ant.launch.Launcher.main(Launcher.java:104) [deploy-bar] Caused by: org.activiti.engine.ActivitiException: Couldn't load cla ss org.activiti.examples.bpmn.servicetask.ToUppercase[deploy-bar] at org.activiti.engine.impl.util.ReflectUtil.loadClass(ReflectUtil.java:64) [deploy-bar] at org.activiti.engine.impl.util.ReflectUtil.instantiate(ReflectUtil.java:111) [deploy-bar] … 33 more
BUILD FAILED D:\activiti\activiti-5.0.rc1\setup\build.xml:404: couldn't deploy bar D:\activiti\activiti-5.0.rc1\setup\build\ToUppercase.bar: couldn't instantiate class org.activiti.examples.bpmn.servicetask.ToUppercase
When you deploy, the class needs to be on the classpath. So, it must be added to your classptah of your ant task.
However, when I now think about it, this is not really easy to use - since you would also need to have it on the classpath on your war or server environment.