2 Replies Latest reply on Jan 12, 2009 7:47 AM by Alejandro Guizar

    I have some trouble in BPEL hello test.

    HC Kanty Newbie

      I deploy the hello example successful, but when I start the client, it shows

      Exception in thread "main" javax.naming.NameNotFoundException: comp 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:267)
       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:589)
       at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:305)
       at sun.rmi.transport.Transport$1.run(Transport.java:159)
       at java.security.AccessController.doPrivileged(Native Method)
       at sun.rmi.transport.Transport.serviceCall(Transport.java:155)
       at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:535)
       at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:790)
       at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:649)
       at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:679)
       at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:704)
       at java.lang.Thread.run(Thread.java:619)
       at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:255)
       at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:233)
       at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:142)
       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:392)
       at test.webservice.TestInJBOSS.main(TestInJBOSS.java:29)
      


      my client
      package test.webservice;
      
      import java.util.Properties;
      
      import javax.naming.Context;
      import javax.naming.InitialContext;
      
      import org.jbpm.examples.hello.Greeter;
      import org.jbpm.examples.hello.HelloWorldService;
      
      public class TestInJBOSS {
      
       public static final String JBOSS_CONTEXT_FACTORY = "org.jnp.interfaces.NamingContextFactory";
       public static final String JBOSS_PROVIDER_URL = "jnp://192.168.18.100:1099";
       public static final String JBOSS_URL_PKG_PREFIXES = "org.jboss.naming:org.jnp.interfaces";
      
       public static void main(String[] args) throws Exception {
      
       // WSDL2Java.main(new
       // String[]{"http://192.168.18.100:8080/HelloWorld/Greeter?wsdl"});
      
       Properties prop = new Properties();
      
       prop.put(Context.INITIAL_CONTEXT_FACTORY, JBOSS_CONTEXT_FACTORY);
       prop.put(Context.PROVIDER_URL, JBOSS_PROVIDER_URL);
       prop.put(Context.URL_PKG_PREFIXES, JBOSS_URL_PKG_PREFIXES);
      
       InitialContext initial = new InitialContext(prop);
       HelloWorldService hws = (HelloWorldService) initial
       .lookup("java:comp/env/service/Hello");
       Greeter proxy = hws.getGreeterPort();
       // use proxy as local java object
       String greeting = proxy.sayHello("Popeye");
       System.out.print("echo : " + greeting);
       }
      
      }
      
      


        • 1. Re: I have some trouble in BPEL hello test.
          HC Kanty Newbie

          I also find some error in jboss console


          16:51:33,843 ERROR [STDERR] javax.management.MalformedObjectNameException: Inval
          id character ':' in value part of property
          16:51:33,843 ERROR [STDERR] at javax.management.ObjectName.construct(ObjectN
          ame.java:602)
          16:51:33,843 ERROR [STDERR] at javax.management.ObjectName.<init>(ObjectName
          .java:1394)
          16:51:33,843 ERROR [STDERR] at org.jboss.console.plugins.EJBModuleLister.cre
          ateContainerName(EJBModuleLister.java:133)
          16:51:33,843 ERROR [STDERR] at org.jboss.console.plugins.EJBModuleLister.cre
          ateBeans(EJBModuleLister.java:79)
          16:51:33,843 ERROR [STDERR] at org.jboss.console.plugins.EJBModuleLister.get
          TreeForResource(EJBModuleLister.java:159)
          16:51:33,843 ERROR [STDERR] at org.jboss.console.plugins.helpers.AbstractPlu
          ginWrapper.getSubTreeForResource(AbstractPluginWrapper.java:215)
          16:51:33,843 ERROR [STDERR] at org.jboss.console.manager.PluginManager.getTr
          eesForResource(PluginManager.java:407)
          16:51:33,843 ERROR [STDERR] at org.jboss.console.manager.PluginManager.getTr
          eeForProfile(PluginManager.java:207)
          16:51:33,843 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(
          Native Method)
          16:51:33,843 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(N
          ativeMethodAccessorImpl.java:39)
          16:51:33,843 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invo
          ke(DelegatingMethodAccessorImpl.java:25)
          16:51:33,843 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:5
          89)
          16:51:33,843 ERROR [STDERR] at org.jboss.mx.interceptor.ReflectedDispatcher.
          invoke(ReflectedDispatcher.java:155)
          16:51:33,843 ERROR [STDERR] at org.jboss.mx.server.Invocation.dispatch(Invoc
          ation.java:94)
          16:51:33,843 ERROR [STDERR] at org.jboss.mx.server.Invocation.invoke(Invocat
          ion.java:86)
          16:51:33,843 ERROR [STDERR] at org.jboss.mx.server.AbstractMBeanInvoker.invo
          ke(AbstractMBeanInvoker.java:264)
          16:51:33,843 ERROR [STDERR] at org.jboss.mx.server.MBeanServerImpl.invoke(MB
          eanServerImpl.java:659)
          16:51:33,843 ERROR [STDERR] at org.jboss.console.remote.InvokerServlet.proce
          ssRequest(InvokerServlet.java:105)
          16:51:33,843 ERROR [STDERR] at org.jboss.console.remote.InvokerServlet.doPos
          t(InvokerServlet.java:148)
          16:51:33,843 ERROR [STDERR] at javax.servlet.http.HttpServlet.service(HttpSe
          rvlet.java:710)
          16:51:33,843 ERROR [STDERR] at javax.servlet.http.HttpServlet.service(HttpSe
          rvlet.java:803)
          16:51:33,843 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterCha
          in.internalDoFilter(ApplicationFilterChain.java:290)
          16:51:33,843 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterCha
          in.doFilter(ApplicationFilterChain.java:206)
          16:51:33,843 ERROR [STDERR] at org.jboss.web.tomcat.filters.ReplyHeaderFilte
          r.doFilter(ReplyHeaderFilter.java:96)
          16:51:33,843 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterCha
          in.internalDoFilter(ApplicationFilterChain.java:235)
          16:51:33,843 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterCha
          in.doFilter(ApplicationFilterChain.java:206)
          16:51:33,843 ERROR [STDERR] at org.apache.catalina.core.StandardWrapperValve
          .invoke(StandardWrapperValve.java:230)
          16:51:33,843 ERROR [STDERR] at org.apache.catalina.core.StandardContextValve
          .invoke(StandardContextValve.java:175)
          16:51:33,843 ERROR [STDERR] at org.jboss.web.tomcat.security.SecurityAssocia
          tionValve.invoke(SecurityAssociationValve.java:182)
          16:51:33,843 ERROR [STDERR] at org.jboss.web.tomcat.security.JaccContextValv
          e.invoke(JaccContextValve.java:84)
          16:51:33,843 ERROR [STDERR] at org.apache.catalina.core.StandardHostValve.in
          voke(StandardHostValve.java:127)
          16:51:33,843 ERROR [STDERR] at org.apache.catalina.valves.ErrorReportValve.i
          nvoke(ErrorReportValve.java:102)
          16:51:33,843 ERROR [STDERR] at org.jboss.web.tomcat.service.jca.CachedConnec
          tionValve.invoke(CachedConnectionValve.java:157)
          16:51:33,843 ERROR [STDERR] at org.apache.catalina.core.StandardEngineValve.
          invoke(StandardEngineValve.java:109)
          16:51:33,843 ERROR [STDERR] at org.apache.catalina.connector.CoyoteAdapter.s
          ervice(CoyoteAdapter.java:262)
          16:51:33,843 ERROR [STDERR] at org.apache.coyote.http11.Http11Processor.proc
          ess(Http11Processor.java:844)
          16:51:33,843 ERROR [STDERR] at org.apache.coyote.http11.Http11Protocol$Http1
          1ConnectionHandler.process(Http11Protocol.java:583)
          16:51:33,843 ERROR [STDERR] at org.apache.tomcat.util.net.JIoEndpoint$Worker
          .run(JIoEndpoint.java:446)
          16:51:33,843 ERROR [STDERR] at java.lang.Thread.run(Thread.java:619)
          16:51:33,843 INFO [STDOUT] org.jboss.console.plugins.helpers.AbstractPluginWrap
          per$StandardMBeanChecker@bdacf2
          16:51:33,843 ERROR [STDERR] javax.management.MalformedObjectNameException: Inval
          id character ':' in value part of property
          16:51:33,843 ERROR [STDERR] at javax.management.ObjectName.construct(ObjectN
          ame.java:602)
          16:51:33,843 ERROR [STDERR] at javax.management.ObjectName.<init>(ObjectName
          .java:1394)
          16:51:33,843 ERROR [STDERR] at org.jboss.console.plugins.EJBModuleLister.cre
          ateContainerName(EJBModuleLister.java:133)
          16:51:33,843 ERROR [STDERR] at org.jboss.console.plugins.EJBModuleLister.cre
          ateBeans(EJBModuleLister.java:79)
          16:51:33,843 ERROR [STDERR] at org.jboss.console.plugins.EJBModuleLister.get
          TreeForResource(EJBModuleLister.java:159)
          16:51:33,843 ERROR [STDERR] at org.jboss.console.plugins.helpers.AbstractPlu
          ginWrapper.getSubTreeForResource(AbstractPluginWrapper.java:215)
          16:51:33,843 ERROR [STDERR] at org.jboss.console.manager.PluginManager.getTr
          eesForResource(PluginManager.java:407)
          16:51:33,843 ERROR [STDERR] at org.jboss.console.manager.PluginManager.getTr
          eeForProfile(PluginManager.java:207)
          16:51:33,843 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(
          Native Method)
          16:51:33,843 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(N
          ativeMethodAccessorImpl.java:39)
          16:51:33,859 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invo
          ke(DelegatingMethodAccessorImpl.java:25)
          16:51:33,859 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:5
          89)
          16:51:33,859 ERROR [STDERR] at org.jboss.mx.interceptor.ReflectedDispatcher.
          invoke(ReflectedDispatcher.java:155)
          16:51:33,859 ERROR [STDERR] at org.jboss.mx.server.Invocation.dispatch(Invoc
          ation.java:94)
          16:51:33,859 ERROR [STDERR] at org.jboss.mx.server.Invocation.invoke(Invocat
          ion.java:86)
          16:51:33,859 ERROR [STDERR] at org.jboss.mx.server.AbstractMBeanInvoker.invo
          ke(AbstractMBeanInvoker.java:264)
          16:51:33,859 ERROR [STDERR] at org.jboss.mx.server.MBeanServerImpl.invoke(MB
          eanServerImpl.java:659)
          16:51:33,859 ERROR [STDERR] at org.jboss.console.remote.InvokerServlet.proce
          ssRequest(InvokerServlet.java:105)
          16:51:33,859 ERROR [STDERR] at org.jboss.console.remote.InvokerServlet.doPos
          t(InvokerServlet.java:148)
          16:51:33,859 ERROR [STDERR] at javax.servlet.http.HttpServlet.service(HttpSe
          rvlet.java:710)
          16:51:33,859 ERROR [STDERR] at javax.servlet.http.HttpServlet.service(HttpSe
          rvlet.java:803)
          16:51:33,859 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterCha
          in.internalDoFilter(ApplicationFilterChain.java:290)
          16:51:33,859 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterCha
          in.doFilter(ApplicationFilterChain.java:206)
          16:51:33,859 ERROR [STDERR] at org.jboss.web.tomcat.filters.ReplyHeaderFilte
          r.doFilter(ReplyHeaderFilter.java:96)
          16:51:33,859 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterCha
          in.internalDoFilter(ApplicationFilterChain.java:235)
          16:51:33,859 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterCha
          in.doFilter(ApplicationFilterChain.java:206)
          16:51:33,859 ERROR [STDERR] at org.apache.catalina.core.StandardWrapperValve
          .invoke(StandardWrapperValve.java:230)
          16:51:33,859 ERROR [STDERR] at org.apache.catalina.core.StandardContextValve
          .invoke(StandardContextValve.java:175)
          16:51:33,859 ERROR [STDERR] at org.jboss.web.tomcat.security.SecurityAssocia
          tionValve.invoke(SecurityAssociationValve.java:182)
          16:51:33,859 ERROR [STDERR] at org.jboss.web.tomcat.security.JaccContextValv
          e.invoke(JaccContextValve.java:84)
          16:51:33,859 ERROR [STDERR] at org.apache.catalina.core.StandardHostValve.in
          voke(StandardHostValve.java:127)
          16:51:33,859 ERROR [STDERR] at org.apache.catalina.valves.ErrorReportValve.i
          nvoke(ErrorReportValve.java:102)
          16:51:33,859 ERROR [STDERR] at org.jboss.web.tomcat.service.jca.CachedConnec
          tionValve.invoke(CachedConnectionValve.java:157)
          16:51:33,859 ERROR [STDERR] at org.apache.catalina.core.StandardEngineValve.
          invoke(StandardEngineValve.java:109)
          16:51:33,859 ERROR [STDERR] at org.apache.catalina.connector.CoyoteAdapter.s
          ervice(CoyoteAdapter.java:262)
          16:51:33,859 ERROR [STDERR] at org.apache.coyote.http11.Http11Processor.proc
          ess(Http11Processor.java:844)
          16:51:33,859 ERROR [STDERR] at org.apache.coyote.http11.Http11Protocol$Http1
          1ConnectionHandler.process(Http11Protocol.java:583)
          16:51:33,859 ERROR [STDERR] at org.apache.tomcat.util.net.JIoEndpoint$Worker
          .run(JIoEndpoint.java:446)
          16:51:33,859 ERROR [STDERR] at java.lang.Thread.run(Thread.java:619)
          16:51:33,859 INFO [STDOUT] org.jboss.console.plugins.helpers.AbstractPluginWrap
          per$StandardMBeanChecker@bdacf2


          • 2. Re: I have some trouble in BPEL hello test.
            Alejandro Guizar Master

            The provided jndi.properties file is:

            java.naming.provider.url=jnp://localhost:1099
            java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
            java.naming.factory.url.pkgs=org.jboss.naming.client
            j2ee.clientName=jbpmbpel-client

            I see possibly relevant discrepancies in java.naming.factory.url.pkgs and j2ee.clientName. The absence of j2ee.clientName is almost certainly the cause of the NameNotBoundException.