5 Replies Latest reply on Oct 22, 2008 5:24 AM by ruchika

    jbpm configuration resource 'jbpm.cfg.xml' is not available

    ajanz

      hi,

      i write a jsf application on top of jbpm.

      when i try to access jbpmconfiguration i got

      jbpm configuration resource 'jbpm.cfg.xml' is not available

      where must i put this file ? tried everywhere whith no success.

      i use 3.2.3

        • 1. Re: jbpm configuration resource 'jbpm.cfg.xml' is not availa
          jbarrez

          - If the config file is not named 'jbpm.cfg.xml' -> this is a bug in 3.2.3. Rename the file to jbpm.cfg.xml and it is fixed.

          - If not, having the config file on the classpath usually does the trick

          • 2. Re: jbpm configuration resource 'jbpm.cfg.xml' is not availa
            ajanz

            ok, i thaught i did that...but i put the configuration file in the wrong directory...

            inspecting the classpath at runtime with

            System.out.println("Classpath:" + System.getProperty("java.class.path"));

            gave me the info i needed....

            hrmpf. so easy..sorry

            • 3. Re: jbpm configuration resource 'jbpm.cfg.xml' is not availa

              Hello,

              As suggested by you I printed the classpath and and found file is present there.
              What else I need to have to access it from external stanalone application?
              Some specific directory structure or something else?

              I am getting below error:

              log4j:WARN No appenders could be found for logger (org.jbpm.JbpmConfiguration).
              log4j:WARN Please initialize the log4j system properly.
              Exception in thread "main" org.jbpm.JbpmException: couldn't parse jbpm configuration from resource 'D:\eclipse_new\eclipse-SDK-3.4.1-win32\eclipse\workspace\TestEvenNumberjDPL\src\lib\jbpm.cfg.xml'
              at org.jbpm.JbpmConfiguration.getInstance(JbpmConfiguration.java:292)
              at EvenNumbersTest.main(EvenNumbersTest.java:15)
              Caused by: org.jbpm.JbpmException: jbpm configuration resource 'D:\eclipse_new\eclipse-SDK-3.4.1-win32\eclipse\workspace\TestEvenNumberjDPL\src\lib\jbpm.cfg.xml' is not available
              at org.jbpm.JbpmConfiguration.getInstance(JbpmConfiguration.java:286)
              ... 1 more

              Regards,
              Ruchika

              • 4. Re: jbpm configuration resource 'jbpm.cfg.xml' is not availa
                ajanz

                sorry for asking but does

                'D:\eclipse_new\eclipse-SDK-3.4.1-win32\eclipse\workspace\TestEvenNumberjDPL\src\lib\jbpm.cfg.xml'

                exist?

                • 5. Re: jbpm configuration resource 'jbpm.cfg.xml' is not availa

                  Yes, I have put 'jbpm.cfg.xml' in lib of my java project.

                  Let me explain you whole scenario:

                  I have developed business process using eclipse.
                  Now I have java project in which I have class trying to access this process.
                  For your reference I am putting snipet of code below:

                  ....
                  JbpmConfiguration jbpmConfiguration = JbpmConfiguration.getInstance("D:\\eclipse_new\\eclipse-SDK-3.4.1-win32\\eclipse\\workspace\\TestEvenNumberjDPL\\src\\lib\\jbpm.cfg.xml");

                  //jbpmConfiguration.parseResource("D:\\eclipse_new\\eclipse-SDK-3.4.1-win32\\eclipse\\workspace\\TestEvenNumberjDPL\\src\\lib\\jbpm.cfg.xml");
                  //jbpmConfiguration.parseXmlString("D:\\eclipse_new\\eclipse-SDK-3.4.1-win32\\eclipse\\workspace\\TestEvenNumberjDPL\\src\\lib\\jbpm.cfg.xml");

                  JbpmContext jbpmContext = jbpmConfiguration.createJbpmContext();

                  try {

                  ProcessDefinition definition = ProcessDefinition.parseXmlResource("D:/eclipse_new/eclipse-SDK-3.4.1-win32/eclipse/workspace/Even-number-manipulation/src/main/jpdl/add-even-numbers/processdefinition.xml");

                  ProcessInstance instance = new ProcessInstance(definition);
                  .....

                  I have a lib folder consisting all requied jar and 'jbpm.cfg.xml'.
                  I am not sure whether this is correct way or not.
                  Can you please suggest me the required steps?

                  Regards,
                  Ruchika