8 Replies Latest reply on Aug 18, 2006 5:37 AM by doankhoavy

    Help in executing Hello World BPEL example

    gosanjeev

      I'm going through the tutorial http://docs.jboss.org/jbpm/bpel/tutorial.html#tutorial.hello.test and in the last step on running the JUnit test case named ClientTest I'm getting the following error:

      run-test:
      [junit] Testsuite: org.jbpm.bpel.tutorial.hello.ClientTest
      [junit] Tests run: 2, Failures: 0, Errors: 2, Time elapsed: 0.411 sec

      [junit] ------------- Standard Output ---------------
      [junit] 16:36:46,761 ERROR ServiceObjectFactory : Cannot create service
      [junit] javax.naming.NamingException: Cannot unmarshall service ref meta data, cause: java.io.InvalidClassException: javax.xml.namespace.QName; local class incompatible: stream classdesc serialVer
      sionUID = 4418622981026545151, local class serialVersionUID = -9120448754896609940
      [junit] at org.jboss.ws.jaxrpc.ServiceObjectFactory.getObjectInstance(ServiceObjectFactory.java:127)
      [junit] at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:304)
      [junit] at org.jnp.interfaces.NamingContext.getObjectInstance(NamingContext.java:1125)
      [junit] at org.jnp.interfaces.NamingContext.getObjectInstanceWrapFailure(NamingContext.java:1142)
      [junit] at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:705)
      [junit] at org.jboss.naming.client.java.javaURLContextFactory$EncContextProxy.invoke(javaURLContextFactory.java:135)
      [junit] at $Proxy0.lookup(Unknown Source)
      [junit] at javax.naming.InitialContext.lookup(InitialContext.java:351)
      [junit] at org.jbpm.bpel.tutorial.hello.ClientTest.setUp(ClientTest.java:28)
      [junit] at junit.framework.TestCase.runBare(TestCase.java:125)
      [junit] at junit.framework.TestResult$1.protect(TestResult.java:106)
      [junit] at junit.framework.TestResult.runProtected(TestResult.java:124)
      [junit] at junit.framework.TestResult.run(TestResult.java:109)
      [junit] at junit.framework.TestCase.run(TestCase.java:118)
      [junit] at junit.framework.TestSuite.runTest(TestSuite.java:208)
      [junit] at junit.framework.TestSuite.run(TestSuite.java:203)
      [junit] at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUnitTestRunner.java:297)
      [junit] at org.apache.tools.ant.taskdefs.optional.junit.JUnitTask.executeInVM(JUnitTask.java:1072)
      [junit] at org.apache.tools.ant.taskdefs.optional.junit.JUnitTask.execute(JUnitTask.java:682)
      [junit] at org.apache.tools.ant.taskdefs.optional.junit.JUnitTask.executeOrQueue(JUnitTask.java:1434)
      [junit] at org.apache.tools.ant.taskdefs.optional.junit.JUnitTask.execute(JUnitTask.java:632)
      [junit] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
      [junit] at org.apache.tools.ant.Task.perform(Task.java:364)
      [junit] at org.apache.tools.ant.Target.execute(Target.java:341)
      [junit] at org.apache.tools.ant.Target.performTasks(Target.java:369)
      [junit] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)
      [junit] at org.apache.tools.ant.Project.executeTarget(Project.java:1185)
      [junit] at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:40)
      [junit] at org.apache.tools.ant.Project.executeTargets(Project.java:1068)
      [junit] at org.apache.tools.ant.Main.runBuild(Main.java:668)
      [junit] at org.apache.tools.ant.Main.startAnt(Main.java:187)
      [junit] at org.apache.tools.ant.launch.Launcher.run(Launcher.java:246)
      [junit] at org.apache.tools.ant.launch.Launcher.main(Launcher.java:67)
      [junit] 16:36:46,781 ERROR ServiceObjectFactory : Cannot create service
      [junit] javax.naming.NamingException: Cannot unmarshall service ref meta data, cause: java.io.InvalidClassException: javax.xml.namespace.QName; local class incompatible: stream classdesc serialVer
      sionUID = 4418622981026545151, local class serialVersionUID = -9120448754896609940
      [junit] at org.jboss.ws.jaxrpc.ServiceObjectFactory.getObjectInstance(ServiceObjectFactory.java:127)
      [junit] at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:304)
      [junit] at org.jnp.interfaces.NamingContext.getObjectInstance(NamingContext.java:1125)
      [junit] at org.jnp.interfaces.NamingContext.getObjectInstanceWrapFailure(NamingContext.java:1142)
      [junit] at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:705)
      [junit] at org.jboss.naming.client.java.javaURLContextFactory$EncContextProxy.invoke(javaURLContextFactory.java:135)
      [junit] at $Proxy0.lookup(Unknown Source)
      [junit] at javax.naming.InitialContext.lookup(InitialContext.java:351)
      [junit] at org.jbpm.bpel.tutorial.hello.ClientTest.setUp(ClientTest.java:28)
      [junit] at junit.framework.TestCase.runBare(TestCase.java:125)
      [junit] at junit.framework.TestResult$1.protect(TestResult.java:106)
      [junit] at junit.framework.TestResult.runProtected(TestResult.java:124)
      [junit] at junit.framework.TestResult.run(TestResult.java:109)
      [junit] at junit.framework.TestCase.run(TestCase.java:118)
      [junit] at junit.framework.TestSuite.runTest(TestSuite.java:208)
      [junit] at junit.framework.TestSuite.run(TestSuite.java:203)
      [junit] at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUnitTestRunner.java:297)
      [junit] at org.apache.tools.ant.taskdefs.optional.junit.JUnitTask.executeInVM(JUnitTask.java:1072)
      [junit] at org.apache.tools.ant.taskdefs.optional.junit.JUnitTask.execute(JUnitTask.java:682)
      [junit] at org.apache.tools.ant.taskdefs.optional.junit.JUnitTask.executeOrQueue(JUnitTask.java:1434)
      [junit] at org.apache.tools.ant.taskdefs.optional.junit.JUnitTask.execute(JUnitTask.java:632)
      [junit] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
      [junit] at org.apache.tools.ant.Task.perform(Task.java:364)
      [junit] at org.apache.tools.ant.Target.execute(Target.java:341)
      [junit] at org.apache.tools.ant.Target.performTasks(Target.java:369)
      [junit] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)
      [junit] at org.apache.tools.ant.Project.executeTarget(Project.java:1185)
      [junit] at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:40)
      [junit] at org.apache.tools.ant.Project.executeTargets(Project.java:1068)
      [junit] at org.apache.tools.ant.Main.runBuild(Main.java:668)
      [junit] at org.apache.tools.ant.Main.startAnt(Main.java:187)
      [junit] at org.apache.tools.ant.launch.Launcher.run(Launcher.java:246)
      [junit] at org.apache.tools.ant.launch.Launcher.main(Launcher.java:67)
      [junit] ------------- ---------------- ---------------
      ...

      Any help would be much appreciated.

      Thanks,

      Sanjeev Chakravarty

        • 1. Re: Help in executing Hello World BPEL example
          gosanjeev

          Please ignore my previous post. The problem got fixed when I reinstalled JDK 1.5_06.

          • 2. Re: Help in executing Hello World BPEL example
            doankhoavy

            hi gosanjeev!
            Would you like share jdk 1.5_06 ?On the Sun site just has jdk 1.5_07.I installed this jdk and also get the same problem as you.
            thanks

            • 3. Re: Help in executing Hello World BPEL example
              peterj

              Prior releases of the JDK can be downloaded from http://java.sun.com/products/archive/.

              • 4. Re: Help in executing Hello World BPEL example
                doankhoavy

                Thanks PeterJ
                Yeah, I have fixed this problem.

                • 5. Re: Help in executing Hello World BPEL example
                  gosanjeev1

                  hi doankhoavy,
                  glad that your problem is fixed. I haven't found enough BPEL examples on JBoss environment. The only reference I have is the document titled "JBoss jBPM BPEL 1.1".
                  If you have come across more samples I would appreciate your sharing them.
                  thanks,
                  sanjeev

                  • 6. Re: Help in executing Hello World BPEL example
                    doankhoavy

                    Hi gosanjeev,
                    I also have the same document as you, no more
                    Thanks.
                    Do you know any designer tools for BPEL that is plugged into the Eclipse?

                    • 7. Re: Help in executing Hello World BPEL example
                      gosanjeev1

                      I am now investigating ActiveBPEL. They have an open source version and also a designer. http://www.activebpel.org/

                      • 8. Re: Help in executing Hello World BPEL example
                        doankhoavy

                        Hi gosanjeev,
                        Yes,the tools that i use then ActiveBPEL is easiest.
                        To answers your prior questtion : in addition have Oracle document
                        http://www.huihoo.com/oracle/docs/B14099_19/integrate.1012/b14448/hello.htm . Oracle plugin Eclipse
                        or IBM Process Choreographer
                        http://www-128.ibm.com/developerworks/webservices/library/ws-bpelwp/
                        These doc purpose to just understand more about BPEL.

                        And i have another question when the fisrt time run then server show a error message :

                        2006-08-17 12:41:42,829 ERROR [org.jboss.ws.jaxrpc.SOAPFaultExceptionHelper] SOAP request exception
                        javax.xml.rpc.JAXRPCException: could not set up port provider
                        at org.jbpm.bpel.service.provider.PortProvider.init(PortProvider.java:148)
                        at org.jboss.ws.handler.HandlerWrapper.init(HandlerWrapper.java:94)
                        at org.jboss.ws.handler.HandlerChainBaseImpl.init(HandlerChainBaseImpl.java:162)
                        at org.jboss.ws.server.ServiceEndpoint.initHandlerChain(ServiceEndpoint.java:368)
                        at org.jboss.ws.server.ServiceEndpoint.initHandlerChain(ServiceEndpoint.java:355)
                        at org.jboss.ws.server.ServiceEndpoint.handleRequest(ServiceEndpoint.java:208)
                        at org.jboss.ws.server.ServiceEndpointServlet.doPost(ServiceEndpointServlet.java:120)
                        at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
                        at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
                        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
                        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
                        at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
                        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
                        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
                        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
                        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
                        at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
                        at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
                        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
                        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
                        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
                        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
                        at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
                        at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
                        at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
                        at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
                        at java.lang.Thread.run(Thread.java:595)
                        Caused by: java.lang.NullPointerException
                        at org.jbpm.bpel.relation.jms.RelationContext.findProcessDefinition(RelationContext.java:95)
                        at org.jbpm.bpel.relation.jms.RelationContext.getProcessContext(RelationContext.java:353)
                        at org.jbpm.bpel.service.provider.PortProvider.setUp(PortProvider.java:160)
                        at org.jbpm.bpel.service.provider.PortProvider.init(PortProvider.java:144)
                        ... 26 more
                        The file webservice.xml
                        <?xml version="1.0" encoding="UTF-8"?>
                        <webservices version="1.1"
                        xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/j2ee_web_services_1_1.xsd"
                        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/j2ee">

                        <webservice-description>

                        <!-- descriptive name for the service -->
                        <webservice-description-name>Hello World</webservice-description-name>
                        <!-- WSDL service file -->
                        <!-- <wsdl-file>WEB-INF/wsdl/hello.wsdl</wsdl-file>-->
                        <wsdl-file>META-INF/wsdl/helloBean.wsdl</wsdl-file>
                        <!-- Java<->XML mapping file -->
                        <!--<jaxrpc-mapping-file>WEB-INF/jaxrpc-mapping.xml</jaxrpc-mapping-file>-->
                        <jaxrpc-mapping-file>META-INF/jaxrpc-ejb-mapping.xml</jaxrpc-mapping-file>

                        <port-component>

                        <!-- logical name for the port (unique within the module) -->
                        <port-component-name>HelloBean</port-component-name>
                        <!-- WSDL port element (in WSDL implementation file) -->
                        <wsdl-port xmlns:portNS="http://hello.chap12.jboss.org">portNS:HelloBean</wsdl-port>

                        <service-endpoint-interface>
                        org.jboss.chap12.hello.HelloServlet
                        </service-endpoint-interface>
                        <!-- associated servlet (in web-app descriptor) -->
                        <service-impl-bean>
                        <!-- <servlet-link>callerServlet</servlet-link>-->
                        <ejb-link>HelloBean</ejb-link>
                        </service-impl-bean>




                        <!-- logical name for the handler (unique within the module) -->
                        <handler-name>callerHandler</handler-name>
                        <!-- handler class (in jBPM BPEL library) -->
                        <handler-class>org.jbpm.bpel.service.provider.PortProvider</handler-class>

                        <init-param>
                        name of the associated partner link
                        <param-name>portName</param-name>
                        <param-value>caller</param-value>
                        </init-param>




                        </port-component>

                        </webservice-description>


                        And file web.xml
                        <?xml version="1.0" encoding="UTF-8"?>
                        <web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee"
                        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                        xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">


                        <servlet-name>relationServlet</servlet-name>
                        <!-- partner relationship servlet class -->
                        <servlet-class>org.jbpm.bpel.relation.jms.RelationServlet</servlet-class>
                        <load-on-startup>1</load-on-startup>


                        <servlet-mapping>
                        <servlet-name>relationServlet</servlet-name>
                        <!-- partner relationship console location -->
                        <url-pattern>/relation</url-pattern>
                        </servlet-mapping>




                        <servlet-name>TestServlet</servlet-name>
                        <servlet-class>org.jboss.chap12.hello.TestServlet</servlet-class>

                        <servlet-mapping>
                        <servlet-name>TestServlet</servlet-name>
                        <url-pattern>/TestServlet</url-pattern>
                        </servlet-mapping>

                        <resource-ref>
                        <!-- sole JMS connection factory -->
                        <res-ref-name>jms/ConnectionFactory</res-ref-name>
                        <res-type>javax.jms.ConnectionFactory</res-type>
                        <res-auth>Container</res-auth>
                        <res-sharing-scope>Shareable</res-sharing-scope>
                        </resource-ref>

                        <message-destination-ref>
                        <!-- queue assigned to caller partner link -->
                        <message-destination-ref-name>jms/caller</message-destination-ref-name>
                        <message-destination-type>javax.jms.Queue</message-destination-type>
                        <message-destination-usage>ConsumesProduces</message-destination-usage>
                        </message-destination-ref>

                        </web-app>
                        but the second time then Ok.I don't know what's problem?

                        You or anyone help me to resovle this problem ?
                        thx.