6 Replies Latest reply on Dec 10, 2012 7:19 AM by Laura delli Paoli

    Unable to start jBPM using a Web service

    Laura delli Paoli Master

      Hello Everybody,

      I'm trying to start a jbpm process as a method of a web service.

       

       

                JBPMHelper.setupDataSource();          

                 // load up the knowledge base

                          KnowledgeBase kbase = readKnowledgeBase(wkfName);

                          StatefulKnowledgeSession ksession = JBPMHelper.newStatefulKnowledgeSession(kbase);

                          ksession.getWorkItemManager().registerWorkItemHandler("Semaphore", new WSHumanTaskHandler());

                          //params

                          Map<String, Object> params = new HashMap<String, Object>();

                          params.put("Command", command);

                          params.put("Parameters", Parameters);

       

                          // start a new process instance

                          ksession.startProcess(wkfId, params);

       

                          System.out.println("Process started ...");

       

       

      on the setupDataSource() method I get the following warning:

       

      15:35:13,580 WARN  [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'

                at bitronix.tm.utils.ManagementRegistrar.mbeanServerCall(ManagementRegistrar.java:123) [btm-2.1.2.jar:2.1.2]

                at bitronix.tm.utils.ManagementRegistrar.register(ManagementRegistrar.java:86) [btm-2.1.2.jar:2.1.2]

                at bitronix.tm.resource.jdbc.PoolingDataSource.init(PoolingDataSource.java:78) [btm-2.1.2.jar:2.1.2]

                at org.jbpm.test.JBPMHelper.setupDataSource(JBPMHelper.java:84) [jbpm-test-5.4.0.Final.jar:5.4.0.Final]

                at eu.discoveryreply.serviceLayer.jbpm.JBpmWkfLauncher.startUp(JBpmWkfLauncher.java:87) [classes:]

                at eu.discoveryreply.serviceLayer.jbpm.JBpmWkfLauncher.startWorkflow(JBpmWkfLauncher.java:37) [classes:]

                at eu.discoveryreply.serviceLayer.webServer.StartWkfWS.startWorkflow(StartWkfWS.java:33) [classes:]

                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.6.0_32]

                at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) [rt.jar:1.6.0_32]

                at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) [rt.jar:1.6.0_32]

                at java.lang.reflect.Method.invoke(Unknown Source) [rt.jar:1.6.0_32]

                at org.jboss.ws.common.invocation.AbstractInvocationHandlerJSE.invoke(AbstractInvocationHandlerJSE.java:111)

                at org.jboss.wsf.stack.cxf.JBossWSInvoker._invokeInternal(JBossWSInvoker.java:181)

                at org.jboss.wsf.stack.cxf.JBossWSInvoker.invoke(JBossWSInvoker.java:127)

                at org.apache.cxf.interceptor.ServiceInvokerInterceptor$1.run(ServiceInvokerInterceptor.java:58) [cxf-rt-core-2.4.4.jar:2.4.4]

                at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) [rt.jar:1.6.0_32]

                at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source) [rt.jar:1.6.0_32]

                at java.util.concurrent.FutureTask.run(Unknown Source) [rt.jar:1.6.0_32]

                at org.apache.cxf.workqueue.SynchronousExecutor.execute(SynchronousExecutor.java:37) [cxf-rt-core-2.4.4.jar:2.4.4]

                at org.apache.cxf.interceptor.ServiceInvokerInterceptor.handleMessage(ServiceInvokerInterceptor.java:106) [cxf-rt-core-2.4.4.jar:2.4.4]

                at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:263) [cxf-api-2.4.4.jar:2.4.4]

                at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:121) [cxf-rt-core-2.4.4.jar:2.4.4]

                at org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:207) [cxf-rt-transports-http-2.4.4.jar:2.4.4]

                at org.jboss.wsf.stack.cxf.RequestHandlerImpl.handleHttpRequest(RequestHandlerImpl.java:91)

                at org.jboss.wsf.stack.cxf.transport.ServletHelper.callRequestHandler(ServletHelper.java:169)

                at org.jboss.wsf.stack.cxf.CXFServletExt.invoke(CXFServletExt.java:87)

                at org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.java:185) [cxf-rt-transports-http-2.4.4.jar:2.4.4]

                at org.apache.cxf.transport.servlet.AbstractHTTPServlet.doPost(AbstractHTTPServlet.java:108) [cxf-rt-transports-http-2.4.4.jar:2.4.4]

                at javax.servlet.http.HttpServlet.service(HttpServlet.java:754) [jboss-servlet-api_3.0_spec-1.0.0.Final.jar:1.0.0.Final]

                at org.jboss.wsf.stack.cxf.CXFServletExt.service(CXFServletExt.java:135)

                at org.jboss.wsf.spi.deployment.WSFServlet.service(WSFServlet.java:140) [jbossws-spi-2.0.3.GA.jar:2.0.3.GA]

                at javax.servlet.http.HttpServlet.service(HttpServlet.java:847) [jboss-servlet-api_3.0_spec-1.0.0.Final.jar:1.0.0.Final]

                at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:329) [jbossweb-7.0.13.Final.jar:]

                at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248) [jbossweb-7.0.13.Final.jar:]

                at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275) [jbossweb-7.0.13.Final.jar:]

                at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161) [jbossweb-7.0.13.Final.jar:]

                at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:153) [jboss-as-web-7.1.1.Final.jar:7.1.1.Final]

                at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:155) [jbossweb-7.0.13.Final.jar:]

                at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) [jbossweb-7.0.13.Final.jar:]

                at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) [jbossweb-7.0.13.Final.jar:]

                at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:368) [jbossweb-7.0.13.Final.jar:]

                at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:897) [jbossweb-7.0.13.Final.jar:]

                at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:626) [jbossweb-7.0.13.Final.jar:]

                at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:2039) [jbossweb-7.0.13.Final.jar:]

                at java.lang.Thread.run(Unknown Source) [rt.jar:1.6.0_32]

      Caused by: java.lang.IllegalAccessException: Class bitronix.tm.utils.ManagementRegistrar can not access a member of class org.jboss.as.jmx.PluggableMBeanServerImpl with modifiers "public"

                at sun.reflect.Reflection.ensureMemberAccess(Unknown Source) [rt.jar:1.6.0_32]

                at java.lang.reflect.Method.invoke(Unknown Source) [rt.jar:1.6.0_32]

                at bitronix.tm.utils.ManagementRegistrar.mbeanServerCall(ManagementRegistrar.java:121) [btm-2.1.2.jar:2.1.2]

                ... 44 more

       

      On starting the process I get:

       

      15:35:48,182 ERROR [org.jboss.ws.common.invocation.InvocationHandlerJAXWS] (http-localhost-127.0.0.1-8080-1) Method invocation failed with exception: null: java.lang.reflect.InvocationTargetException

                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.6.0_32]

                at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) [rt.jar:1.6.0_32]

                at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) [rt.jar:1.6.0_32]

                at java.lang.reflect.Method.invoke(Unknown Source) [rt.jar:1.6.0_32]

                at org.jboss.ws.common.invocation.AbstractInvocationHandlerJSE.invoke(AbstractInvocationHandlerJSE.java:111)

                at org.jboss.wsf.stack.cxf.JBossWSInvoker._invokeInternal(JBossWSInvoker.java:181)

                at org.jboss.wsf.stack.cxf.JBossWSInvoker.invoke(JBossWSInvoker.java:127)

                at org.apache.cxf.interceptor.ServiceInvokerInterceptor$1.run(ServiceInvokerInterceptor.java:58) [cxf-rt-core-2.4.4.jar:2.4.4]

                at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) [rt.jar:1.6.0_32]

                at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source) [rt.jar:1.6.0_32]

                at java.util.concurrent.FutureTask.run(Unknown Source) [rt.jar:1.6.0_32]

                at org.apache.cxf.workqueue.SynchronousExecutor.execute(SynchronousExecutor.java:37) [cxf-rt-core-2.4.4.jar:2.4.4]

                at org.apache.cxf.interceptor.ServiceInvokerInterceptor.handleMessage(ServiceInvokerInterceptor.java:106) [cxf-rt-core-2.4.4.jar:2.4.4]

                at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:263) [cxf-api-2.4.4.jar:2.4.4]

                at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:121) [cxf-rt-core-2.4.4.jar:2.4.4]

                at org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:207) [cxf-rt-transports-http-2.4.4.jar:2.4.4]

                at org.jboss.wsf.stack.cxf.RequestHandlerImpl.handleHttpRequest(RequestHandlerImpl.java:91)

                at org.jboss.wsf.stack.cxf.transport.ServletHelper.callRequestHandler(ServletHelper.java:169)

                at org.jboss.wsf.stack.cxf.CXFServletExt.invoke(CXFServletExt.java:87)

                at org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.java:185) [cxf-rt-transports-http-2.4.4.jar:2.4.4]

                at org.apache.cxf.transport.servlet.AbstractHTTPServlet.doPost(AbstractHTTPServlet.java:108) [cxf-rt-transports-http-2.4.4.jar:2.4.4]

                at javax.servlet.http.HttpServlet.service(HttpServlet.java:754) [jboss-servlet-api_3.0_spec-1.0.0.Final.jar:1.0.0.Final]

                at org.jboss.wsf.stack.cxf.CXFServletExt.service(CXFServletExt.java:135)

                at org.jboss.wsf.spi.deployment.WSFServlet.service(WSFServlet.java:140) [jbossws-spi-2.0.3.GA.jar:2.0.3.GA]

                at javax.servlet.http.HttpServlet.service(HttpServlet.java:847) [jboss-servlet-api_3.0_spec-1.0.0.Final.jar:1.0.0.Final]

                at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:329) [jbossweb-7.0.13.Final.jar:]

                at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248) [jbossweb-7.0.13.Final.jar:]

                at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275) [jbossweb-7.0.13.Final.jar:]

                at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161) [jbossweb-7.0.13.Final.jar:]

                at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:153) [jboss-as-web-7.1.1.Final.jar:7.1.1.Final]

                at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:155) [jbossweb-7.0.13.Final.jar:]

                at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) [jbossweb-7.0.13.Final.jar:]

                at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) [jbossweb-7.0.13.Final.jar:]

                at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:368) [jbossweb-7.0.13.Final.jar:]

                at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:897) [jbossweb-7.0.13.Final.jar:]

                at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:626) [jbossweb-7.0.13.Final.jar:]

                at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:2039) [jbossweb-7.0.13.Final.jar:]

                at java.lang.Thread.run(Unknown Source) [rt.jar:1.6.0_32]

      Caused by: java.lang.LinkageError: 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 <bootloader>) for interface javax/sql/XAConnection have different Class objects for the type javax/transaction/xa/XAResource used in the signature

                at java.lang.Class.getDeclaredConstructors0(Native Method) [rt.jar:1.6.0_32]

                at java.lang.Class.privateGetDeclaredConstructors(Unknown Source) [rt.jar:1.6.0_32]

                at java.lang.Class.getConstructor0(Unknown Source) [rt.jar:1.6.0_32]

                at java.lang.Class.getConstructor(Unknown Source) [rt.jar:1.6.0_32]

                at java.lang.reflect.Proxy.newProxyInstance(Unknown Source) [rt.jar:1.6.0_32]

                at bitronix.tm.resource.jdbc.lrc.LrcXADataSource.getXAConnection(LrcXADataSource.java:104) [btm-2.1.2.jar:2.1.2]

                at bitronix.tm.resource.jdbc.PoolingDataSource.createPooledConnection(PoolingDataSource.java:331) [btm-2.1.2.jar:2.1.2]

                at bitronix.tm.resource.common.XAPool.createPooledObject(XAPool.java:291) [btm-2.1.2.jar:2.1.2]

                at bitronix.tm.resource.common.XAPool.grow(XAPool.java:408) [btm-2.1.2.jar:2.1.2]

                at bitronix.tm.resource.common.XAPool.getInPool(XAPool.java:387) [btm-2.1.2.jar:2.1.2]

                at bitronix.tm.resource.common.XAPool.getConnectionHandle(XAPool.java:129) [btm-2.1.2.jar:2.1.2]

                at bitronix.tm.resource.common.XAPool.getConnectionHandle(XAPool.java:97) [btm-2.1.2.jar:2.1.2]

                at bitronix.tm.resource.jdbc.PoolingDataSource.getConnection(PoolingDataSource.java:248) [btm-2.1.2.jar:2.1.2]

                at org.hibernate.connection.DatasourceConnectionProvider.getConnection(DatasourceConnectionProvider.java:92) [hibernate-core-3.3.2.GA.jar:3.3.2.GA]

                at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:111) [hibernate-core-3.3.2.GA.jar:3.3.2.GA]

                at org.hibernate.cfg.Configuration.buildSettingsInternal(Configuration.java:2119) [hibernate-core-3.3.2.GA.jar:3.3.2.GA]

                at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:2115) [hibernate-core-3.3.2.GA.jar:3.3.2.GA]

                at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1339) [hibernate-core-3.3.2.GA.jar:3.3.2.GA]

                at org.hibernate.cfg.AnnotationConfiguration.buildSessionFactory(AnnotationConfiguration.java:867) [hibernate-annotations-3.4.0.GA.jar:3.3.2.GA]

                at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:669) [hibernate-entitymanager-3.4.0.GA.jar:3.4.0.GA]

                at org.hibernate.ejb.HibernatePersistence.createEntityManagerFactory(HibernatePersistence.java:126) [hibernate-entitymanager-3.4.0.GA.jar:3.4.0.GA]

                at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:63) [hibernate-jpa-2.0-api-1.0.1.Final.jar:1.0.1.Final]

                at org.jbpm.test.JBPMHelper.loadStatefulKnowledgeSession(JBPMHelper.java:147) [jbpm-test-5.4.0.Final.jar:5.4.0.Final]

                at org.jbpm.test.JBPMHelper.newStatefulKnowledgeSession(JBPMHelper.java:136) [jbpm-test-5.4.0.Final.jar:5.4.0.Final]

                at eu.discoveryreply.serviceLayer.jbpm.JBpmWkfLauncher.startWorkflow(JBpmWkfLauncher.java:40) [classes:]

                at eu.discoveryreply.serviceLayer.webServer.StartWkfWS.startWorkflow(StartWkfWS.java:33) [classes:]

                ... 38 more

       

       

      15:35:48,264 AVVERTENZA [org.apache.cxf.phase.PhaseInterceptorChain] (http-localhost-127.0.0.1-8080-1) Application {http://webServer.serviceLayer.discoveryreply.eu/}StartWkfWS#{http://webServer.serviceLayer.discoveryreply.eu/}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 <bootloader>) for interface javax/sql/XAConnection have different Class objects for the type javax/transaction/xa/XAResource used in the signature

                at org.jboss.wsf.stack.cxf.JBossWSInvoker.createFault(JBossWSInvoker.java:246)

                at org.jboss.wsf.stack.cxf.JBossWSInvoker._invokeInternal(JBossWSInvoker.java:201)

                at org.jboss.wsf.stack.cxf.JBossWSInvoker.invoke(JBossWSInvoker.java:127)

                at org.apache.cxf.interceptor.ServiceInvokerInterceptor$1.run(ServiceInvokerInterceptor.java:58) [cxf-rt-core-2.4.4.jar:2.4.4]

                at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) [rt.jar:1.6.0_32]

                at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source) [rt.jar:1.6.0_32]

                at java.util.concurrent.FutureTask.run(Unknown Source) [rt.jar:1.6.0_32]

                at org.apache.cxf.workqueue.SynchronousExecutor.execute(SynchronousExecutor.java:37) [cxf-rt-core-2.4.4.jar:2.4.4]

                at org.apache.cxf.interceptor.ServiceInvokerInterceptor.handleMessage(ServiceInvokerInterceptor.java:106) [cxf-rt-core-2.4.4.jar:2.4.4]

                at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:263) [cxf-api-2.4.4.jar:2.4.4]

                at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:121) [cxf-rt-core-2.4.4.jar:2.4.4]

                at org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:207) [cxf-rt-transports-http-2.4.4.jar:2.4.4]

                at org.jboss.wsf.stack.cxf.RequestHandlerImpl.handleHttpRequest(RequestHandlerImpl.java:91)

                at org.jboss.wsf.stack.cxf.transport.ServletHelper.callRequestHandler(ServletHelper.java:169)

                at org.jboss.wsf.stack.cxf.CXFServletExt.invoke(CXFServletExt.java:87)

                at org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.java:185) [cxf-rt-transports-http-2.4.4.jar:2.4.4]

                at org.apache.cxf.transport.servlet.AbstractHTTPServlet.doPost(AbstractHTTPServlet.java:108) [cxf-rt-transports-http-2.4.4.jar:2.4.4]

                at javax.servlet.http.HttpServlet.service(HttpServlet.java:754) [jboss-servlet-api_3.0_spec-1.0.0.Final.jar:1.0.0.Final]

                at org.jboss.wsf.stack.cxf.CXFServletExt.service(CXFServletExt.java:135)

                at org.jboss.wsf.spi.deployment.WSFServlet.service(WSFServlet.java:140) [jbossws-spi-2.0.3.GA.jar:2.0.3.GA]

                at javax.servlet.http.HttpServlet.service(HttpServlet.java:847) [jboss-servlet-api_3.0_spec-1.0.0.Final.jar:1.0.0.Final]

                at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:329) [jbossweb-7.0.13.Final.jar:]

                at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248) [jbossweb-7.0.13.Final.jar:]

                at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275) [jbossweb-7.0.13.Final.jar:]

                at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161) [jbossweb-7.0.13.Final.jar:]

                at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:153) [jboss-as-web-7.1.1.Final.jar:7.1.1.Final]

                at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:155) [jbossweb-7.0.13.Final.jar:]

                at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) [jbossweb-7.0.13.Final.jar:]

                at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) [jbossweb-7.0.13.Final.jar:]

                at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:368) [jbossweb-7.0.13.Final.jar:]

                at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:897) [jbossweb-7.0.13.Final.jar:]

                at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:626) [jbossweb-7.0.13.Final.jar:]

                at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:2039) [jbossweb-7.0.13.Final.jar:]

                at java.lang.Thread.run(Unknown Source) [rt.jar:1.6.0_32]

      Caused by: java.lang.LinkageError: 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 <bootloader>) for interface javax/sql/XAConnection have different Class objects for the type javax/transaction/xa/XAResource used in the signature

                at java.lang.Class.getDeclaredConstructors0(Native Method) [rt.jar:1.6.0_32]

                at java.lang.Class.privateGetDeclaredConstructors(Unknown Source) [rt.jar:1.6.0_32]

                at java.lang.Class.getConstructor0(Unknown Source) [rt.jar:1.6.0_32]

                at java.lang.Class.getConstructor(Unknown Source) [rt.jar:1.6.0_32]

                at java.lang.reflect.Proxy.newProxyInstance(Unknown Source) [rt.jar:1.6.0_32]

                at bitronix.tm.resource.jdbc.lrc.LrcXADataSource.getXAConnection(LrcXADataSource.java:104) [btm-2.1.2.jar:2.1.2]

                at bitronix.tm.resource.jdbc.PoolingDataSource.createPooledConnection(PoolingDataSource.java:331) [btm-2.1.2.jar:2.1.2]

                at bitronix.tm.resource.common.XAPool.createPooledObject(XAPool.java:291) [btm-2.1.2.jar:2.1.2]

                at bitronix.tm.resource.common.XAPool.grow(XAPool.java:408) [btm-2.1.2.jar:2.1.2]

                at bitronix.tm.resource.common.XAPool.getInPool(XAPool.java:387) [btm-2.1.2.jar:2.1.2]

                at bitronix.tm.resource.common.XAPool.getConnectionHandle(XAPool.java:129) [btm-2.1.2.jar:2.1.2]

                at bitronix.tm.resource.common.XAPool.getConnectionHandle(XAPool.java:97) [btm-2.1.2.jar:2.1.2]

                at bitronix.tm.resource.jdbc.PoolingDataSource.getConnection(PoolingDataSource.java:248) [btm-2.1.2.jar:2.1.2]

                at org.hibernate.connection.DatasourceConnectionProvider.getConnection(DatasourceConnectionProvider.java:92) [hibernate-core-3.3.2.GA.jar:3.3.2.GA]

                at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:111) [hibernate-core-3.3.2.GA.jar:3.3.2.GA]

                at org.hibernate.cfg.Configuration.buildSettingsInternal(Configuration.java:2119) [hibernate-core-3.3.2.GA.jar:3.3.2.GA]

                at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:2115) [hibernate-core-3.3.2.GA.jar:3.3.2.GA]

                at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1339) [hibernate-core-3.3.2.GA.jar:3.3.2.GA]

                at org.hibernate.cfg.AnnotationConfiguration.buildSessionFactory(AnnotationConfiguration.java:867) [hibernate-annotations-3.4.0.GA.jar:3.3.2.GA]

                at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:669) [hibernate-entitymanager-3.4.0.GA.jar:3.4.0.GA]

                at org.hibernate.ejb.HibernatePersistence.createEntityManagerFactory(HibernatePersistence.java:126) [hibernate-entitymanager-3.4.0.GA.jar:3.4.0.GA]

                at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:63) [hibernate-jpa-2.0-api-1.0.1.Final.jar:1.0.1.Final]

                at org.jbpm.test.JBPMHelper.loadStatefulKnowledgeSession(JBPMHelper.java:147) [jbpm-test-5.4.0.Final.jar:5.4.0.Final]

                at org.jbpm.test.JBPMHelper.newStatefulKnowledgeSession(JBPMHelper.java:136) [jbpm-test-5.4.0.Final.jar:5.4.0.Final]

                at eu.discoveryreply.serviceLayer.jbpm.JBpmWkfLauncher.startWorkflow(JBpmWkfLauncher.java:40) [classes:]

                at eu.discoveryreply.serviceLayer.webServer.StartWkfWS.startWorkflow(StartWkfWS.java:33) [classes:]

                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.6.0_32]

                at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) [rt.jar:1.6.0_32]

                at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) [rt.jar:1.6.0_32]

                at java.lang.reflect.Method.invoke(Unknown Source) [rt.jar:1.6.0_32]

                at org.jboss.ws.common.invocation.AbstractInvocationHandlerJSE.invoke(AbstractInvocationHandlerJSE.java:111)

                at org.jboss.wsf.stack.cxf.JBossWSInvoker._invokeInternal(JBossWSInvoker.java:181)

                ... 32 more

       

       

      Can anyone help me?

        • 1. Re: Unable to start jBPM using a Web service
          doboss Newbie

          I think this has nothing to do with your webservice... perhaps your data source and configuration is not properly setup? Have you tried the same code in a simple servlet or mbean?

          • 2. Re: Unable to start jBPM using a Web service
            Laura delli Paoli Master

            Thanks for your answare

            I started the Application Server in debug mode and it fails on the instructions mentioned above.

             

            If I try to run a jBPM project (with the same persistence.xml file) I can run the jbpm process (even if I get a mysql related error on the last step of the process).

            • 3. Re: Unable to start jBPM using a Web service
              doboss Newbie

              So are you sucesfully run the jbpm process outside of your webservice?

              • 4. Re: Unable to start jBPM using a Web service
                Laura delli Paoli Master

                Yes (even if with errors), but I successfully run a webservice that prints a string....

                • 5. Re: Unable to start jBPM using a Web service
                  doboss Newbie

                  Alright, I'm still not quite understanding... Sorry.

                   

                  So are you saying that

                   

                  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?

                  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 ..."?

                   

                  I'm not sure exactly which situations you have tested and what the results were, so it's hard for me to guess...

                   

                  Maybe you can change the code like this:

                   

                                      System.out.println("Seting up data source ...");

                                      JBPMHelper.setupDataSource();          

                                      System.out.println("Done with data source setup.");

                                      // load up the knowledge base

                                      KnowledgeBase kbase = readKnowledgeBase(wkfName);

                                      StatefulKnowledgeSession ksession = JBPMHelper.newStatefulKnowledgeSession(kbase);

                                      ksession.getWorkItemManager().registerWorkItemHandler("Semaphore", new WSHumanTaskHandler());

                                      //params

                                      Map<String, Object> params = new HashMap<String, Object>();

                                      params.put("Command", command);

                                      params.put("Parameters", Parameters);

                   

                                      System.out.println("Starting process...");

                                      // start a new process instance

                                      ksession.startProcess(wkfId, params);

                   

                                      System.out.println("Process started.");

                   

                  Then run the process inside and outside of your webservice and let us know the result. Something like this:

                   

                  Inside webservice:

                  Seting up data source ....

                  WARN  [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'

                  Done with data source setup.

                  Starting process...

                  AVVERTENZA [org.apache.cxf.phase.PhaseInterceptorChain] (http-localhost-127.0.0.1-8080-1) Application {http://webServer.serviceLayer.discoveryreply.eu/}StartWkfWS#{http://webServer.serviceLayer.discoveryreply.eu/}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 <bootloader>) for interface javax/sql/XAConnection have different Class objects for the type javax/transaction/xa/XAResource used in the signature

                   

                  Outside webservice:

                  Seting up data source ....

                  WARN  [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'

                  Done with data source setup.

                  Starting process...

                  AVVERTENZA [org.apache.cxf.phase.PhaseInterceptorChain] (http-localhost-127.0.0.1-8080-1) Application {http://webServer.serviceLayer.discoveryreply.eu/}StartWkfWS#{http://webServer.serviceLayer.discoveryreply.eu/}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 <bootloader>) for interface javax/sql/XAConnection have different Class objects for the type javax/transaction/xa/XAResource used in the signature\

                  Process started.

                   

                  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)...

                   

                  Sorry if I'm not helping much, I don't even have JBPM running inside my app yet, let alone with persistence.

                  • 6. Re: Unable to start jBPM using a Web service
                    Laura delli Paoli Master

                    Hi,

                    I solved this issue by editing the jBPM.properties file in jbpm-test-5.4.0.Final.jar library

                     

                    HTH

                     

                    Laura