7 Replies Latest reply on Sep 28, 2009 7:06 AM by Nishant Chandra

    JBpm 4.1 and Tomcat

    Nishant Chandra Newbie

      Hi,

      How do I get the context if I am working with a web app deployed to tomcat?

      In Jboss it works out to:
      ProcessEngine processEngine = (ProcessEngine) ctx.lookup("java:/ProcessEngine");

      What needs to be done to make it work on tomcat? Is there a sample code?

      I am using JBpm 4.1 and tomcat 6.0.

        • 2. Re: JBpm 4.1 and Tomcat
          Sebastian Schneider Master

          And yes there is example code. You can use the lines of code the jbpm-console uses to get the context. Then your webapp should work in JBoss and in Tomcat. Look into my post about JNDI.

          • 3. Re: JBpm 4.1 and Tomcat
            Nishant Chandra Newbie

            Thanks. Using ProcessEngine processEngine = Configuration.getProcessEngine(); worked.

            I have run into another problem: My JBpm web app calls a web service. The client is based on Axis2.

            I get this exception:
            org.jbpm.pvm.internal.wire.Wireexception: couldnot invole method .....

            I first had to delete xercelImpl.jar from the Axis2 lib. Still it does not work. I looked at this thread:

            http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4254632#4254632

            Sebastian, how could you solve this problem?

            • 4. Re: JBpm 4.1 and Tomcat
              Sebastian Schneider Master

              Unjar the Axis2 war-file and remove all the jars from the lib-folder which are not in the following list:

              activation-1.1.jar
              antlr-2.7.7.jar
              axiom-api-1.2.8.jar
              axiom-dom-1.2.8.jar
              axiom-impl-1.2.8.jar
              axis2-adb-1.5.jar
              axis2-adb-codegen-1.5.jar
              axis2-codegen-1.5.jar
              axis2-corba-1.5.jar
              axis2-fastinfoset-1.5.jar
              axis2-java2wsdl-1.5.jar
              axis2-jaxbri-1.5.jar
              axis2-jaxws-1.5.jar
              axis2-jibx-1.5.jar
              axis2-json-1.5.jar
              axis2-kernel-1.5.jar
              axis2-metadata-1.5.jar
              axis2-mtompolicy-1.5.jar
              axis2-saaj-1.5.jar
              axis2-spring-1.5.jar
              axis2-transport-http-1.5.jar
              axis2-transport-local-1.5.jar
              axis2-xmlbeans-1.5.jar
              bcel-5.1.jar
              commons-codec-1.3.jar
              commons-fileupload-1.2.jar
              commons-httpclient-3.1.jar
              commons-io-1.4.jar
              commons-logging-1.1.1.jar
              geronimo-activation_1.1_spec-1.0.1.jar
              geronimo-annotation_1.0_spec-1.1.jar
              geronimo-javamail_1.4_spec-1.6.jar
              geronimo-jaxws_2.1_spec-1.0.jar
              geronimo-jta_1.1_spec-1.1.jar
              geronimo-saaj_1.3_spec-1.0.1.jar
              geronimo-stax-api_1.0_spec-1.0.1.jar
              geronimo-ws-metadata_2.0_spec-1.1.2.jar
              httpcore-4.0.jar
              icu4j-2.6.1.jar
              jaxb-api-2.1.jar
              jaxb-impl-2.1.7.jar
              jaxb-xjc-2.1.7.jar
              jaxen-1.1.1.jar
              jdom-1.0.jar
              jettison-1.0-RC2.jar
              jibx-bind-1.2.1.jar
              jibx-run-1.2.1.jar
              log4j-1.2.15.jar
              mail-1.4.jar
              mex-1.5-impl.jar
              neethi-2.0.4.jar
              soapmonitor-1.5.jar
              woden-api-1.0M8.jar
              woden-impl-dom-1.0M8.jar
              wsdl4j-1.6.2.jar
              wstx-asl-3.2.4.jar
              xalan-2.7.0.jar
              xml-resolver-1.2.jar
              xmlbeans-2.3.0.jar
              XmlSchema-1.4.3.jar
              xom-1.0.jar
              


              Then create a new .war-File and deploy it.

              P.S.: Hope this is the correct list.

              • 5. Re: JBpm 4.1 and Tomcat
                Nishant Chandra Newbie

                Oops but this did not work.

                The exception is cryptic:

                ...Wireexception:could not invoke method ....
                on .......:org/apache/axis2/databinsing/ADBBean

                Any solutions? Sebastian, can you please recheck the libs?

                • 6. Re: JBpm 4.1 and Tomcat
                  Sebastian Schneider Master

                  I checked, they should be alright. As far as I understood from your posts your situation is a bit different. You are invoking web services from a process so you are not using the war, are you? My struggle was deploying Axis2 to offer webservices on the same Tomcat installation jBPM uses.

                  You should put the necessary jars (my list) in the lib-Folder of your Tomcat installation. I have not done this before and I am also new to Axis2 so I probably won't be able to help you. The exception message tells nothing since you cut off a lot. You wrote "databinsing" and not "databinding". Was this a typo when you posted the exception message here or is this sth. about your configuration?

                  • 7. Re: JBpm 4.1 and Tomcat
                    Nishant Chandra Newbie

                    Thanks. I could get it working. Keeping the axis2 jar in the WEB-INF/lib did not work. As you suggested, I moved it to Tomcats lib folder and things worked.