7 Replies Latest reply on Apr 10, 2006 10:28 AM by koen.aers

    Class could not be found by the process classloader

    fidalma

      Hi all,
      I'm doing several tests with JBpm and in this moment I'm trying
      to execute a script command by an ActionHandler class implementation,
      but I have a problem and in order to explain it correctly I attach my code.

      -------------------------------------- PROCESS DEFINITION --------------------------------------
      
      <?xml version="1.0" encoding="UTF-8"?>
      <process-definition xmlns="urn:jbpm.org:jpdl-3.1" name="Initiator">
       <swimlane name="initiator" />
       <start-state name="start new process">
       <task swimlane="process initiator" />
       <transition name="tr1" to="decision">
       <action name="action"
       class="com.sample.action.SampleActionHendler">
       <message>Executing SampleActionHendler!</message>
       </action>
       </transition>
       </start-state>
       <decision name="decision">
       <handler
       class="com.sample.decision.SampleDecisionHendler">
       </handler>
       <transition name="tr2" to="action"></transition>
       <transition name="tr3" to="end1"></transition>
       </decision>
       <state name="action">
       <transition name="tr4" to="end1"></transition>
       </state>
       <end-state name="end1"></end-state>
      </process-definition>
      
      
      ---------------------------------------- MY ACTION HANDLER --------------------------------------
      
      
      package com.sample.action;
      
      import org.jbpm.graph.def.ActionHandler;
      import org.jbpm.graph.exe.ExecutionContext;
      
      public class SampleActionHandler implements ActionHandler
      {
       private static final long serialVersionUID = 1L;
       public void execute(ExecutionContext context) throws Exception
       {
       Runtime rt = null;
       Process process = null;
      
       context.getContextInstance().createVariable("greeting", "Greeting from SampleActionHandler");
       try
       {
       rt = Runtime.getRuntime();
       process = rt.exec("C:\\Applications~1\\ECLIPSE~1\\Start.bat");
       context.getContextInstance().createVariable("status", new Integer(process.waitFor()));
       }
       catch (Exception e)
       {
       System.out.println(e);
       context.getContextInstance().createVariable("budget", new Integer(1));
       }
       }
      }
      
      
      ------------------------------------- MY DECISION HANDLER --------------------------------------
      
      
      package com.sample.decision;
      
      import org.jbpm.graph.exe.ExecutionContext;
      import org.jbpm.graph.node.DecisionHandler;
      
      public class SampleDecisionHandler implements DecisionHandler
      {
       private static final long serialVersionUID = 1L;
       public String decide(ExecutionContext context) throws Exception
       {
       int budget = ((Number)context.getContextInstance().getVariable("status")).intValue();
       if (budget == 0) return "tr2";
       else if (budget == 1) return "tr3";
       else return "tr3";
       }
      }
      
      
      ---------------------------------------- MY TEST CASE ----------------------------------------
      
      
      package com.sample.test;
      
      import com.sample.action.SampleActionHandler;
      import org.jbpm.graph.def.ProcessDefinition;
      import org.jbpm.graph.exe.ProcessInstance;
      import junit.framework.TestCase;
      
      public class InitiatorTest extends TestCase
      {
       public void testProcess() throws Exception
       {
       ProcessDefinition definition = ProcessDefinition.parseXmlResource("Initiator.par/processdefinition.xml");
       assertNotNull("Definition should not be null", definition);
      
       ProcessInstance instance = new ProcessInstance(definition);
       assertEquals("Instance is in start state", instance.getRootToken().getNode().getName(),"start new process");
       instance.signal();
      
       if(((Number)instance.getContextInstance().getVariable("status")).intValue() == 0)
       {
       assertEquals(definition.getNode("action"), instance.getRootToken().getNode());
       instance.signal();
       }
      
       assertEquals("Instance is in end state", instance.getRootToken().getNode().getName(),"end1");
       }
      }
      
      
      ---------------------------------- MY EXCEPTION EXECUTING MY TEST CASE ----------------------------------
      
      If I run as JUnit Test my Test Case clss I have theese exceptions:
      
      15:39:09,863 [main] INFO JbpmConfiguration : using jbpm configuration resource 'jbpm.cfg.xml'
      15:39:10,269 [main] DEBUG JbpmConfiguration : creating jbpm configuration from input stream
      15:39:10,644 [main] DEBUG JpdlParser$JpdlEntityResolver : resolving schema reference publicId(null) systemId(http://jbpm.org/jpdl-3.1.xsd)
      15:39:10,644 [main] DEBUG JpdlParser$JpdlEntityResolver : providing input source to local 'jpdl-3.1.xsd' resource
      15:39:10,801 [main] WARN JpdlXmlReader : process xml warning: swimlane 'initiator' does not have an assignment
      15:39:10,847 [main] DEBUG NodeTypes : node 'page' will not be available. class 'org.jboss.seam.jbpm.Page' couldn't be loaded
      15:39:10,910 [main] WARN JpdlXmlReader : process xml warning: task references unknown swimlane 'process initiator':<task xmlns="urn:jbpm.org:jpdl-3.1" swimlane="process initiator" blocking="false" signalling="true" priority="normal"/>
      15:39:10,941 [main] WARN JpdlXmlReader : process xml warning: swimlane 'initiator' does not have an assignment
      15:39:10,972 [main] DEBUG GraphElement : event 'process-start' on 'ProcessDefinition(Initiator)' for 'Token(/)'
      15:39:10,972 [main] DEBUG GraphElement : event 'before-signal' on 'StartState(start new process)' for 'Token(/)'
      15:39:10,972 [main] DEBUG GraphElement : event 'node-leave' on 'StartState(start new process)' for 'Token(/)'
      15:39:10,972 [main] DEBUG GraphElement : event 'transition' on 'Transition(tr1)' for 'Token(/)'
      15:39:10,972 [main] DEBUG GraphElement : executing action 'action[action]'
      15:39:10,988 [main] ERROR Delegation : couldn't load delegation class 'com.sample.action.SampleActionHendler'
      java.lang.ClassNotFoundException: class 'com.sample.action.SampleActionHendler' could not be found by the process classloader
       at org.jbpm.instantiation.ProcessClassLoader.findClass(ProcessClassLoader.java:60)
       at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
       at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
       at org.jbpm.instantiation.Delegation.instantiate(Delegation.java:140)
       at org.jbpm.instantiation.Delegation.getInstance(Delegation.java:125)
       at org.jbpm.graph.def.Action.execute(Action.java:122)
       at org.jbpm.graph.def.GraphElement.executeAction(GraphElement.java:235)
       at org.jbpm.graph.def.GraphElement.executeActions(GraphElement.java:212)
       at org.jbpm.graph.def.GraphElement.fireAndPropagateEvent(GraphElement.java:182)
       at org.jbpm.graph.def.GraphElement.fireEvent(GraphElement.java:166)
       at org.jbpm.graph.def.Transition.take(Transition.java:106)
       at org.jbpm.graph.def.Node.leave(Node.java:382)
       at org.jbpm.graph.node.StartState.leave(StartState.java:70)
       at org.jbpm.graph.exe.Token.signal(Token.java:174)
       at org.jbpm.graph.exe.Token.signal(Token.java:123)
       at org.jbpm.graph.exe.ProcessInstance.signal(ProcessInstance.java:217)
       at com.sample.test.InitiatorTest.testProcess(InitiatorTest.java:19)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:324)
       at junit.framework.TestCase.runTest(TestCase.java:154)
       at junit.framework.TestCase.runBare(TestCase.java:127)
       at junit.framework.TestResult$1.protect(TestResult.java:106)
       at junit.framework.TestResult.runProtected(TestResult.java:124)
       at junit.framework.TestResult.run(TestResult.java:109)
       at junit.framework.TestCase.run(TestCase.java:118)
       at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:478)
       at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:344)
       at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
      15:39:10,988 [main] ERROR Delegation : couldn't instantiate delegation class 'com.sample.action.SampleActionHendler'
      java.lang.NullPointerException
       at org.jbpm.instantiation.FieldInstantiator.newInstance(FieldInstantiator.java:89)
       at org.jbpm.instantiation.FieldInstantiator.instantiate(FieldInstantiator.java:48)
       at org.jbpm.instantiation.Delegation.instantiate(Delegation.java:163)
       at org.jbpm.instantiation.Delegation.getInstance(Delegation.java:125)
       at org.jbpm.graph.def.Action.execute(Action.java:122)
       at org.jbpm.graph.def.GraphElement.executeAction(GraphElement.java:235)
       at org.jbpm.graph.def.GraphElement.executeActions(GraphElement.java:212)
       at org.jbpm.graph.def.GraphElement.fireAndPropagateEvent(GraphElement.java:182)
       at org.jbpm.graph.def.GraphElement.fireEvent(GraphElement.java:166)
       at org.jbpm.graph.def.Transition.take(Transition.java:106)
       at org.jbpm.graph.def.Node.leave(Node.java:382)
       at org.jbpm.graph.node.StartState.leave(StartState.java:70)
       at org.jbpm.graph.exe.Token.signal(Token.java:174)
       at org.jbpm.graph.exe.Token.signal(Token.java:123)
       at org.jbpm.graph.exe.ProcessInstance.signal(ProcessInstance.java:217)
       at com.sample.test.InitiatorTest.testProcess(InitiatorTest.java:19)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:324)
       at junit.framework.TestCase.runTest(TestCase.java:154)
       at junit.framework.TestCase.runBare(TestCase.java:127)
       at junit.framework.TestResult$1.protect(TestResult.java:106)
       at junit.framework.TestResult.runProtected(TestResult.java:124)
       at junit.framework.TestResult.run(TestResult.java:109)
       at junit.framework.TestCase.run(TestCase.java:118)
       at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:478)
       at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:344)
       at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
      15:39:11,004 [main] ERROR GraphElement : action threw exception: null
      java.lang.NullPointerException
       at org.jbpm.graph.def.Action.execute(Action.java:123)
       at org.jbpm.graph.def.GraphElement.executeAction(GraphElement.java:235)
       at org.jbpm.graph.def.GraphElement.executeActions(GraphElement.java:212)
       at org.jbpm.graph.def.GraphElement.fireAndPropagateEvent(GraphElement.java:182)
       at org.jbpm.graph.def.GraphElement.fireEvent(GraphElement.java:166)
       at org.jbpm.graph.def.Transition.take(Transition.java:106)
       at org.jbpm.graph.def.Node.leave(Node.java:382)
       at org.jbpm.graph.node.StartState.leave(StartState.java:70)
       at org.jbpm.graph.exe.Token.signal(Token.java:174)
       at org.jbpm.graph.exe.Token.signal(Token.java:123)
       at org.jbpm.graph.exe.ProcessInstance.signal(ProcessInstance.java:217)
       at com.sample.test.InitiatorTest.testProcess(InitiatorTest.java:19)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:324)
       at junit.framework.TestCase.runTest(TestCase.java:154)
       at junit.framework.TestCase.runBare(TestCase.java:127)
       at junit.framework.TestResult$1.protect(TestResult.java:106)
       at junit.framework.TestResult.runProtected(TestResult.java:124)
       at junit.framework.TestResult.run(TestResult.java:109)
       at junit.framework.TestCase.run(TestCase.java:118)
       at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:478)
       at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:344)
       at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
      
      
      -------------------------------------------------------------------------------------------------
      



      I don't understand why I'm having this error...
      Could someone help me please?!
      Thank you very much in advance.

      Fidalma
      Italy

        • 1. Re: Class could not be found by the process classloader
          aguizar

          Your action handler class does not seem to be on the classpath. Are you using the GPD? If so, did you modify the build path of the Eclipse project?

          • 2. Re: Class could not be found by the process classloader
            fidalma

            Hi Alex,
            yes I'm using the Eclipse GPD, but when I build my project I don't have errors in compilation so I thought my classpath was ok. How do I have to modify the build path of Eclipse Project ?
            Thank you very much !!

            Bye,
            Fidalma

            • 3. Re: Class could not be found by the process classloader
              koen.aers

              Fidalma,

              It is a typo in your processdefinition file. You typed 'SampleActionHendler' instead of 'SampleActionHandler'.

              Regards,
              Koen

              • 4. Re: Class could not be found by the process classloader
                fidalma

                Noooo I can't believe it !!
                I'm really blind and so sorry ... :-((
                thanky very much !!

                Bye,
                Fidalma

                • 5. Couldn't parse process definition...
                  fidalma

                  Hi all,
                  I am always in trouble... sigh...
                  I have solved the previous stupid problem, but now I have another one.
                  This is the situation:

                  -------------------------------------- PROCESS DEFINITION --------------------------------------
                  
                  <?xml version="1.0" encoding="UTF-8"?>
                  <process-definition xmlns="urn:jbpm.org:jpdl-3.1" name="Initiator">
                   <swimlane name="initiator" />
                   <start-state name="start new process">
                   <task swimlane="process initiator" />
                   <transition name="tr1" to="decision">
                   <action name="action" class="com.sample.action.SampleActionHandler">
                   </action>
                   </transition>
                   </start-state>
                   <decision name="decision">
                   <handler class="com.sample.decision.SampleDecisionHandler"></handler>
                   <transition name="tr2" to="action"></transition>
                   <transition name="tr3" to="end1"></transition>
                   </decision>
                   <state name="action">
                   <transition name="tr4" to="end1"></transition>
                   </state>
                   <end-state name="end1"></end-state>
                  </process-definition>
                  ---------------------------------------- MY ACTION HANDLER --------------------------------------
                  
                  
                  package com.sample.action;
                  
                  import org.jbpm.graph.def.ActionHandler;
                  import org.jbpm.graph.exe.ExecutionContext;
                  
                  public class SampleActionHandler implements ActionHandler
                  {
                   private static final long serialVersionUID = 1L;
                   public void execute(ExecutionContext context) throws Exception
                   {
                   Runtime rt = null;
                   Process process = null;
                  
                   context.getContextInstance().createVariable("greeting", "Greeting from SampleActionHandler");
                   try
                   {
                   rt = Runtime.getRuntime();
                   process = rt.exec("C:\\Applications~1\\ECLIPSE~1\\Start.bat");
                   context.getContextInstance().createVariable("status", new Integer(process.waitFor()));
                   }
                   catch (Exception e)
                   {
                   System.out.println(e);
                   context.getContextInstance().createVariable("budget", new Integer(1));
                   }
                   }
                  }
                  
                  
                  ------------------------------------- MY DECISION HANDLER --------------------------------------
                  
                  
                  package com.sample.decision;
                  
                  import org.jbpm.graph.exe.ExecutionContext;
                  import org.jbpm.graph.node.DecisionHandler;
                  
                  public class SampleDecisionHandler implements DecisionHandler
                  {
                   private static final long serialVersionUID = 1L;
                   public String decide(ExecutionContext context) throws Exception
                   {
                   int budget = ((Number)context.getContextInstance().getVariable("status")).intValue();
                   if (budget == 0) return "tr2";
                   else if (budget == 1) return "tr3";
                   else return "tr3";
                   }
                  }
                  
                  
                  ---------------------------------------- MY NEW CLASS ----------------------------------------
                  
                  
                  package com.sample.util;
                  
                  import org.jbpm.graph.def.ProcessDefinition;
                  import org.jbpm.graph.exe.ProcessInstance;
                  
                  public class StartProcess
                  {
                   private String path = "";
                  
                   /** Creates a new instance of StartProcess */
                   private StartProcess()
                   {
                   path = "C:\\Applications and Projects\\ECLIPSE Workspace\\Process Initiator\\src\\" +
                   "process\\Initiator.par\\processdefinition.xml";
                   }
                  
                  
                   /** */
                   public void init()
                   {
                   try
                   {
                   ProcessDefinition def = ProcessDefinition.parseXmlResource(path);
                   System.out.println("STEP 1 - Istanziata la classe ProcessDefinition");
                  
                   ProcessInstance instance = new ProcessInstance(def);
                   System.out.println("STEP 2 - Istanziata la classe ProcessInstance");
                  
                   instance.signal();
                   System.out.println("STEP 3 - Effettuato il primo signal");
                   }
                   catch(Exception e)
                   {
                   System.err.println(e.getMessage());
                   //e.printStackTrace();
                   }
                   }
                  
                  
                   /** */
                   public static void main(String[] args)
                   {
                   try
                   {
                   StartProcess sp = new StartProcess();
                   System.out.println("STEP 0 - Istanziata la classe StartProcess");
                   System.out.println(sp.path);
                   sp.init();
                   }
                   catch(Exception exc)
                   {
                   System.err.println(exc.getMessage());
                   exc.printStackTrace();
                   }
                   }
                  }
                  


                  • 6. Couldn't parse process definition...
                    fidalma

                    Hi all,
                    I am always in trouble... sigh...
                    I have solved the previous stupid problem, but now I have another one.
                    This is the situation:

                    -------------------------------------- PROCESS DEFINITION --------------------------------------
                    
                    <?xml version="1.0" encoding="UTF-8"?>
                    <process-definition xmlns="urn:jbpm.org:jpdl-3.1" name="Initiator">
                     <swimlane name="initiator" />
                     <start-state name="start new process">
                     <task swimlane="process initiator" />
                     <transition name="tr1" to="decision">
                     <action name="action" class="com.sample.action.SampleActionHandler">
                     </action>
                     </transition>
                     </start-state>
                     <decision name="decision">
                     <handler class="com.sample.decision.SampleDecisionHandler"></handler>
                     <transition name="tr2" to="action"></transition>
                     <transition name="tr3" to="end1"></transition>
                     </decision>
                     <state name="action">
                     <transition name="tr4" to="end1"></transition>
                     </state>
                     <end-state name="end1"></end-state>
                    </process-definition>
                    
                    
                    ---------------------------------------- MY ACTION HANDLER --------------------------------------
                    
                    
                    package com.sample.action;
                    
                    import org.jbpm.graph.def.ActionHandler;
                    import org.jbpm.graph.exe.ExecutionContext;
                    
                    public class SampleActionHandler implements ActionHandler
                    {
                     private static final long serialVersionUID = 1L;
                     public void execute(ExecutionContext context) throws Exception
                     {
                     Runtime rt = null;
                     Process process = null;
                    
                     context.getContextInstance().createVariable("greeting", "Greeting from SampleActionHandler");
                     try
                     {
                     rt = Runtime.getRuntime();
                     process = rt.exec("C:\\Applications~1\\ECLIPSE~1\\Start.bat");
                     context.getContextInstance().createVariable("status", new Integer(process.waitFor()));
                     }
                     catch (Exception e)
                     {
                     System.out.println(e);
                     context.getContextInstance().createVariable("budget", new Integer(1));
                     }
                     }
                    }
                    
                    
                    ------------------------------------- MY DECISION HANDLER --------------------------------------
                    
                    
                    package com.sample.decision;
                    
                    import org.jbpm.graph.exe.ExecutionContext;
                    import org.jbpm.graph.node.DecisionHandler;
                    
                    public class SampleDecisionHandler implements DecisionHandler
                    {
                     private static final long serialVersionUID = 1L;
                     public String decide(ExecutionContext context) throws Exception
                     {
                     int budget = ((Number)context.getContextInstance().getVariable("status")).intValue();
                     if (budget == 0) return "tr2";
                     else if (budget == 1) return "tr3";
                     else return "tr3";
                     }
                    }
                    
                    
                    ---------------------------------------- MY NEW CLASS ----------------------------------------
                    
                    
                    package com.sample.util;
                    
                    import org.jbpm.graph.def.ProcessDefinition;
                    import org.jbpm.graph.exe.ProcessInstance;
                    
                    public class StartProcess
                    {
                     private String path = "";
                    
                     /** Creates a new instance of StartProcess */
                     private StartProcess()
                     {
                     path = "C:\\Applications and Projects\\ECLIPSE Workspace\\Process Initiator\\src\\" +
                     "process\\Initiator.par\\processdefinition.xml";
                     }
                    
                    
                     public void init()
                     {
                     try
                     {
                     ProcessDefinition def = ProcessDefinition.parseXmlResource(path);
                     System.out.println("STEP 1 - Istanziata la classe ProcessDefinition");
                    
                     ProcessInstance instance = new ProcessInstance(def);
                     System.out.println("STEP 2 - Istanziata la classe ProcessInstance");
                    
                     instance.signal();
                     System.out.println("STEP 3 - Effettuato il primo signal");
                     }
                     catch(Exception e)
                     {
                     System.err.println(e.getMessage());
                     //e.printStackTrace();
                     }
                     }
                    
                    
                     public static void main(String[] args)
                     {
                     try
                     {
                     StartProcess sp = new StartProcess();
                     System.out.println("STEP 0 - Istanziata la classe StartProcess");
                     System.out.println(sp.path);
                     sp.init();
                     }
                     catch(Exception exc)
                     {
                     System.err.println(exc.getMessage());
                     exc.printStackTrace();
                     }
                     }
                    }
                    


                    When I try to execute my class "StartProcess" then I have the error "Couldn't parse process definition...". This is the output:

                    [java] STEP 0 - Istanziata la classe StartProcess
                    [java] C:\Applications and Projects\ECLIPSE Workspace\Process Initiator\src\process\Initiator.par\processdefinition.xml
                    [java] 11:46:44,190 [main] INFO JbpmConfiguration : using jbpm configuration resource 'jbpm.cfg.xml'
                    [java] 11:46:44,737 [main] DEBUG JbpmConfiguration : creating jbpm configuration from input stream
                    [java] 11:46:44,831 [main] ERROR JpdlXmlReader : couldn't parse process definition
                    [java] org.dom4j.DocumentException: null Nested exception: null
                    [java] at org.dom4j.io.SAXReader.read(SAXReader.java:484)
                    [java] at org.jbpm.jpdl.xml.JpdlParser.parse(JpdlParser.java:57)
                    [java] at org.jbpm.jpdl.xml.JpdlXmlReader.readProcessDefinition(JpdlXmlReader.java:138)
                    [java] at org.jbpm.graph.def.ProcessDefinition.parseXmlInputStream(ProcessDefinition.java:172)
                    [java] at org.jbpm.graph.def.ProcessDefinition.parseXmlResource(ProcessDefinition.java:153)
                    [java] at com.sample.util.StartProcess.init(StartProcess.java:22)
                    [java] at com.sample.util.StartProcess.main(StartProcess.java:47)
                    [java] Nested exception:
                    [java] [[ERROR] couldn't parse process definition]
                    [java] java.net.MalformedURLException
                    [java] at java.net.URL.(URL.java:571)
                    [java] at java.net.URL.(URL.java:434)
                    [java] at java.net.URL.(URL.java:383)
                    [java] at org.apache.xerces.impl.XMLEntityManager.setupCurrentEntity(Unknown Source)
                    [java] at org.apache.xerces.impl.XMLVersionDetector.determineDocVersion(Unknown Source)
                    [java] at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
                    [java] at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
                    [java] at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
                    [java] at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
                    [java] at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
                    [java] at org.dom4j.io.SAXReader.read(SAXReader.java:465)
                    [java] at org.jbpm.jpdl.xml.JpdlParser.parse(JpdlParser.java:57)
                    [java] at org.jbpm.jpdl.xml.JpdlXmlReader.readProcessDefinition(JpdlXmlReader.java:138)
                    [java] at org.jbpm.graph.def.ProcessDefinition.parseXmlInputStream(ProcessDefinition.java:172)
                    [java] at org.jbpm.graph.def.ProcessDefinition.parseXmlResource(ProcessDefinition.java:153)
                    [java] at com.sample.util.StartProcess.init(StartProcess.java:22)
                    [java] at com.sample.util.StartProcess.main(StartProcess.java:47)


                    Could someone explain to me why I'm having this error and what do I have to do to solve it ?

                    Thank you very much in advance !!

                    Regards,
                    Fidalma
                    Italy


                    P.S. probably you will find two posts because I clicked "Submit" button twice instead of "Preview" button ... sorry...

                    • 7. Re: Class could not be found by the process classloader
                      koen.aers

                      Fidalma,

                      It says the URL is not found. You should put the processdefinition you want to read on the classpath if you want to use the ProcessDefinition.parseXmlResource() method.

                      Regards,
                      Koen