4 Replies Latest reply on Jan 3, 2011 3:03 AM by Anand Prakash

    JBPM5 compatibility with Tomcat and Maven

    Anand Prakash Newbie

      I've following questions related to JBPM5 compatibility with Maven and Tomcat.

       

      1. I was just wondering if we can use Jbpm5 maven project with older version of maven for example 2.0.9 or not ?

       

      2. Can we use JBPM5 jars or can we integrate JBPM5 engine with Tomcat (ex. version 5.x onwards ) ? Any documentation for this as it was there in JBPM4.4 documentation.

       

      Please let me know if there is any specific modification/configuration is required for the aforesaid points?

        • 1. Re: JBPM5 compatibility with Tomcat and Maven
          Kris Verlaenen Master

          1. I don't think there's a problem with older versions of maven, I recommend you just give it a try, you only need to change the maven version in prerequisites in the parent pom to your version and try the build.  If it works, let me know and I'll lower the required maven version.

           

          2. There is no problem with that, although this is currently not supported out-of-the-box in the installer for example.  You would simply need to replace how it is currently configured for JBossAS with the tomcat equivalent.  To get you started, this is what you should do.  If anyone wants to improve the installer script to support tomcat as well, I would gladly accept the help

           

          If you run the installer for JBossAS, it generates and copies various artefacts.  You can get those to work on tomcat by doing:

           

          copy the jbpm-gwt-console.war and jbpm-gwt-console-server.war to TOMCAT_HOME/webapps

          rename jbpm-gwt-console.war to jbpm-console.war (so it shows up on http://localhost:8080/jbpm-console

          rename jbpm-gwt-console.war to gwt-console-server.war (so it shows up on http://localhost:8080/gwt-console-server

           

          update TOMCAT_HOME/conf/tomcat-users.xml to include your users + roles

           

          copy JBOSS_HOME/server/default/data/birt to TOMCAT_HOME/birt

           

          copy h2.jar to TOMCAT_HOME/lib

           

          update catalina.bat to set classpath variable jbpm.console.directory to the evaluation resources dir (unless you use guvnor as process repository)

           

          copy all necessary dependencies that are not in the default tomcat classpath to TOMCAT_HOME/lib (or in the WEB-INF/lib folder of the gwt server war)

           

          Kris

          • 2. Re: JBPM5 compatibility with Tomcat and Maven
            Anand Prakash Newbie

            Hi Kris,

            I'm able to deploy both the wars on tomcat/webapps and I'm able  to start application(jbpm-console) from browser.I've changed port to  9999 in server.xml instead od 8080.Accordingly changed port in  jbpm-gwt-core properties file.

            So once I login to the application and when I click Process Overview,then I get exception.It doesn't load the processes.

            Here is the exception captured from the browser,since I didn't see any log folder in tomcat as it was in Jboss default folder.

             

            Error-

            HTTP Status 500 -


            type Exception report

            message

            description The server encountered an internal error () that prevented it from fulfilling this request.

            exception

            org.jboss.resteasy.spi.UnhandledException: java.lang.RuntimeException: Could not initialize stateful knowledge session: javax/persistence/Persistence
                 org.jboss.resteasy.core.SynchronousDispatcher.handleApplicationException(SynchronousDispatcher.java:319)
                 org.jboss.resteasy.core.SynchronousDispatcher.handleException(SynchronousDispatcher.java:230)
                 org.jboss.resteasy.core.SynchronousDispatcher.handleInvokerException(SynchronousDispatcher.java:206)
                 org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:360)
                 org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:173)
                 org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:93)
                 org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:68)
                 javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
                 org.jboss.bpm.console.server.util.GWTJsonFilter.doFilter(GWTJsonFilter.java:59)

            note The full stack trace of the root cause is available in the Apache Tomcat/5.5.31 logs.

             

            ------------------------------------------------------------------------

            Please  let me know if any context.xml change/configuration or setting is  required,because it's not able to find data from the backend.

            I believe we need to modify context.xml and put somewhere in META-INF. Any help would be greatly appreciated.

             

            Thanks,

            Anand

            • 3. Re: JBPM5 compatibility with Tomcat and Maven
              Kris Verlaenen Master

              Anand,

               

              You still need to make sure all the jars that are needed are on the application classpath.  In this case, it's not able to find javax.persistence.Persistence, so that means the jar containing the jpa classes is not in the tomcat lib dir (or the lib dir of the jbpm console server war).  Simply adding the jar in one of those two locations should probably solve this (and you probably need quite a few others as well).

               

              Kris

              • 4. Re: JBPM5 compatibility with Tomcat and Maven
                Anand Prakash Newbie

                Hi Kris,

                All required jars including persistence jars as mentioned below are there in tomcat_home/lib folder and in gwt-console-server.war as well.

                But still I get " Could not initialize stateful knowledge session: javax/persistence/Persistence"

                Infact I don't see any exception in server log and in humantask console window.

                 

                So it's related to testDS configuration and tranaction manager config for tomcat which is causing that exception.

                So where do we need to put testDS and configuration about datasource  JNDI (jdbc/testDS1)and transaction manager in server.xml file of tomcat?