JBoss Community

jbpm process variable - Classcastexception/ classloader issues

created by Mahavir Jain in jBPM Development - View the full discussion

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:

 

 

  1. process-web.war contains the servlet that starts the process.
  1. process.jpdl.xml is in process.jar
  2. process.jar is in WEB-INF/lib of process-web.war. 
  3. all the jbpm libraries (e.g. jbpm.jar) are in the WEB-INF/lib. 
  4. process.jpdl.xml in process.jar is deployed using an Ant script that was taken from the examples app that comes with jbpm. 
  5. process-web.war is deployed to jboss 5 and uses jbpm 4.4.

 

Any clues on what am I missing?

 

Thanks,

 

 

 

 

 

 



Reply to this message by going to Community

Start a new discussion in jBPM Development at Community