11 Replies Latest reply on Dec 18, 2007 2:39 PM by Adrian Apthorp

    Can't deploy a process to jBPM

    Bruno Unna Newbie

      Once again, a newbie question.

      I'm trying to use the JBoss jBPM Designer to deploy a process to jBPM (this one as an ESB). But every time I click on the "Test Connection..." button, I get a rather cryptic dialog box:


      In the JBoss AS console, I get a single line every time I try the connection:

      12:04:49,344 INFO [[GDP Deployer Servlet]] Servlet GDP Deployer Servlet is currently unavailable

      The deployment descriptor WEB-INF/web.xml inside ${JBOSS_HOME}/server/default/deploy/jbpm.esb/jbpm-console.war includes the following lines:

       <!-- This is the GDP's deployer servlet -->
       <servlet-name>GDP Deployer Servlet</servlet-name>
       <servlet-name>GDP Deployer Servlet</servlet-name>

      Am I missing something obvious?

      As always, I will appreciate any help. Regards.

        • 1. Re: Can't deploy a process to jBPM
          Burr Sutter Master

          This falls into the "known bug" category. My hacked version of the jBPM Admin Console & various versions of the Graphical Process Designer are out of sync. Remember, the exception that is thrown related to the upload servlet?

          So I deploy my process definitions through the ESB (see bpm_orchestration1 and 2 using "ant deployProcess").

          In any case, we'd love your help in figuring out the trick (versions that work together, corrections to the admin console, etc) to make all of this work.


          • 2. Re: Can't deploy a process to jBPM
            Bruno Unna Newbie

            It seems that the java.lang.NoClassDefFoundError thrown when starting up the AS is the cause of the process uploading problem.

            The upload servlet definition lines, in file ${JBOSSESB_HOME}/lib/jbpm.esb/jbpm-console.war/WEB-INF/web.xml, are as follows:

            <!-- This is the GDP's deployer servlet -->
             <servlet-name>GDP Deployer Servlet</servlet-name>

            The number 1 in element load-on-startup means this class has to be loaded ASAP by the container. And I believe for some reason this happens before the classloader has access to the apache commons upload utility class.

            I commented out the load-on-startup element, thus allowing the container to load the class whenever it deemed that convenient, after which the problem went away (as well as the startup error). I haven't found as of now any negative effects of my action, so I dare to believe it is an acceptable solution to the error.

            FWIW. Best regards.

            • 3. Re: Can't deploy a process to jBPM
              Burr Sutter Master

              I can't remember if we setup a Jira for this. Would you mind looking and then adding your solution?

              • 4. Re: Can't deploy a process to jBPM
                Bruno Unna Newbie

                Nope, I haven't found this issue in Jira. Sorry. What should I do? Should I create the issue? Forgive me if I'm asking an stupid question, but I'm not familiar yet with the JBoss ESB way of doing things.

                Best regards.

                • 5. Re: Can't deploy a process to jBPM
                  Kevin Conner Master

                  Yes please Bruno, create the JIRA and make the fix version 4.2.1.


                  • 6. Re: Can't deploy a process to jBPM
                    Burr Sutter Master

                    I just tried this trick and here are my results. It seems the Graphical Process Designer still will NOT deploy the process definition. I'm using the GPD that comes with the Red Hat Developer Studio Beta 1 which is the latest and greatest.

                    The workaround is to use the "Save Process Archive Locally" checkbox and Save Without Deploying... button on the Deployment Tab. Then inside the jBPM Admin Console use the Deploy link that allows you to pick the PAR file created by the Save Process Archive Locally option. This works very nicely. More importantly, the current quickstarts illustrate how to deploy the process definition as a service of the ESB. However, that option doesn't provide a process image (still on my todo list to figure out). If you use the .par file or Graphical Process Designer deployment options you get a image where the instance actually visually shows where in the flow you happen to be.

                    • 7. Re: Can't deploy a process to jBPM
                      Bruno Unna Newbie

                      What version of JBoss AS and JBossESB are you using, Burr? I am using jboss-4.2.1.GA and jbossesb-4.2GA, respectively, and the solution I propose works nicely.

                      Are you getting the NoClassDefFoundError at startup? Do you still get some message at the AS console when trying to deploy a process?


                      • 8. Re: Can't deploy a process to jBPM
                        Burr Sutter Master

                        I'm using the JBoss ESB 4.2.0 GA ESB Server (not the App Server) as the env. No error on startup but the NoClassDefFoundError shows up when I click the Deploy button in the GPD. Actually the Test Connection button causes the following on my ESB Server console:

                        10:26:09,375 ERROR [[GDP Deployer Servlet]] Allocate exception for servlet GDP D
                        eployer Servlet
                        java.lang.NoClassDefFoundError: org/apache/commons/fileupload/FileUploadExceptio
                        at java.lang.Class.getDeclaredConstructors0(Native Method)
                        at java.lang.Class.privateGetDeclaredConstructors(Class.java:2357)
                        at java.lang.Class.getConstructor0(Class.java:2671)
                        at java.lang.Class.newInstance0(Class.java:321)
                        at java.lang.Class.newInstance(Class.java:303)

                        • 9. Re: Can't deploy a process to jBPM
                          Adrian Apthorp Newbie

                          I've come across the same problem when I try and load jbpm-enterprise.ear instead of jbpm-console.war. Deploying a process with jbpm-console.war works fine, but fails when I use the 'ear'. I tried the work around of removing load on startup but when I deploy via GPD it can't find the Upload class.

                          One workaround seems to be to extract commons-uploadfile.jar (and related jars i.e. commons-io.jar) from the jbpm-console.war in the 'ear' and copy them to server/jbpm/lib.

                          So the question is why can the classes be found when packaged in jbpm-console.war and not in jbpm-enterprise.ear?

                          • 10. Re: Can't deploy a process to jBPM
                            Kurt Stam Master

                            The ESB does not deploy the jbpm.ear. I think you may want to ask this question at the jbpm forum?