0 Replies Latest reply on Sep 11, 2010 3:31 AM by Chaitanya Desai

    org.jbpm.api.JbpmException: couldn't get resource urls for jbpm.user.wire.bindings.xml

    Chaitanya Desai Newbie

      I have a sample Hello project with following structure

      C:\jbpmTrial\Hello is my workspace :  Hello is the project within jbpmTrial workspace

       

      *Hello

         ------src

               ------org.example.sample.greeting

                     -----Hello.java

                     -----hello.jpdl.xml

                     ------hello.png

                     ------review.ftl

               ------- jbpm.cfg.xml

               ------- jbpm.hibernate.cfg.xml  

          jBPM Libraries

       

      jbpm installation: C:\jbpm-4.4

      Jboss: C:\jboss-5.1.0.GA

      jdk:C:\jdk1.6.0_21

       

      I modified the ant build file provided with sample examples to deploy Hello project. I am able to see deployment on jbpm console and even the task forms and view the sample println outputs produced from another function in Hello.java file using cmd.

       

      However when i try to access the processEngine and program/code certain logic in the main method I get an error

       

      Exception in thread "main" java.lang.ExceptionInInitializerError

      at org.jbpm.pvm.internal.cfg.ConfigurationParser.<init>(ConfigurationParser.java:46)

      at org.jbpm.pvm.internal.cfg.ConfigurationParser.<clinit>(ConfigurationParser.java:49)

      at org.jbpm.pvm.internal.cfg.ConfigurationImpl.parse(ConfigurationImpl.java:137)

      at org.jbpm.pvm.internal.cfg.ConfigurationImpl.setResource(ConfigurationImpl.java:116)

      at org.jbpm.pvm.internal.cfg.ConfigurationImpl.setResource(ConfigurationImpl.java:50)

      at org.jbpm.api.Configuration.setResource(Configuration.java:79)

      at org.example.sample.greeting.Hello.main(Hello.java:26)

      Caused by: org.jbpm.api.JbpmException: couldn't get resource urls for jbpm.user.wire.bindings.xml

      at org.jbpm.pvm.internal.wire.xml.WireParser.<clinit>(WireParser.java:284)

      ... 7 more

      Caused by: java.lang.NullPointerException

      at org.jbpm.pvm.internal.wire.xml.WireParser.<clinit>(WireParser.java:281)

      ... 7 more

       

      The error  is observed @ line:

      ProcessEngine processEngine = new Configuration().setResource("C:/jbpmTrial/Hello/src/jbpm.cfg.xml").buildProcessEngine();

       

      The main method that i am trying to run is :

       

      public static void main(String args[])

      {

      String location="C:/jbpmTrial/Hello/src/jbpm.cfg.xml";

      URL u = ClassLoader.getSystemResource(location);

       

      ProcessEngine processEngine = new Configuration().setResource("C:/jbpmTrial/Hello/src/jbpm.cfg.xml").buildProcessEngine();

       

       

      System.out.println("Hello world, Starting the flow");

       

      System.out.println("Ending the flow");

       

      }

       

       

      jbpm.cfg.xml file is:

       

      <?xml version="1.0" encoding="UTF-8"?>
      <jbpm-configuration>
        <import resource="jbpm.default.cfg.xml" />
        <import resource="jbpm.businesscalendar.cfg.xml" />
        <import resource="jbpm.tx.hibernate.cfg.xml" />
        <import resource="jbpm.jpdl.cfg.xml" />
        <import resource="jbpm.bpmn.cfg.xml" />
        <import resource="jbpm.identity.cfg.xml" />
        <!-- Job executor is excluded for running the example test cases. -->
        <!-- To enable timers and messages in production use, this should be included. -->
        <!--
        <import resource="jbpm.jobexecutor.cfg.xml" />
        -->
        <string name="jbpm.mail.smtp.host" value="smtp.gmail.com" />
        <string name="resource.mail.properties" value="jbpm.mail.properties" />
       
      </jbpm-configuration>

      <?xml version="1.0" encoding="UTF-8"?>

       

      <jbpm-configuration>

       

        <import resource="jbpm.default.cfg.xml" />

        <import resource="jbpm.businesscalendar.cfg.xml" />

        <import resource="jbpm.tx.hibernate.cfg.xml" />

        <import resource="jbpm.jpdl.cfg.xml" />

        <import resource="jbpm.bpmn.cfg.xml" />

        <import resource="jbpm.identity.cfg.xml" />

       

        <!-- Job executor is excluded for running the example test cases. -->

        <!-- To enable timers and messages in production use, this should be included. -->

        <!--

        <import resource="jbpm.jobexecutor.cfg.xml" />

        -->

        <string name="jbpm.mail.smtp.host" value="smtp.gmail.com" />

        <string name="resource.mail.properties" value="jbpm.mail.properties" />

       

       

      </jbpm-configuration>

       

      Can anyone please explain me What is the root cause and give me pointers in appropriate direction to solve this. I am starting with Jbpm.