6 Replies Latest reply on Apr 16, 2010 2:34 AM by Dire Straits

    JBPM-BPEL, message reception not enabled for second process

    Dire Straits Newbie

      JBoss 4.2.3 GA

      JBPM BPEL 1.1.1

      Java 1.5.0_22

      MySQL 5.1.40

      JWSDP 2.0

      Linux, CentOS Kernel revision 2.6.18-164.el5

       

      I've been working with jBPM-BPEL for a couple of months, and things have been more or less smooth till now. But, now I'm stuck with a problem for the last couple of days,

      and would appreciate any help this wonderful community can give me. My problem is that, when I deploy a second process, the message reception is not getting enabled for that process,

      but instead it enables the message reception for the earlier deployed process. So, the newly deployed process is never able to respond to requests. This is happening even with

      the examples that have been distributed with jbpm-bpel. Say, I deploy the hello example first, then I see the following lines in the server.log:

       

      12:36:26,077 INFO  [WebModuleBuilder] packaged web module: hello.war

      12:36:26,078 INFO  [DeploymentServlet] deployed web module: hello.war

      12:36:26,078 INFO  [DeploymentServlet] deployed process definition: HelloWorld

      12:36:28,606 INFO  [DefaultEndpointRegistry] register: jboss.ws:context=hello,endpoint=GreeterServlet

      12:36:28,624 INFO  [TomcatDeployer] deploy, ctxPath=/hello, warUrl=.../tmp/deploy/tmp3767967447356039480hello-exp.war/

      12:36:28,825 WARN  [ProxyWarnLog] Narrowing proxy to class org.jbpm.bpel.graph.def.CompositeActivity - this operation breaks ==

      12:36:28,849 WARN  [ProxyWarnLog] Narrowing proxy to class org.jbpm.bpel.integration.def.ReceiveAction - this operation breaks ==

      12:36:28,941 INFO  [IntegrationConfigurator] message reception enabled for process: HelloWorld

      12:36:28,949 WARN  [LoadContexts] fail-safe cleanup (collections) : org.hibernate.engine.loading.CollectionLoadContext@5f5a9173<rs=com.mysql.jdbc.ResultSetImpl@42145315>

      12:36:28,949 WARN  [LoadContexts] fail-safe cleanup (collections) : org.hibernate.engine.loading.CollectionLoadContext@330345ed<rs=com.mysql.jdbc.ResultSetImpl@56ce9bde>

      12:36:29,296 INFO  [WSDLFilePublisher] WSDL published to: file:/usr/local/jboss-4.2.3.GA/server/default/data/wsdl/hello.war/hello-service.wsdl

       

       

      The above is fine. And I'm able to run junit on hello example successfully. Now, I'll deploy the trip example, and see the following lines in log:

       

      12:36:59,083 INFO  [WebModuleBuilder] packaged web module: trip.war

      12:36:59,083 INFO  [DeploymentServlet] deployed web module: trip.war

      12:36:59,083 INFO  [DeploymentServlet] deployed process definition: TripReservation

      12:36:59,457 INFO  [DefaultEndpointRegistry] register: jboss.ws:context=trip,endpoint=AgentServlet

      12:36:59,471 INFO  [TomcatDeployer] deploy, ctxPath=/trip, warUrl=.../tmp/deploy/tmp4853634900350062159trip-exp.war/

      12:36:59,653 WARN  [ProxyWarnLog] Narrowing proxy to class org.jbpm.bpel.graph.def.CompositeActivity - this operation breaks ==

      12:36:59,694 WARN  [ProxyWarnLog] Narrowing proxy to class org.jbpm.bpel.integration.def.ReceiveAction - this operation breaks ==

      12:36:59,809 INFO  [IntegrationConfigurator] message reception enabled for process: HelloWorld

      12:36:59,819 WARN  [LoadContexts] fail-safe cleanup (collections) : org.hibernate.engine.loading.CollectionLoadContext@7c7c06ab<rs=com.mysql.jdbc.ResultSetImpl@5e9ea579>

      12:36:59,819 WARN  [LoadContexts] fail-safe cleanup (collections) : org.hibernate.engine.loading.CollectionLoadContext@329a0466<rs=com.mysql.jdbc.ResultSetImpl@674df816>

      12:37:00,103 INFO  [WSDLFilePublisher] WSDL published to: file:/usr/local/jboss-4.2.3.GA/server/default/data/wsdl/trip.war/trip-service.wsdl

       

      So, here I see the info message saying the message reception is enabled for process: HelloWorld, when I was expecting it to be enabled for TripReservation.

      If I run junit for trip, I see the following exception.

       

      12:44:17,658 ERROR [HandlerChainBaseImpl] RuntimeException in request handler

      java.lang.NullPointerException

              at org.jbpm.bpel.integration.server.SoapHandler.sendRequest(SoapHandler.java:363)

              at org.jbpm.bpel.integration.server.SoapHandler.handleRequest(SoapHandler.java:165)

              at org.jboss.ws.core.jaxrpc.handler.HandlerWrapper.handleRequest(HandlerWrapper.java:121)

              at org.jboss.ws.core.jaxrpc.handler.HandlerChainBaseImpl.handleRequestInternal(HandlerChainBaseImpl.java:282)

              at org.jboss.ws.core.jaxrpc.handler.HandlerChainBaseImpl.handleRequest(HandlerChainBaseImpl.java:242)

              at org.jboss.ws.core.jaxrpc.handler.ServerHandlerChain.handleRequest(ServerHandlerChain.java:53)

              at org.jboss.ws.core.jaxrpc.handler.HandlerDelegateJAXRPC.callRequestHandlerChain(HandlerDelegateJAXRPC.java:114)

              at org.jboss.ws.core.server.ServiceEndpointInvoker.callRequestHandlerChain(ServiceEndpointInvoker.java:127)

              at org.jboss.ws.core.server.ServiceEndpointInvoker.invoke(ServiceEndpointInvoker.java:199)

              at org.jboss.wsf.stack.jbws.RequestHandlerImpl.processRequest(RequestHandlerImpl.java:466)

              at org.jboss.wsf.stack.jbws.RequestHandlerImpl.handleRequest(RequestHandlerImpl.java:284)

              at org.jboss.wsf.stack.jbws.RequestHandlerImpl.doPost(RequestHandlerImpl.java:201)

              at org.jboss.wsf.stack.jbws.RequestHandlerImpl.handleHttpRequest(RequestHandlerImpl.java:134)

              at org.jboss.wsf.stack.jbws.EndpointServlet.service(EndpointServlet.java:84)

              at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)

              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)

              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)

              at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)

              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)

              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)

              at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)

              at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)

              at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:182)

              at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)

              at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)

              at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)

              at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)

              at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)

              at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)

              at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)

              at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)

              at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)

              at java.lang.Thread.run(Thread.java:595)

      12:44:17,662 ERROR [SOAPFaultHelperJAXRPC] SOAP request exception

      java.lang.NullPointerException

              at org.jbpm.bpel.integration.server.SoapHandler.sendRequest(SoapHandler.java:363)

              at org.jbpm.bpel.integration.server.SoapHandler.handleRequest(SoapHandler.java:165)

              at org.jboss.ws.core.jaxrpc.handler.HandlerWrapper.handleRequest(HandlerWrapper.java:121)

              at org.jboss.ws.core.jaxrpc.handler.HandlerChainBaseImpl.handleRequestInternal(HandlerChainBaseImpl.java:282)

              at org.jboss.ws.core.jaxrpc.handler.HandlerChainBaseImpl.handleRequest(HandlerChainBaseImpl.java:242)

              at org.jboss.ws.core.jaxrpc.handler.ServerHandlerChain.handleRequest(ServerHandlerChain.java:53)

              at org.jboss.ws.core.jaxrpc.handler.HandlerDelegateJAXRPC.callRequestHandlerChain(HandlerDelegateJAXRPC.java:114)

              at org.jboss.ws.core.server.ServiceEndpointInvoker.callRequestHandlerChain(ServiceEndpointInvoker.java:127)

              at org.jboss.ws.core.server.ServiceEndpointInvoker.invoke(ServiceEndpointInvoker.java:199)

              at org.jboss.wsf.stack.jbws.RequestHandlerImpl.processRequest(RequestHandlerImpl.java:466)

              at org.jboss.wsf.stack.jbws.RequestHandlerImpl.handleRequest(RequestHandlerImpl.java:284)

              at org.jboss.wsf.stack.jbws.RequestHandlerImpl.doPost(RequestHandlerImpl.java:201)

              at org.jboss.wsf.stack.jbws.RequestHandlerImpl.handleHttpRequest(RequestHandlerImpl.java:134)

              at org.jboss.wsf.stack.jbws.EndpointServlet.service(EndpointServlet.java:84)

              at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)

              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)

              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)

              at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)

              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)

              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)

              at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)

              at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)

              at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:182)

              at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)

              at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)

              at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)

              at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)

              at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)

              at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)

              at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)

              at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)

              at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)

              at java.lang.Thread.run(Thread.java:595)

      12:44:17,670 WARN  [HandlerWrapper] Handler is in state DOES_NOT_EXIST, skipping Handler.handleFault for: org.jbpm.bpel.integration.server.SoapHandler@6a221968

       

       

      Any help or pointers on this please. I'm really stuck with this and I need to resolve it like a do-or-die situation.

      Also, if it helps in understanding my environment, I've made the following changes to get JBoss, jBPM-BPEL and MySQL working together:

       

      1. Removed hsql related files from deploy dir, and deploy/jms dir. And using mysql-ds.xml,

      and mysql-jdbc2-service.xml and mysql-jdbc-state-service.xml files respectively in deploy and deploy/jms dirs.

      2. Configured my datasource as JbpmDS in all the required files, as follows:

          a. conf/standardjbosscmp-jdbc.xml

          b. conf/login-config.xml. Also added MySqlDbRealm application-policy.

          c. deploy/uuid-key-generator.sar/META-INF/jboss-service.xml

          d. deploy/ejb-deployer.xml

          e. deploy/schedule-manager-service.xml

      3. mysql-jdbc2-service.xml has the following change for CREATE_MESSAGE_TABLE line:

          CREATE_MESSAGE_TABLE = CREATE TABLE JMS_MESSAGES (MESSAGEID INTEGER NOT NULL, DESTINATION TEXT NOT NULL, TXID INTEGER, TXOP CHAR(1), MESSAGEBLOB LONGBLOB, PRIMARY KEY (MESSAGEID, DESTINATION(255)))

      4. deploy/jboss-web.deployer/META-INF/jboss-service.xml has UseJBossWebLoader set to true

      5. conf/jbossjta-properties.xml has allowMultipleLastResources set to true.

      6. conf/login-config.xml has the following jbpm application-policy added:

          <application-policy name = "jbpm">

              <authentication>

                  <login-module code="org.jboss.security.auth.spi.DatabaseServerLoginModule" flag="required">

                      <module-option name="dsJndiName">JbpmDS</module-option>

                      <module-option name="principalsQuery">

                          SELECT PASSWORD_ FROM JBPM_ID_USER WHERE NAME_=?

                      </module-option>

                      <module-option name="rolesQuery">

                          SELECT g.NAME_ ,'Roles'

                          FROM JBPM_ID_USER u,

                          JBPM_ID_MEMBERSHIP m,

                          JBPM_ID_GROUP g

                          WHERE g.TYPE_='security-role'

                          AND m.GROUP_ = g.ID_

                          AND m.USER_ = u.ID_

                          AND u.NAME_=?

                      </module-option>

                  </login-module>

              </authentication>

          </application-policy>

      7. For the jbpm-bpel I've modified the build.properties to match my installation. And jbpm.hibernate.cfg.xml has the following changes:

          a. hibernate.dialect has org.hibernate.dialect.MySQLDialect

          b. hibernate.connection.datasource should havs JbpmDS

       

      All the above changes are as per various articles from jboss wiki, like the following:

      http://community.jboss.org/wiki/Deployjbpm32WebAppUnderJBoss42x

      http://community.jboss.org/wiki/SetUpAMySQLDatasource

      http://community.jboss.org/wiki/ConfigDataSources

      and also section 3.5.2 of the guide.

       

      To add to an already long post, I've had these processes running earlier. And we need to do a demo of BPEL to our boss, and we had to do a setup for him again. That's when Mr. Murphy and his laws came visiting, and I can't get them out of the door. I'm really in a tight-spot, and will bless anyone who can help me on this. We using BPEL in our product depends on this demo, and I've got to get it working.