4 Replies Latest reply on Aug 30, 2007 4:55 AM by Aldo Lezza

    jbpm-bpel-1.1.Beta3 examples problem!

    shuai gong Newbie

      hill
      i need your help!
      i try to ues the jbpm-bpel-1.1.Beta3 examples,but it has problems
      i use the jboss-4.0.5.GA ,the jdkversion is "1.5.0_07" and alse install the
      Java Web Services Developer Pack 2.0
      the process deployment and web service deployment is normal but the test
      is always failed ,
      the jboss information is shown below

      11:14:10,781 INFO [TomcatDeployer] deploy, ctxPath=/hello, warUrl=.../tmp/deplo
      y/tmp22653hello-exp.war/
      11:14:11,031 WARN [ProxyWarnLog] Narrowing proxy to class org.jbpm.bpel.graph.d
      ef.CompositeActivity - this operation breaks ==
      11:14:11,078 INFO [IntegrationConfigurator] Message reception enabled for proce
      ss: HelloWorld
      11:14:11,140 INFO [WSDLFilePublisher] WSDL published to: file:/D:/jboss-4.0.5.G
      A/server/default/data/wsdl/hello.war/hello-service.wsdl
      11:14:11,187 INFO [ServiceEndpointManager] WebService started: http://goose:808
      0/hello/greeter
      11:14:23,968 INFO [ClientDeployer] Client ENC bound under: jbpmbpel-client
      11:14:24,109 INFO [ClientDeployer] Removing client ENC from: jbpmbpel-client
      



      i just run the ant script in the examples
      and the error information is

      11:14:24,078 ERROR ServiceObjectFactory : Cannot create service
      javax.naming.NamingException: Cannot unmarshall service ref meta data, cause: java.io.InvalidClassException: javax.xml.namespace.QName; local class incompatible: stream classdesc serialVersionUID = 4418622981026545151, local class serialVersionUID = -9120448754896609940
       at org.jboss.ws.jaxrpc.ServiceObjectFactory.getObjectInstance(ServiceObjectFactory.java:126)
       at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:304)
       at org.jnp.interfaces.NamingContext.getObjectInstance(NamingContext.java:1125)
       at org.jnp.interfaces.NamingContext.getObjectInstanceWrapFailure(NamingContext.java:1142)
       at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:705)
       at org.jboss.naming.client.java.javaURLContextFactory$EncContextProxy.invoke(javaURLContextFactory.java:135)
       at $Proxy1.lookup(Unknown Source)
       at javax.naming.InitialContext.lookup(InitialContext.java:351)
       at org.jbpm.bpel.tutorial.hello.HelloTest.setUp(HelloTest.java:67)
       at junit.framework.TestCase.runBare(TestCase.java:125)
       at junit.framework.TestResult$1.protect(TestResult.java:106)
       at junit.framework.TestResult.runProtected(TestResult.java:124)
       at junit.framework.TestResult.run(TestResult.java:109)
       at junit.framework.TestCase.run(TestCase.java:118)
       at junit.framework.TestSuite.runTest(TestSuite.java:208)
       at junit.framework.TestSuite.run(TestSuite.java:203)
       at junit.extensions.TestDecorator.basicRun(TestDecorator.java:22)
       at junit.extensions.TestSetup$1.protect(TestSetup.java:19)
       at junit.framework.TestResult.runProtected(TestResult.java:124)
       at junit.extensions.TestSetup.run(TestSetup.java:23)
       at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUnitTestRunner.java:297)
       at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.launch(JUnitTestRunner.java:672)
       at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUnitTestRunner.java:567)
      in setUp!
      11:14:24,093 ERROR ServiceObjectFactory : Cannot create service
      javax.naming.NamingException: Cannot unmarshall service ref meta data, cause: java.io.InvalidClassException: javax.xml.namespace.QName; local class incompatible: stream classdesc serialVersionUID = 4418622981026545151, local class serialVersionUID = -9120448754896609940
       at org.jboss.ws.jaxrpc.ServiceObjectFactory.getObjectInstance(ServiceObjectFactory.java:126)
       at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:304)
       at org.jnp.interfaces.NamingContext.getObjectInstance(NamingContext.java:1125)
       at org.jnp.interfaces.NamingContext.getObjectInstanceWrapFailure(NamingContext.java:1142)
       at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:705)
       at org.jboss.naming.client.java.javaURLContextFactory$EncContextProxy.invoke(javaURLContextFactory.java:135)
       at $Proxy1.lookup(Unknown Source)
       at javax.naming.InitialContext.lookup(InitialContext.java:351)
       at org.jbpm.bpel.tutorial.hello.HelloTest.setUp(HelloTest.java:67)
       at junit.framework.TestCase.runBare(TestCase.java:125)
       at junit.framework.TestResult$1.protect(TestResult.java:106)
       at junit.framework.TestResult.runProtected(TestResult.java:124)
       at junit.framework.TestResult.run(TestResult.java:109)
       at junit.framework.TestCase.run(TestCase.java:118)
       at junit.framework.TestSuite.runTest(TestSuite.java:208)
       at junit.framework.TestSuite.run(TestSuite.java:203)
       at junit.extensions.TestDecorator.basicRun(TestDecorator.java:22)
       at junit.extensions.TestSetup$1.protect(TestSetup.java:19)
       at junit.framework.TestResult.runProtected(TestResult.java:124)
       at junit.extensions.TestSetup.run(TestSetup.java:23)
       at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUnitTestRunner.java:297)
       at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.launch(JUnitTestRunner.java:672)
       at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUnitTestRunner.java:567)
      
      


      And the test class code is
      package org.jbpm.bpel.tutorial.hello;
      
      import java.util.Properties;
      import javax.naming.InitialContext;
      import javax.naming.NamingException;
      import javax.xml.namespace.QName;
      import javax.xml.rpc.Call;
      import java.net.URL;
      import javax.xml.namespace.QName;
      import junit.framework.Test;
      import junit.framework.TestCase;
      
      
      import org.jboss.test.ws.JBossWSTestSetup;
      
      /**
       * @author Alejandro Gu?ar
       * @version $Revision: 1.1 $ $Date: 2006/09/27 03:53:02 $
       */
      public class HelloTest extends TestCase {
      
       private HelloWorldService service;
      
       public static Test suite() {
       System.out.println("in suit!");
       return JBossWSTestSetup.newTestSetup(HelloTest.class, "hello-client.jar");
      
       }
      
       protected void setUp() throws Exception {
       if (service == null) {
      
      
       // URL url=new URL("http://goose:8080/hello/greeter?wsdl");
      
       //QName qname = new QName("http://jbpm.org/examples/hello", "HelloWorldService");
      
      
       // ServiceFactory factory = ServiceFactory.newInstance();
       // Service service = factory.createService(url, qname);
       //System.out.println("success!");
      
       InitialContext iniCtx= new InitialContext();
      
      
      
       /*
       * "service/Hello" is the JNDI name of the service interface instance
       * relative to the client environment context. This name matches the
       * <service-ref-name> in application-client.xml
       */
       System.out.println("in setUp!");
       service = (HelloWorldService) iniCtx.lookup("java:comp/env/service/Hello");
      
       }
       }
      
       public void testSayHello_proxy() throws Exception {
       // obtain dynamic proxy for web service port
       System.out.println("in say hello_proxy!");
       Greeter proxy = service.getGreeterPort();
       // use proxy as local java object
       String greeting = proxy.sayHello("Popeye");
       // check proper greeting
       assertEquals("Hello, Popeye!", greeting);
       }
      
       public void testSayHello_dii() throws Exception {
       System.out.println("in say hello_dill!");
       String portTypeNS = "http://jbpm.org/examples/hello";
       // obtain dynamic invocation instance
       Call call = service.createCall(new QName(portTypeNS, "GreeterPort"),
       "sayHello");
       // invoke operation using request/response interaction mode
       String greeting = (String) call.invoke(new Object[] { "Olive" });
       // check proper greeting
       assertEquals("Hello, Olive!", greeting);
       }
      }
      
      


      it make me mad ! i need your help!!!!!

        • 1. Re: jbpm-bpel-1.1.Beta3 examples problem!
          Prabhakar Newbie

          Hi,

          I am also getting the same exception.

          In the junit report for all the test cases I am getting the following error.

          testSayHello_proxy Error Could not dereference object

          javax.naming.NamingException: Could not dereference object [Root exception is java.lang.ClassNotFoundException: org.apache.xerces.dom.DeferredElementNSImpl] at org.jnp.interfaces.NamingContext.getObjectInstanceWrapFailure(NamingContext.java:1150) at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:705) at org.jboss.naming.client.java.javaURLContextFactory$EncContextProxy.invoke(javaURLContextFactory.java:135) at $Proxy1.lookup(Unknown Source) at javax.naming.InitialContext.lookup(InitialContext.java:351) at org.jbpm.bpel.tutorial.hello.HelloTest.setUp(HelloTest.java:48) at junit.extensions.TestDecorator.basicRun(TestDecorator.java:22) at junit.extensions.TestSetup$1.protect(TestSetup.java:19) at junit.extensions.TestSetup.run(TestSetup.java:23)Caused by: java.lang.ClassNotFoundException: org.apache.xerces.dom.DeferredElementNSImpl at java.net.URLClassLoader$1.run(URLClassLoader.java:200) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:188) at java.lang.ClassLoader.loadClass(ClassLoader.java:306) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:268) at java.lang.ClassLoader.loadClass(ClassLoader.java:251) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:242) at java.io.ObjectInputStream.resolveClass(ObjectInputStream.java:574) at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1538) at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1460) at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1693) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1299) at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1912) at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1836) at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1713) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1299) at java.io.ObjectInputStream.readArray(ObjectInputStream.java:1628) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1293) at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1912) at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1836) at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1713) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1299) at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1912) at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1836) at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1713) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1299) at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1912) at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1836) at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1713) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1299) at java.io.ObjectInputStream.readArray(ObjectInputStream.java:1628) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1293) at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1912) at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1836) at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1713) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1299) at java.io.ObjectInputStream.readObject(ObjectInputStream.java:339) at java.util.HashMap.readObject(HashMap.java:1013) at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:919) at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1813) at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1713) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1299) at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1912) at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1836) at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1713) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1299) at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1912) at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1836) at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1713) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1299) at java.io.ObjectInputStream.readArray(ObjectInputStream.java:1628) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1293) at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1912) at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1836) at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1713) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1299) at java.io.ObjectInputStream.readObject(ObjectInputStream.java:339) at java.util.HashMap.readObject(HashMap.java:1013) at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:919) at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1813) at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1713) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1299) at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1912) at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1836) at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1713) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1299) at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1912) at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1836) at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1713) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1299) at java.io.ObjectInputStream.readObject(ObjectInputStream.java:339) at org.jboss.ws.jaxrpc.ServiceObjectFactory.getObjectInstance(ServiceObjectFactory.java:121) at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:304) at org.jnp.interfaces.NamingContext.getObjectInstance(NamingContext.java:1125) at org.jnp.interfaces.NamingContext.getObjectInstanceWrapFailure(NamingContext.java:1142) ... 19 more



          on the server side it displays the following message

          17:39:12,932 INFO [ClientDeployer] Client ENC bound under: jbpmbpel-client
          17:39:13,510 INFO [ClientDeployer] Removing client ENC from: jbpmbpel-client


          Thanks in advance for your help.

          Regards,
          Prabhakar N.

          • 2. Re: jbpm-bpel-1.1.Beta3 examples problem!
            shuai gong Newbie

            hi itprabha
            i have solved the problem!
            first you chang the jdk to the loewer version than the jdk 1.5.0.7
            i change the jdk 1.5.0.
            second you should copy the xalan.jar xercesImpl.jar
            xml-apis.jar to the JBOSS_HOME/client directory.you can get them form the apathe .
            Hope this can help you!

            • 3. Re: jbpm-bpel-1.1.Beta3 examples problem!
              Prabhakar Newbie

              Hi gongdonghui,

              Thanks for sharing the solution.

              I already had jdk 1.5.0-6 installed on machine. So I just placed the jar files. Now the test cases of HelloTest are passed, but ATM and purchase order test cases are failing.

              I am getting the following error message for AtmFrontEndTest-testConnect test case.

              Call invocation failed with code [Server] because of: The service is not in an appropiate state for the requested operation; nested exception is: javax.xml.rpc.soap.SOAPFaultException: The service is not in an appropiate state for the requested operation
              
              java.rmi.RemoteException: Call invocation failed with code [Server] because of: The service is not in an appropiate state for the requested operation; nested exception is: javax.xml.rpc.soap.SOAPFaultException: The service is not in an appropiate state for the requested operation at org.jboss.ws.jaxrpc.CallImpl.invokeInternal(CallImpl.java:713) at org.jboss.ws.jaxrpc.CallImpl.invoke(CallImpl.java:404) at org.jboss.ws.jaxrpc.CallProxy.invoke(CallProxy.java:148) at $Proxy3.connect(Unknown Source) at org.jbpm.bpel.tutorial.atm.AtmFrontEndTest.testConnect(AtmFrontEndTest.java:61) at junit.extensions.TestDecorator.basicRun(TestDecorator.java:22) at junit.extensions.TestSetup$1.protect(TestSetup.java:19) at junit.extensions.TestSetup.run(TestSetup.java:23)Caused by: javax.xml.rpc.soap.SOAPFaultException: The service is not in an appropiate state for the requested operation at org.jboss.ws.jaxrpc.SOAPFaultExceptionHelper.getSOAPFaultException(SOAPFaultExceptionHelper.java:100) at org.jboss.ws.binding.soap.SOAPBindingProvider.unbindResponseMessage(SOAPBindingProvider.java:486) at org.jboss.ws.jaxrpc.CallImpl.invokeInternal(CallImpl.java:702) ... 23 more



              I tried the atm terminal client as well. It also gives the same error message.

              Are you able to run other test cases successfully?

              Regards,
              Prabhakar N

              • 4. Re: jbpm-bpel-1.1.Beta3 examples problem!
                Aldo Lezza Newbie

                Hi,
                I had the same problem on hello world.
                What I forgot to do was to add the xalan implementation (you can find the jars in the jboss/lib/endorsed) to the jre libs.

                So copy the directory endorsed to
                javahome---> jre --> lib

                Your jre/lib will now have an endorsed dir.

                Hope I was useful. bye