5 Replies Latest reply on Feb 14, 2009 2:48 PM by Ronald van Kuijk

    jbpm config no longer on classpath

    Adrian Apthorp Newbie

      Having (unwisely) renamed my jBPM based project in eclipse my customised jbpm.cfg.xml no longer can be found at runtime. Nothing else (I think) has changed apart from the name of the projects and all seems to run smoothly until my code looks up variables found in my overriden config file; the variables are not found.

      I'm running jBPM 3.3.0 with jBoss 4.2.2. My project deploys as an ear with a jar that contains the config files. I've also tried putting the config directly in the 'war' in the same 'ear' but still no joy. And yes it exists in the deployed ear.

      Everything was working fine until I changed the project name...sigh...

        • 1. Re: jbpm config no longer on classpath
          Ronald van Kuijk Master

          ??? afaik, usage of jBPM in projects has never been dependant on project names... Does the config has a custom name? a little more detail would be helpful to lend a hand

          • 2. Re: jbpm config no longer on classpath
            Adrian Apthorp Newbie

            Ronald,

            usage of jBPM in projects has never been dependant on project names..


            Yes, I guess that was why I thought I was relatively safe to make the change.

            Does the config has a custom name?


            No, just "jbpm.cfg.xml", packaged in a configs jar file, in a similar fashion to how the jbpm-enterprise ear is packaged.

            a little more detail would be helpful to lend a hand


            Within my ear file I have the following:

            taskcal-configs.jar - contains standard jbpm configs.
            taskcal.jar - my main library
            taskcal-dav.war - servlet
            taskcal-imip.jar - message driven bean

            I'm deploying in the standard JBoss 4.2.2 environment alongisde the standard jBPM 3.2.2. console configuration.

            As mentioned before all was working fine until I decided to tidy up the project / archive names. When I test by invoking the servlet, the additional attributes in my custom jbpm.cfg.xml are not found. I've tried setting the classpath in the various Manifest files and even putting the config file in the war. Nothing works.

            oh, hang on, is the customised config read when the jBPM loads as jBoss starts and so should be on the classpath of the console? Hmm, just did a quick test...not much luck.

            • 3. Re: jbpm config no longer on classpath
              Ronald van Kuijk Master

              try turning up the log level of jBPM to debug to see what file get's loaded. If you load JbpmConfiguration yourself, maybe there it is going wrong

              • 4. Re: jbpm config no longer on classpath
                Adrian Apthorp Newbie

                Argh...

                Thanks Ronald...should've looked a bit deeper in to the logs before.

                As a result of changing the project name (and hence '.ear' file name) my '.ear' was now being deployed by jBoss after the jBpm console. Previously it was deployed before. The result is my custom jbpm.cfg.xml is no longer deployed before the console (and Jbpmconfig) is loaded. The jbpm.cfg.xml associated with jbpm-server.sar is being picked up instead...

                So lesson; look for other jbpm.cfg.xml files...and check the deploy order

                http://www.jboss.org/community/docs/DOC-12473

                • 5. Re: jbpm config no longer on classpath
                  Ronald van Kuijk Master

                  or make sure both have the same config ;-)