<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<body link="#355491" alink="#4262a1" vlink="#355491" style="background: #e2e2e2; margin: 0; padding: 20px;">
<div>
        <table cellpadding="0" bgcolor="#FFFFFF" border="0" cellspacing="0" style="border: 1px solid #dadada; margin-bottom: 30px; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                <tbody>
                        <tr>
                                <td>
                                        <table border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" style="border: solid 2px #ccc; background: #dadada; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                                                <tbody>
                                                        <tr>
                                                                <td bgcolor="#000000" valign="middle" height="58px" style="border-bottom: 1px solid #ccc; padding: 20px; -moz-border-radius-topleft: 3px; -moz-border-radius-topright: 3px; -webkit-border-top-right-radius: 5px; -webkit-border-top-left-radius: 5px;">
                                                                        <h1 style="color: #333333; font: bold 22px Arial, Helvetica, sans-serif; margin: 0; display: block !important;">
                                                                        <!-- To have a header image/logo replace the name below with your img tag -->
                                                                        <!-- Email clients will render the images when the message is read so any image -->
                                                                        <!-- must be made available on a public server, so that all recipients can load the image. -->
                                                                        <a href="http://community.jboss.org/index.jspa" style="text-decoration: none; color: #E1E1E1">Community</a></h1>
                                                                </td>
                                                        </tr>
                                                        <tr>
                                                                <td bgcolor="#FFFFFF" style="font: normal 12px Arial, Helvetica, sans-serif; color:#333333; padding: 20px; -moz-border-radius-bottomleft: 4px; -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 5px; -webkit-border-bottom-left-radius: 5px;"><h3 style="margin: 10px 0 5px; font-size: 17px; font-weight: normal;">
JBPM-BPEL, message reception not enabled for second process
</h3>
<span style="margin-bottom: 10px;">
created by <a href="http://community.jboss.org/people/bpel-way">Dire Straits</a> in <i>jBPM</i> - <a href="http://community.jboss.org/message/537628#537628">View the full discussion</a>
</span>
<hr style="margin: 20px 0; border: none; background-color: #dadada; height: 1px;">
<div class="jive-rendered-content"><p>JBoss 4.2.3 GA</p><p>JBPM BPEL 1.1.1</p><p>Java 1.5.0_22</p><p>MySQL 5.1.40</p><p>JWSDP 2.0</p><p>Linux, CentOS Kernel revision 2.6.18-164.el5</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>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,</p><p>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,</p><p>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</p><p>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:</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>12:36:26,077 INFO  [WebModuleBuilder] packaged web module: hello.war</p><p>12:36:26,078 INFO  [DeploymentServlet] deployed web module: hello.war</p><p>12:36:26,078 INFO  [DeploymentServlet] deployed process definition: HelloWorld</p><p>12:36:28,606 INFO  [DefaultEndpointRegistry] register: jboss.ws:context=hello,endpoint=GreeterServlet</p><p>12:36:28,624 INFO  [TomcatDeployer] deploy, ctxPath=/hello, warUrl=.../tmp/deploy/tmp3767967447356039480hello-exp.war/</p><p>12:36:28,825 WARN  [ProxyWarnLog] Narrowing proxy to class org.jbpm.bpel.graph.def.CompositeActivity - this operation breaks ==</p><p>12:36:28,849 WARN  [ProxyWarnLog] Narrowing proxy to class org.jbpm.bpel.integration.def.ReceiveAction - this operation breaks ==</p><p>12:36:28,941 INFO  [IntegrationConfigurator] message reception enabled for process: HelloWorld</p><p>12:36:28,949 WARN  [LoadContexts] fail-safe cleanup (collections) : org.hibernate.engine.loading.CollectionLoadContext@5f5a9173<rs=com.mysql.jdbc.ResultSetImpl@42145315></p><p>12:36:28,949 WARN  [LoadContexts] fail-safe cleanup (collections) : org.hibernate.engine.loading.CollectionLoadContext@330345ed<rs=com.mysql.jdbc.ResultSetImpl@56ce9bde></p><p>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</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>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:</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>12:36:59,083 INFO  [WebModuleBuilder] packaged web module: trip.war</p><p>12:36:59,083 INFO  [DeploymentServlet] deployed web module: trip.war</p><p>12:36:59,083 INFO  [DeploymentServlet] deployed process definition: TripReservation</p><p>12:36:59,457 INFO  [DefaultEndpointRegistry] register: jboss.ws:context=trip,endpoint=AgentServlet</p><p>12:36:59,471 INFO  [TomcatDeployer] deploy, ctxPath=/trip, warUrl=.../tmp/deploy/tmp4853634900350062159trip-exp.war/</p><p>12:36:59,653 WARN  [ProxyWarnLog] Narrowing proxy to class org.jbpm.bpel.graph.def.CompositeActivity - this operation breaks ==</p><p>12:36:59,694 WARN  [ProxyWarnLog] Narrowing proxy to class org.jbpm.bpel.integration.def.ReceiveAction - this operation breaks ==</p><p>12:36:59,809 INFO  [IntegrationConfigurator] message reception enabled for process: HelloWorld</p><p>12:36:59,819 WARN  [LoadContexts] fail-safe cleanup (collections) : org.hibernate.engine.loading.CollectionLoadContext@7c7c06ab<rs=com.mysql.jdbc.ResultSetImpl@5e9ea579></p><p>12:36:59,819 WARN  [LoadContexts] fail-safe cleanup (collections) : org.hibernate.engine.loading.CollectionLoadContext@329a0466<rs=com.mysql.jdbc.ResultSetImpl@674df816></p><p>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</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>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.</p><p>If I run junit for trip, I see the following exception.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>12:44:17,658 ERROR [HandlerChainBaseImpl] RuntimeException in request handler</p><p>java.lang.NullPointerException</p><p>        at org.jbpm.bpel.integration.server.SoapHandler.sendRequest(SoapHandler.java:363)</p><p>        at org.jbpm.bpel.integration.server.SoapHandler.handleRequest(SoapHandler.java:165)</p><p>        at org.jboss.ws.core.jaxrpc.handler.HandlerWrapper.handleRequest(HandlerWrapper.java:121)</p><p>        at org.jboss.ws.core.jaxrpc.handler.HandlerChainBaseImpl.handleRequestInternal(HandlerChainBaseImpl.java:282)</p><p>        at org.jboss.ws.core.jaxrpc.handler.HandlerChainBaseImpl.handleRequest(HandlerChainBaseImpl.java:242)</p><p>        at org.jboss.ws.core.jaxrpc.handler.ServerHandlerChain.handleRequest(ServerHandlerChain.java:53)</p><p>        at org.jboss.ws.core.jaxrpc.handler.HandlerDelegateJAXRPC.callRequestHandlerChain(HandlerDelegateJAXRPC.java:114)</p><p>        at org.jboss.ws.core.server.ServiceEndpointInvoker.callRequestHandlerChain(ServiceEndpointInvoker.java:127)</p><p>        at org.jboss.ws.core.server.ServiceEndpointInvoker.invoke(ServiceEndpointInvoker.java:199)</p><p>        at org.jboss.wsf.stack.jbws.RequestHandlerImpl.processRequest(RequestHandlerImpl.java:466)</p><p>        at org.jboss.wsf.stack.jbws.RequestHandlerImpl.handleRequest(RequestHandlerImpl.java:284)</p><p>        at org.jboss.wsf.stack.jbws.RequestHandlerImpl.doPost(RequestHandlerImpl.java:201)</p><p>        at org.jboss.wsf.stack.jbws.RequestHandlerImpl.handleHttpRequest(RequestHandlerImpl.java:134)</p><p>        at org.jboss.wsf.stack.jbws.EndpointServlet.service(EndpointServlet.java:84)</p><p>        at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)</p><p>        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)</p><p>        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)</p><p>        at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)</p><p>        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)</p><p>        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)</p><p>        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)</p><p>        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)</p><p>        at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:182)</p><p>        at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)</p><p>        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)</p><p>        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)</p><p>        at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)</p><p>        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)</p><p>        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)</p><p>        at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)</p><p>        at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)</p><p>        at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)</p><p>        at java.lang.Thread.run(Thread.java:595)</p><p>12:44:17,662 ERROR [SOAPFaultHelperJAXRPC] SOAP request exception</p><p>java.lang.NullPointerException</p><p>        at org.jbpm.bpel.integration.server.SoapHandler.sendRequest(SoapHandler.java:363)</p><p>        at org.jbpm.bpel.integration.server.SoapHandler.handleRequest(SoapHandler.java:165)</p><p>        at org.jboss.ws.core.jaxrpc.handler.HandlerWrapper.handleRequest(HandlerWrapper.java:121)</p><p>        at org.jboss.ws.core.jaxrpc.handler.HandlerChainBaseImpl.handleRequestInternal(HandlerChainBaseImpl.java:282)</p><p>        at org.jboss.ws.core.jaxrpc.handler.HandlerChainBaseImpl.handleRequest(HandlerChainBaseImpl.java:242)</p><p>        at org.jboss.ws.core.jaxrpc.handler.ServerHandlerChain.handleRequest(ServerHandlerChain.java:53)</p><p>        at org.jboss.ws.core.jaxrpc.handler.HandlerDelegateJAXRPC.callRequestHandlerChain(HandlerDelegateJAXRPC.java:114)</p><p>        at org.jboss.ws.core.server.ServiceEndpointInvoker.callRequestHandlerChain(ServiceEndpointInvoker.java:127)</p><p>        at org.jboss.ws.core.server.ServiceEndpointInvoker.invoke(ServiceEndpointInvoker.java:199)</p><p>        at org.jboss.wsf.stack.jbws.RequestHandlerImpl.processRequest(RequestHandlerImpl.java:466)</p><p>        at org.jboss.wsf.stack.jbws.RequestHandlerImpl.handleRequest(RequestHandlerImpl.java:284)</p><p>        at org.jboss.wsf.stack.jbws.RequestHandlerImpl.doPost(RequestHandlerImpl.java:201)</p><p>        at org.jboss.wsf.stack.jbws.RequestHandlerImpl.handleHttpRequest(RequestHandlerImpl.java:134)</p><p>        at org.jboss.wsf.stack.jbws.EndpointServlet.service(EndpointServlet.java:84)</p><p>        at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)</p><p>        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)</p><p>        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)</p><p>        at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)</p><p>        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)</p><p>        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)</p><p>        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)</p><p>        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)</p><p>        at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:182)</p><p>        at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)</p><p>        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)</p><p>        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)</p><p>        at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)</p><p>        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)</p><p>        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)</p><p>        at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)</p><p>        at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)</p><p>        at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)</p><p>        at java.lang.Thread.run(Thread.java:595)</p><p>12:44:17,670 WARN  [HandlerWrapper] Handler is in state DOES_NOT_EXIST, skipping Handler.handleFault for: org.jbpm.bpel.integration.server.SoapHandler@6a221968</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>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.</p><p>Also, if it helps in understanding my environment, I've made the following changes to get JBoss, jBPM-BPEL and MySQL working together:</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>1. Removed hsql related files from deploy dir, and deploy/jms dir. And using mysql-ds.xml, </p><p>and mysql-jdbc2-service.xml and mysql-jdbc-state-service.xml files respectively in deploy and deploy/jms dirs.</p><p>2. Configured my datasource as JbpmDS in all the required files, as follows:</p><p>    a. conf/standardjbosscmp-jdbc.xml</p><p>    b. conf/login-config.xml. Also added MySqlDbRealm application-policy.</p><p>    c. deploy/uuid-key-generator.sar/META-INF/jboss-service.xml</p><p>    d. deploy/ejb-deployer.xml</p><p>    e. deploy/schedule-manager-service.xml</p><p>3. mysql-jdbc2-service.xml has the following change for CREATE_MESSAGE_TABLE line:</p><p>    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)))</p><p>4. deploy/jboss-web.deployer/META-INF/jboss-service.xml has UseJBossWebLoader set to true</p><p>5. conf/jbossjta-properties.xml has allowMultipleLastResources set to true.</p><p>6. conf/login-config.xml has the following jbpm application-policy added:</p><p>    <application-policy name = "jbpm"></p><p>        <authentication></p><p>            <login-module code="org.jboss.security.auth.spi.DatabaseServerLoginModule" flag="required"></p><p>                <module-option name="dsJndiName">JbpmDS</module-option></p><p>                <module-option name="principalsQuery"></p><p>                    SELECT PASSWORD_ FROM JBPM_ID_USER WHERE NAME_=?</p><p>                </module-option></p><p>                <module-option name="rolesQuery"></p><p>                    SELECT g.NAME_ ,'Roles'</p><p>                    FROM JBPM_ID_USER u,</p><p>                    JBPM_ID_MEMBERSHIP m,</p><p>                    JBPM_ID_GROUP g</p><p>                    WHERE g.TYPE_='security-role'</p><p>                    AND m.GROUP_ = g.ID_</p><p>                    AND m.USER_ = u.ID_</p><p>                    AND u.NAME_=?</p><p>                </module-option></p><p>            </login-module></p><p>        </authentication></p><p>    </application-policy></p><p>7. For the jbpm-bpel I've modified the build.properties to match my installation. And jbpm.hibernate.cfg.xml has the following changes:</p><p>    a. hibernate.dialect has org.hibernate.dialect.MySQLDialect</p><p>    b. hibernate.connection.datasource should havs JbpmDS</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>All the above changes are as per various articles from jboss wiki, like the following:</p><p><a class="jive-link-external-small" href="http://community.jboss.org/wiki/Deployjbpm32WebAppUnderJBoss42x" target="_blank">http://community.jboss.org/wiki/Deployjbpm32WebAppUnderJBoss42x</a></p><p><a class="jive-link-external-small" href="http://community.jboss.org/wiki/SetUpAMySQLDatasource" target="_blank">http://community.jboss.org/wiki/SetUpAMySQLDatasource</a></p><p><a class="jive-link-external-small" href="http://community.jboss.org/wiki/ConfigDataSources" target="_blank">http://community.jboss.org/wiki/ConfigDataSources</a></p><p>and also section 3.5.2 of the guide.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>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.</p></div>
<div style="background-color: #f4f4f4; padding: 10px; margin-top: 20px;">
<p style="margin: 0;">Reply to this message by <a href="http://community.jboss.org/message/537628#537628">going to Community</a></p>
        <p style="margin: 0;">Start a new discussion in jBPM at <a href="http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034">Community</a></p>
</div></td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</div>
</body>
</html>