<!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="https://community.jboss.org/index.jspa" style="text-decoration: none; color: #E1E1E1">JBoss 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;">
    Re: Unable to start jBPM using a Web service
</h3>
<span style="margin-bottom: 10px;">
    created by <a href="https://community.jboss.org/people/doboss">doboss</a> in <i>jBPM</i> - <a href="https://community.jboss.org/message/780135#780135">View the full discussion</a>
</span>
<hr style="margin: 20px 0; border: none; background-color: #dadada; height: 1px;">

<div class="jive-rendered-content"><p>Alright, I'm still not quite understanding... Sorry. <span> :) </span></p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>So are you saying that</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>a) In all cases, the process runs and you see the println "Process started ..." but you just see the warning and errors in the logs?</p><p>b) Only when you run it outside your webservice you see the println "Process started ..." and when you run it in the webservice you don't see "Process started ..."?</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>I'm not sure exactly which situations you have tested and what the results were, so it's hard for me to guess...</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>Maybe you can change the code like this:</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; System.out.println("Seting up data source ...");</p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; JBPMHelper.setupDataSource();&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; System.out.println("Done with data source setup.");</p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; // load up the knowledge base</p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; KnowledgeBase kbase = readKnowledgeBase(wkfName);</p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; StatefulKnowledgeSession ksession = JBPMHelper.newStatefulKnowledgeSession(kbase);</p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; ksession.getWorkItemManager().registerWorkItemHandler("Semaphore", new WSHumanTaskHandler());</p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; //params</p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; Map&lt;String, Object&gt; params = new HashMap&lt;String, Object&gt;();</p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; params.put("Command", command);</p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; params.put("Parameters", Parameters);</p><p>&#160; </p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; System.out.println("Starting process...");</p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; // start a new process instance</p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; ksession.startProcess(wkfId, params);</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; System.out.println("Process started.");</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>Then run the process inside and outside of your webservice and let us know the result. Something like this:</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>Inside webservice:</p><p><strong>Seting up data source ....</strong></p><p>WARN&#160; [bitronix.tm.utils.ManagementRegistrar] (http-localhost-127.0.0.1-8080-1) cannot register object with name bitronix.tm:type=JDBC,UniqueName=jdbc/jbpm-ds: bitronix.tm.internal.BitronixRuntimeException: cannot call method 'registerMBean'</p><p><strong>Done with data source setup.</strong></p><p><strong>Starting process...</strong></p><p>AVVERTENZA [org.apache.cxf.phase.PhaseInterceptorChain] (http-localhost-127.0.0.1-8080-1) Application {<a class="jive-link-external-small" href="http://webServer.serviceLayer.discoveryreply.eu/" target="_blank">http://webServer.serviceLayer.discoveryreply.eu/</a>}StartWkfWS#{<a class="jive-link-external-small" href="http://webServer.serviceLayer.discoveryreply.eu/" target="_blank">http://webServer.serviceLayer.discoveryreply.eu/</a>}startWorkflow has thrown exception, unwinding now: org.apache.cxf.interceptor.Fault: loader constraint violation in interface itable initialization: when resolving method "$Proxy189.getXAResource()Ljavax/transaction/xa/XAResource;" the class loader (instance of org/jboss/modules/ModuleClassLoader) of the current class, $Proxy189, and the class loader (instance of &lt;bootloader&gt;) for interface javax/sql/XAConnection have different Class objects for the type javax/transaction/xa/XAResource used in the signature</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>Outside webservice:</p><p><strong>Seting up data source ....</strong></p><p>WARN&#160; [bitronix.tm.utils.ManagementRegistrar] (http-localhost-127.0.0.1-8080-1) cannot register object with name bitronix.tm:type=JDBC,UniqueName=jdbc/jbpm-ds: bitronix.tm.internal.BitronixRuntimeException: cannot call method 'registerMBean'</p><p><strong>Done with data source setup.</strong></p><p><strong>Starting process...</strong></p><p>AVVERTENZA [org.apache.cxf.phase.PhaseInterceptorChain] (http-localhost-127.0.0.1-8080-1) Application {<a class="jive-link-external-small" href="http://webServer.serviceLayer.discoveryreply.eu/" target="_blank">http://webServer.serviceLayer.discoveryreply.eu/</a>}StartWkfWS#{<a class="jive-link-external-small" href="http://webServer.serviceLayer.discoveryreply.eu/" target="_blank">http://webServer.serviceLayer.discoveryreply.eu/</a>}startWorkflow has thrown exception, unwinding now: org.apache.cxf.interceptor.Fault: loader constraint violation in interface itable initialization: when resolving method "$Proxy189.getXAResource()Ljavax/transaction/xa/XAResource;" the class loader (instance of org/jboss/modules/ModuleClassLoader) of the current class, $Proxy189, and the class loader (instance of &lt;bootloader&gt;) for interface javax/sql/XAConnection have different Class objects for the type javax/transaction/xa/XAResource used in the signature\ </p><p><strong>Process started.</strong></p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>Also, from the exception, it looks like it's complaining about one resource having a problem with the XA resource... maybe you should post your persistence.xml (with passwords removed)...</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>Sorry if I'm not helping much, I don't even have JBPM running inside my app yet, let alone with persistence. </p></div>

<div style="background-color: #f4f4f4; padding: 10px; margin-top: 20px;">
    <p style="margin: 0;">Reply to this message by <a href="https://community.jboss.org/message/780135#780135">going to Community</a></p>
        <p style="margin: 0;">Start a new discussion in jBPM at <a href="https://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>