1 Reply Latest reply on May 30, 2006 2:44 AM by d b

    Why different ClassLoader Instances for different ActionHand

    Tanju Erinmez Newbie

      Greetings,

      I'm in the "process" of evaluating jBPM and have come across the problem below (I have skimmed through classloader posts with no solution).

      I'm able to package up a par with 2 ActionHandlers + 1 data class and upload it via gpd 3.0.8 (patched for additional class inclusion) to a tomcat 5.5.12 webapp including jbpm 3.1.

      The first actionHandler creates an object and stores it in the processcontext. The second actionHandler is able to find it, however, a ClassCastException occurs when I try to cast it to a variable of the very same class type.

      <process-definition xmlns="urn:jbpm.org:jpdl-3.1" name="simple">
       <start-state name="start">
       <event type="node-leave">
       <action name="actionA" class="simple.HandlerA"></action>
       <action name="actionB" class="simple.HandlerB"></action>
       </event>
       <transition name="end" to="end"></transition>
       </start-state>
       <end-state name="end"></end-state>
      </process-definition>
      


      I have printed out the class loaders and they seem to be different for each of the two ActionHandler classes. In absence of a common (versioned) parent classloader this would explain this effect.

      What could be the solution to this problem? Couldn't the ActionHandlers be loaded with the same "per process instance" loader?

      Thanks for any pointers,
      Tanju