3 Replies Latest reply on Jan 9, 2006 10:20 AM by Koen Aers

    JBossWS and jBPM interaction

    Francisco Larrayoz Newbie

      Hi all!
      I am trying to build a JBossWS project where I can publish actions to interact with jBPM Java API functionality from my .NET client applications. Things such as ending a task instance or asking for the tasks assigned to an actor, but I need to call these actions from C# via som sort of web service.
      Ok, I have implemented a web service using JBossWS successfully and deployed it in the JBoss application server "default" deploy directory.
      I am also successfully defining process definitions in jBPM process definition projects and deploying them in jBPM application server "jbpm" deploy directory.
      However, I need to mix these two objectives, calling jBPM java API functions from my JBossWS web service implementation, and deploy it in the "jbpm" deploy directory. But it is not working as I expected since it looks like it´s more complicated than I thought. It is complaining with this sort of message:

      19:17:02,315 ERROR [ServiceDeployer] Cannot startup webservice for: ws4ee-wfma-docwr.war
      java.lang.NoClassDefFoundError: org/jboss/webservice/metadata/HandlerMetaData


      I am a bit confused. What I am trying to do is reasonable or I need to use a piece of technology I am not aware of yet: BPEL or ws4jbpm?
      Could you advise me on what it is the right path to follow to achieve this mixture of jBPM and JBossWS I am trying to obtain?

      Thanks for your help in advance.
      Cheers.

        • 1. Re: JBossWS and jBPM interaction
          Alejandro Guizar Master

          What you are trying to do is perfectly valid, you just need to have both the jBPM mbean and your web service in the same server configuration.

          Rebuild the jBPM service archive (.sar) as explained in the topic "install jbpm". Now deploy the jBPM .sar file and your service .war to the default configuration of JBoss AS.

          That should take care of the error you are getting. Otherwise, let us know.

          • 2. Re: JBossWS and jBPM interaction
            Francisco Larrayoz Newbie

            I did not find any replace/replacevalue subelement in build.service.archive target from build.xml inside jbpm subdirectoy of jBPM starter kit. Anyway, I tried the hree steps tutorial... and I get the following error. To deploy jbpm.sar in JBoss AS 4.0.2 I just copy the jbpm.sar file in the deploy directory. Is that all I have to do? Sorry, I am a beginner.


            17:13:48,796 INFO [Configuration] configuring from resource: jbpm.hibernate.cfg
            .xml
            17:13:48,796 INFO [Configuration] Configuration resource: jbpm.hibernate.cfg.xm
            l
            17:13:48,812 INFO [Configuration] Mapping resource: org/jbpm/identity/User.hbm.
            xml
            17:13:48,937 WARN [ServiceController] Problem starting service jboss.jbpm:name=
            DefaultJbpm,service=JbpmService
            java.lang.NoClassDefFoundError: org/apache/commons/collections/SequencedHashMap
            at org.hibernate.mapping.Table.(Table.java:33)
            at org.hibernate.cfg.Mappings.addTable(Mappings.java:116)
            at org.hibernate.cfg.HbmBinder.bindRootPersistentClassCommonValues(HbmBi
            nder.java:250)
            at org.hibernate.cfg.HbmBinder.bindRootClass(HbmBinder.java:235)
            at org.hibernate.cfg.HbmBinder.bindRoot(HbmBinder.java:151)
            at org.hibernate.cfg.Configuration.add(Configuration.java:360)
            at org.hibernate.cfg.Configuration.addInputStream(Configuration.java:397
            )
            at org.hibernate.cfg.Configuration.addResource(Configuration.java:446)
            at org.hibernate.cfg.Configuration.parseMappingElement(Configuration.jav
            a:1313)
            at org.hibernate.cfg.Configuration.parseSessionFactory(Configuration.jav
            a:1285)
            at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1267)
            at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1234)
            at org.hibernate.cfg.Configuration.configure(Configuration.java:1162)
            at org.jbpm.db.JbpmSessionFactory.createConfiguration(JbpmSessionFactory
            .java:111)
            at org.jbpm.db.JbpmSessionFactory.buildJbpmSessionFactory(JbpmSessionFac
            tory.java:90)
            at org.jbpm.db.JbpmSessionFactory.buildJbpmSessionFactory(JbpmSessionFac
            tory.java:86)
            at org.jbpm.db.jmx.JbpmService.startService(JbpmService.java:18)
            at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanS
            upport.java:272)
            at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMB
            eanSupport.java:222)
            at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
            sorImpl.java:25)
            at java.lang.reflect.Method.invoke(Method.java:585)
            at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatch
            er.java:141)
            at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
            at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
            at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.
            java:249)
            at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
            at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceControl
            ler.java:897)
            at $Proxy0.start(Unknown Source)
            at org.jboss.system.ServiceController.start(ServiceController.java:418)
            at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
            sorImpl.java:25)
            at java.lang.reflect.Method.invoke(Method.java:585)
            at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatch
            er.java:141)
            at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
            at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
            at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.
            java:249)
            at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
            at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
            at $Proxy4.start(Unknown Source)
            at org.jboss.deployment.SARDeployer.start(SARDeployer.java:273)
            at org.jboss.deployment.MainDeployer.start(MainDeployer.java:964)
            at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:775)
            at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:738)
            at sun.reflect.GeneratedMethodAccessor48.invoke(Unknown Source)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
            sorImpl.java:25)
            at java.lang.reflect.Method.invoke(Method.java:585)
            at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatch
            er.java:141)
            at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
            at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractIntercept
            or.java:121)
            at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
            at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelM
            BeanOperationInterceptor.java:127)
            at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
            at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.
            java:249)
            at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
            at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
            at $Proxy8.deploy(Unknown Source)
            at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymen
            tScanner.java:325)
            at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentS
            canner.java:501)
            at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.
            doScan(AbstractDeploymentScanner.java:204)
            at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.
            loop(AbstractDeploymentScanner.java:215)
            at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.
            run(AbstractDeploymentScanner.java:194)
            17:13:48,953 ERROR [URLDeploymentScanner] Incomplete Deployment listing:

            --- MBeans waiting for other MBeans ---
            ObjectName: jboss.jbpm:name=DefaultJbpm,service=JbpmService
            State: FAILED
            Reason: java.lang.NoClassDefFoundError: org/apache/commons/collections/Sequenc
            edHashMap
            I Depend On:
            jboss.jca:service=DataSourceBinding,name=DefaultDS

            --- MBEANS THAT ARE THE ROOT CAUSE OF THE PROBLEM ---
            ObjectName: jboss.jbpm:name=DefaultJbpm,service=JbpmService
            State: FAILED
            Reason: java.lang.NoClassDefFoundError: org/apache/commons/collections/Sequenc
            edHashMap
            I Depend On:
            jboss.jca:service=DataSourceBinding,name=DefaultDS


            • 3. Re: JBossWS and jBPM interaction
              Koen Aers Master

              What jBPM version are you working with? It looks to me you got some binary incompatibilities now. Have a try with JBoss 4.0.3.

              Regards,
              Koen