1 Reply Latest reply on Jun 15, 2011 11:00 AM by melc

    'sample.bpmn' cannot be opened because it does not exist

    jbpm5learner

      Hello Collegues,

       

      I just tried to implement a very basic jbpm5-functionality in a web-application. I want to create a "sample"-process and later on save it. The problem is now that although the sample-bpmn-file is in the same directory as my Action-Servlet, it cannot be found.

       

      Is this command correct: ?

       

        Resource res = ResourceFactory.newClassPathResource("sample.bpmn");

       

      Where does "newClassPathResource" start looking for the specified file ?

        • 1. Re: 'sample.bpmn' cannot be opened because it does not exist
          melc

          Hello,

          It looks in the application's classpath, if i'm not mistaken. So checkout how to load this with a classloader from one of your objects. For example if your servlet is in package myservlets.TheServlet.class and your file sample.bpmn is in the same folder, then you must specify the path as "myservlets/sample.bpmn".