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

    Can't deploy a process to jBPM

    bruno

      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:

      [img]http://farm2.static.flickr.com/1078/1396487340_2fc9a7e49d_o.png[/img]
      http://www.flickr.com/photos/unna/1396487340/

      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>
       <servlet-name>GDP Deployer Servlet</servlet-name>
       <servlet-class>org.jbpm.web.ProcessUploadServlet</servlet-class>
       <load-on-startup>1</load-on-startup>
       </servlet>
      
       <servlet-mapping>
       <servlet-name>GDP Deployer Servlet</servlet-name>
       <url-pattern>/upload/*</url-pattern>
       </servlet-mapping>
      


      Am I missing something obvious?

      As always, I will appreciate any help. Regards.

        • 1. Re: Can't deploy a process to jBPM
          burrsutter

          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.

          Burr

          • 2. Re: Can't deploy a process to jBPM
            bruno

            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>
             <servlet-name>GDP Deployer Servlet</servlet-name>
             <servlet-class>org.jbpm.web.ProcessUploadServlet</servlet-class>
             <load-on-startup>1</load-on-startup>
            </servlet>
            


            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
              burrsutter

              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

                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
                  kconner

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

                  Thanks.

                  • 6. Re: Can't deploy a process to jBPM
                    burrsutter

                    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

                      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?

                      Regards.

                      • 8. Re: Can't deploy a process to jBPM
                        burrsutter

                        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
                        n
                        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
                          aapthorp

                          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
                            kurtstam

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

                            --Kurt

                            • 11. Re: Can't deploy a process to jBPM
                              aapthorp

                              Whoops. Will do.