3 Replies Latest reply on Mar 5, 2008 10:26 PM by Alejandro Guizar

    Help in Excecuting Hello World BPEL Example

    Jasmine Wong Newbie

      I am trying to run the Hello World Example. When I ran the client I am getting the error.

      I am using jboss-4.0.4.GA, JDK 1.5_06

      I did the followings:

      jbpm-bpel-1.1.Beta3\deploy> ant deploy-definition
      jbpm-bpel-1.1.Beta3\examples\hello > ant generate-service
      jbmp-bpel-1.1.Beta3\examples\hello > ant generate-artifacts
      jbmp-bpel-1.1.Beta3\examples\hello > ant deploy
      jbmp-bpel-1.1.Beta3\examples\hello > ant deploy-client
      jbmp-bpel-1.1.Beta3\examples\hello > ant run-test

      Everything is fine until run-test. I got error saying:
      ?jbpmbpel-client not bound, javax.naming.NameNotFound exception in the test Report. The hello-client.jar is the jboss/server/default/deploy directory. The jar contains

      0 Wed Apr 25 11:15:18 PDT 2007 META-INF/
      106 Wed Apr 25 11:15:16 PDT 2007 META-INF/MANIFEST.MF
      1119 Mon Jan 22 14:15:44 PST 2007 META-INF/application-client.xml
      298 Mon Jan 22 14:15:44 PST 2007 META-INF/jboss-client.xml
      2053 Tue Apr 24 14:59:14 PDT 2007 META-INF/jaxrpc-mapping.xml
      0 Wed Apr 25 11:15:18 PDT 2007 META-INF/wsdl/
      828 Wed Apr 25 11:15:12 PDT 2007 META-INF/wsdl/hello-binding-1.wsdl
      540 Wed Apr 25 11:15:12 PDT 2007 META-INF/wsdl/hello-service.wsdl
      996 Wed Apr 25 11:15:12 PDT 2007 META-INF/wsdl/hello.wsdl

      I am getting the following error when executing the test:

      <?xml version="1.0" encoding="UTF-8" ?>











































































































































































































































































      javax.naming.NameNotFoundException: jbpmbpel-client not bound
      at org.jnp.server.NamingServer.getBinding(NamingServer.java:529)
      at org.jnp.server.NamingServer.getBinding(NamingServer.java:537)
      at org.jnp.server.NamingServer.getObject(NamingServer.java:543)
      at org.jnp.server.NamingServer.lookup(NamingServer.java:296)
      at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:294)
      at sun.rmi.transport.Transport$1.run(Transport.java:153)
      at java.security.AccessController.doPrivileged(Native Method)
      at sun.rmi.transport.Transport.serviceCall(Transport.java:149)
      at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:466)
      at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:707)
      at java.lang.Thread.run(Thread.java:595)
      at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:247)
      at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:223)
      at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:126)
      at org.jnp.server.NamingServer_Stub.lookup(Unknown Source)
      at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:625)
      at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:587)
      at javax.naming.InitialContext.lookup(InitialContext.java:351)
      at org.jboss.naming.client.java.javaURLContextFactory$EncContextProxy.invoke(javaURLContextFactory.java:129)
      at $Proxy1.lookup(Unknown Source)
      at javax.naming.InitialContext.lookup(InitialContext.java:351)
      at org.jbpm.bpel.tutorial.hello.HelloTest.setUp(HelloTest.java:51)
      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)



      javax.naming.NameNotFoundException: jbpmbpel-client not bound
      at org.jnp.server.NamingServer.getBinding(NamingServer.java:529)
      at org.jnp.server.NamingServer.getBinding(NamingServer.java:537)
      at org.jnp.server.NamingServer.getObject(NamingServer.java:543)
      at org.jnp.server.NamingServer.lookup(NamingServer.java:296)
      at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:294)
      at sun.rmi.transport.Transport$1.run(Transport.java:153)
      at java.security.AccessController.doPrivileged(Native Method)
      at sun.rmi.transport.Transport.serviceCall(Transport.java:149)
      at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:466)
      at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:707)
      at java.lang.Thread.run(Thread.java:595)
      at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:247)
      at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:223)
      at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:126)
      at org.jnp.server.NamingServer_Stub.lookup(Unknown Source)
      at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:625)
      at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:587)
      at javax.naming.InitialContext.lookup(InitialContext.java:351)
      at org.jboss.naming.client.java.javaURLContextFactory$EncContextProxy.invoke(javaURLContextFactory.java:129)
      at $Proxy1.lookup(Unknown Source)
      at javax.naming.InitialContext.lookup(InitialContext.java:351)
      at org.jbpm.bpel.tutorial.hello.HelloTest.setUp(HelloTest.java:51)
      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)


      <system-out><![CDATA[
      18:40:58,705 DEBUG SecurityAssociation : Using ThreadLocal: false
      18:40:58,987 DEBUG NestedThrowable$Util : org.jboss.util.NestedThrowable.parentTraceEnabled=true
      18:40:58,987 DEBUG NestedThrowable$Util : org.jboss.util.NestedThrowable.nestedTraceEnabled=false
      18:40:58,987 DEBUG NestedThrowable$Util : org.jboss.util.NestedThrowable.detectDuplicateNesting=true
      ]]></system-out>
      <system-err><![CDATA[javax.management.MBeanException
      at org.jboss.mx.interceptor.ReflectedDispatcher.handleInvocationExceptions(ReflectedDispatcher.java:180)
      at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:163)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
      at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
      at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:585)
      at org.jboss.jmx.connector.invoker.InvokerAdaptorService.invoke(InvokerAdaptorService.java:266)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:585)
      at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
      at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
      at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
      at org.jboss.invocation.jrmp.server.JRMPProxyFactory.invoke(JRMPProxyFactory.java:179)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:585)
      at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
      at org.jboss.invocation.jrmp.server.JRMPInvoker$MBeanServerAction.invoke(JRMPInvoker.java:819)
      at org.jboss.invocation.jrmp.server.JRMPInvoker.invoke(JRMPInvoker.java:420)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:585)
      at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:294)
      at sun.rmi.transport.Transport$1.run(Transport.java:153)
      at java.security.AccessController.doPrivileged(Native Method)
      at sun.rmi.transport.Transport.serviceCall(Transport.java:149)
      at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:466)
      at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:707)
      at java.lang.Thread.run(Thread.java:595)
      Caused by: org.jboss.deployment.DeploymentException: Failed to setup client ENC; - nested throwable: (org.jboss.deployment.DeploymentException: Cannot bind webservice to client environment; - nested throwable: (javax.naming.NameAlreadyBoundException))
      at org.jboss.deployment.ClientDeployer.start(ClientDeployer.java:171)
      at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1007)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:808)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:771)
      at sun.reflect.GeneratedMethodAccessor15.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:585)
      at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
      ... 47 more
      Caused by: org.jboss.deployment.DeploymentException: Cannot bind webservice to client environment; - nested throwable: (javax.naming.NameAlreadyBoundException)
      at org.jboss.ws.server.WebServiceClientDeployer.setupServiceRefEnvironment(WebServiceClientDeployer.java:72)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:585)
      at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
      at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
      at $Proxy51.setupServiceRefEnvironment(Unknown Source)
      at org.jboss.webservice.WebServiceClientHandler.setupServiceRefEnvironment(WebServiceClientHandler.java:94)
      at org.jboss.deployment.ClientDeployer.setupEnvironment(ClientDeployer.java:272)
      at org.jboss.deployment.ClientDeployer.start(ClientDeployer.java:167)
      ... 54 more
      Caused by: javax.naming.NameAlreadyBoundException
      at org.jnp.server.NamingServer.bind(NamingServer.java:144)
      at org.jnp.server.NamingServer.bind(NamingServer.java:109)
      at org.jnp.server.NamingServer.bind(NamingServer.java:109)
      at org.jnp.interfaces.NamingContext.bind(NamingContext.java:566)
      at org.jnp.interfaces.NamingContext.bind(NamingContext.java:531)
      at org.jboss.util.naming.Util.bind(Util.java:102)
      at org.jboss.util.naming.Util.bind(Util.java:89)
      at org.jboss.ws.server.WebServiceClientDeployer.setupServiceRefEnvironment(WebServiceClientDeployer.java:65)
      ... 68 more
      ]]></system-err>


      Thanks


        • 1. Re: Help in Excecuting Hello World BPEL Example
          Jasmine Wong Newbie

          Also, the error I am getting in JBoss (version 4.0.4.GA) is:

          11:45:57,322 WARN [NestedThrowable] Duplicate throwable nesting of same base ty
          pe: class org.jboss.deployment.DeploymentException is assignable from: class org
          .jboss.deployment.DeploymentException
          11:45:57,322 ERROR [MainDeployer] Could not start deployment: file:/C:/dev/jbpm-
          bpel-1.1.Beta3/examples/hello/target/hello-client.jar
          org.jboss.deployment.DeploymentException: Failed to setup client ENC; - nested t
          hrowable: (org.jboss.deployment.DeploymentException: Cannot bind webservice to c
          lient environment; - nested throwable: (javax.naming.NameAlreadyBoundException))

          at org.jboss.deployment.ClientDeployer.start(ClientDeployer.java:171)
          at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1007)
          at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:808)
          at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:771)
          at sun.reflect.GeneratedMethodAccessor15.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:155)
          at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
          at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractIntercept
          or.java:133)
          at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
          at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelM
          BeanOperationInterceptor.java:142)
          at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
          at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.
          java:264)
          at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
          java:39)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
          sorImpl.java:25)
          at java.lang.reflect.Method.invoke(Method.java:585)
          at org.jboss.jmx.connector.invoker.InvokerAdaptorService.invoke(InvokerA
          daptorService.java:266)
          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
          java:39)
          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:155)
          at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
          at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractIntercept
          or.java:133)
          at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
          at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelM
          BeanOperationInterceptor.java:142)
          at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
          at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.
          java:264)
          at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
          at org.jboss.invocation.jrmp.server.JRMPProxyFactory.invoke(JRMPProxyFac
          tory.java:179)
          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
          java:39)
          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:155)
          at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
          at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
          at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.
          java:264)
          at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
          at org.jboss.invocation.jrmp.server.JRMPInvoker$MBeanServerAction.invoke
          (JRMPInvoker.java:819)
          at org.jboss.invocation.jrmp.server.JRMPInvoker.invoke(JRMPInvoker.java:
          420)
          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
          java:39)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
          sorImpl.java:25)
          at java.lang.reflect.Method.invoke(Method.java:585)
          at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:294)
          at sun.rmi.transport.Transport$1.run(Transport.java:153)
          at java.security.AccessController.doPrivileged(Native Method)
          at sun.rmi.transport.Transport.serviceCall(Transport.java:149)
          at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:4
          60)
          at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport
          .java:701)
          at java.lang.Thread.run(Thread.java:595)
          Caused by: org.jboss.deployment.DeploymentException: Cannot bind webservice to c
          lient environment; - nested throwable: (javax.naming.NameAlreadyBoundException)
          at org.jboss.ws.server.WebServiceClientDeployer.setupServiceRefEnvironme
          nt(WebServiceClientDeployer.java:72)
          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
          java:39)
          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:155)
          at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
          at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
          at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.
          java:264)
          at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
          at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
          at $Proxy51.setupServiceRefEnvironment(Unknown Source)
          at org.jboss.webservice.WebServiceClientHandler.setupServiceRefEnvironme
          nt(WebServiceClientHandler.java:94)
          at org.jboss.deployment.ClientDeployer.setupEnvironment(ClientDeployer.j
          ava:272)
          at org.jboss.deployment.ClientDeployer.start(ClientDeployer.java:167)
          ... 54 more
          Caused by: javax.naming.NameAlreadyBoundException
          at org.jnp.server.NamingServer.bind(NamingServer.java:144)
          at org.jnp.server.NamingServer.bind(NamingServer.java:109)
          at org.jnp.server.NamingServer.bind(NamingServer.java:109)
          at org.jnp.interfaces.NamingContext.bind(NamingContext.java:566)
          at org.jnp.interfaces.NamingContext.bind(NamingContext.java:531)
          at org.jboss.util.naming.Util.bind(Util.java:102)
          at org.jboss.util.naming.Util.bind(Util.java:89)
          at org.jboss.ws.server.WebServiceClientDeployer.setupServiceRefEnvironme
          nt(WebServiceClientDeployer.java:65)
          ... 68 more
          11:45:57,447 INFO [ClientDeployer] Removing client ENC from: jbpmbpel-client
          11:45:57,525 WARN [MainDeployer] undeploy 'file:/C:/dev/jbpm-bpel-1.1.Beta3/exa
          mples/hello/target/hello-client.jar' : package not deployed


          Thanks,
          Lily

          • 2. Re: Help in Excecuting Hello World BPEL Example
            Yogesh Kumar Newbie

            Hi,

            I have written a standalone java client to access the HelloWorld Sample example of JBPEL 1.1 GA.

            Environment Details
            =============
            JDK - version 1.5
            JBPM - version 3.1.4
            JBPEL - version 1.1GA
            JBoss - version 4.2.2 GA

            I am getting the following error:

            <<
            at org.jnp.server.NamingServer.getBinding(NamingServer.java:529)
            at org.jnp.server.NamingServer.getBinding(NamingServer.java:537)
            at org.jnp.server.NamingServer.getObject(NamingServer.java:543)
            at org.jnp.server.NamingServer.lookup(NamingServer.java:296)
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
            at java.lang.reflect.Method.invoke(Method.java:585)
            at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:294)
            at sun.rmi.transport.Transport$1.run(Transport.java:153)
            at java.security.AccessController.doPrivileged(Native Method)
            at sun.rmi.transport.Transport.serviceCall(Transport.java:149)
            at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:460)
            at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:701)
            at java.lang.Thread.run(Thread.java:595)
            at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:247)
            at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:223)
            at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:126)
            at org.jnp.server.NamingServer_Stub.lookup(Unknown Source)
            at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:667)
            at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:627)
            at javax.naming.InitialContext.lookup(InitialContext.java:351)
            at org.jboss.naming.client.java.javaURLContextFactory$EncContextProxy.invoke(javaURLContextFactory.java:129)
            at $Proxy0.lookup(Unknown Source)
            at javax.naming.InitialContext.lookup(InitialContext.java:351)
            at org.jbpm.bpel.tutorial.hello.MyClient.doJNDILookup(MyClient.java:76)
            at org.jbpm.bpel.tutorial.hello.MyClient.test(MyClient.java:35)
            at org.jbpm.bpel.tutorial.hello.MyClient.main(MyClient.java:30)
            >>


            MyClient.java
            =========

            package org.jbpm.bpel.tutorial.hello;

            import java.io.IOException;
            import java.util.Hashtable;

            import javax.naming.InitialContext;
            import javax.xml.rpc.ServiceException;

            import org.tempuri.hello.Greeter;
            import org.tempuri.hello.HelloWorldService;

            public class MyClient {

            private HelloWorldService helloService;

            public static final String JNDI_NAME = "java:comp/env/service/Hello";

            /**
            * To handle the get requests.
            *
            * @param HttpServletRequest -
            * theRequest
            * @param HttpServletResponse -
            * theResponse
            * @throws IOException
            */
            public static void main(String[] args){

            MyClient client = new MyClient();
            client.test();
            }

            public void test(){

            helloService = (HelloWorldService) doJNDILookup(JNDI_NAME);
            if(helloService == null){
            System.out.println("Service not found. Exiting.....");
            return;
            }
            try {

            Greeter greeter = helloService.getGreeterPort();
            String greeting = greeter.sayHello("Yogesh");
            System.out.println("<<<<< greeting >>>> " + greeting);
            } catch (ServiceException se) {
            System.out.println("ServiceException Thrown >>>" + se.getMessage());
            se.printStackTrace();
            }
            catch(Exception e){
            System.out.println("Exception Thrown >>>" + e.getMessage());
            e.printStackTrace();

            }
            }

            /**
            *
            * @param jndiName
            * @return the Object
            */
            public static Object doJNDILookup(String jndiName) {
            Object object = null;
            try {

            Hashtable env = new Hashtable();
            env.put("java.naming.factory.initial", "org.jnp.interfaces.NamingContextFactory");
            env.put("java.naming.factory.url.pkgs", "org.jboss.naming.client");
            //env.put("java.naming.factory.url.pkgs", "org.jboss.naming:org.jnp.interfaces");
            env.put("java.naming.provider.url", "jnp://localhost:1099");
            env.put("j2ee.clientName","jbpmbpel-client");

            InitialContext ctx = new InitialContext(env);

            System.out.println(ctx.getEnvironment());

            object = ctx.lookup(jndiName);
            } catch (Exception e) {
            e.printStackTrace();
            }
            return object;
            }
            }


            Please help in finding the solution.

            Thanks in advance.

            Best Regards,
            Yogesh

            • 3. Re: Help in Excecuting Hello World BPEL Example
              Alejandro Guizar Master

              Yogesh, please do not cross post. It makes tracking an issue very hard. I've already replied to your question in your other post.