Hi,
I am able to start a jbpm4.4 process from a servlet by passing a process variable (com.process.servicedata.Plan). However, a decision handler later in the process gets a classcast exception when accessing this variable:
java.lang.ClassCastException
: com.process.servicedata.Plan cannot be cast to com.process.servicedata.Plan
at com.process.activitymodel.HealthPlanDecisionHandler.decide(
HealthPlanDecisionHandler.java:15)
at org.jbpm.jpdl.internal.activity.DecisionHandlerActivity.execute(
DecisionHandlerActivity.java:60)
at org.jbpm.jpdl.internal.activity.DecisionHandlerActivity.execute(
DecisionHandlerActivity.java:42)
at org.jbpm.pvm.internal.model.op.ExecuteActivity.perform(
ExecuteActivity.java:60)
at org.jbpm.pvm.internal.model.ExecutionImpl.performAtomicOperationSync(
ExecutionImpl.java:672)
at org.jbpm.pvm.internal.model.ExecutionImpl.performAtomicOperation(
ExecutionImpl.java:632)
at org.jbpm.pvm.internal.model.op.TransitionEndActivity.perform(
TransitionEndActivity.java:56)
This appears to be a classloader problem, so here are the details on my project structure:
- process-web.war contains the servlet that starts the process.
- process.jpdl.xml is in process.jar
- process.jar is in WEB-INF/lib of process-web.war.
- all the jbpm libraries (e.g. jbpm.jar) are in the WEB-INF/lib.
- process.jpdl.xml in process.jar is deployed using an Ant script that was taken from the examples app that comes with jbpm.
- process-web.war is deployed to jboss 5 and uses jbpm 4.4.
Any clues on what am I missing?
Thanks,