4 Replies Latest reply on Mar 3, 2008 5:06 AM by Thorsten Kraus

    Problem instantiating a delegate class

    Thorsten Kraus Newbie

      Hi,

      I have a small processdefinition which calls a ActionHandler when entering a transition:

      <?xml version="1.0" encoding="UTF-8"?>
      
      <process-definition xmlns="urn:jbpm.org:jpdl-3.2" name="TransportProcessDef">
       <start-state name="start">
       <transition name="" to="state1">
       <action class="com.xxx.man.MyAction" name="Doing some complex things"></action>
       </transition>
       </start-state>
       <state name="state1">
       <transition name="toEnd1" to="end1"></transition>
       </state>
       <end-state name="end1"></end-state>
      </process-definition>
      


      When I run the process, I get the following exception:
      ERROR [org.jbpm.instantiation.Delegation] couldn't instantiate delegation class 'com.ptvag.jabba.tourmgmt.MyAction'
      java.lang.NullPointerException...


      I don't understand this behaviour, because I can instantiate an object of the Class MyAction with a Classloader without any problem:
      Class clazz = c.loadClass("com.xxx.man.MyAction");
      MyAction a = (MyAction) clazz.newInstance();
      a.execute(null);
      


      Can anybody help me with this problem? Thanks in advance!

      Regards,
      TMK