1 Reply Latest reply on Jan 6, 2006 3:16 PM by stetsonab

    Failed to retrieve stub from server

    stetsonab

      I posted this question already in a different forum (http://www.jboss.org/index.html?module=bb&op=viewtopic&t=74658&start=0) and apologize if you already ran accross it. But there was a similar problem stated before I posted mine which remained unanswered, so I thought, this may be the better forum to pose the question.

      I am trying to set up an ejb ws client but I receive the following error:


      javax.naming.CommunicationException: Failed to retrieve stub from server localhost:8180 [Root exception is java.io.EOFException]
      at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:209)
      at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1183)
      at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:514)
      at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:507)
      at javax.naming.InitialContext.lookup(InitialContext.java:347)
      at com.wcom.rrs.remote.client.CATsClientBean.login(CATsClientBean.java:76)
      at com.wcom.rrs.remote.client.CATsClientBean.main(CATsClientBean.java:105)
      Caused by: java.io.EOFException
      at java.io.ObjectInputStream$PeekInputStream.readFully(ObjectInputStream.java:2165)
      at java.io.ObjectInputStream$BlockDataInputStream.readShort(ObjectInputStream.java:2631)
      at java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:734)
      at java.io.ObjectInputStream.(ObjectInputStream.java:253)
      at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:197)


      Can anyone help me out? Your help is highly appreciated!

        • 1. Re: Failed to retrieve stub from server
          stetsonab

          I was able to get passed the error. Apparently I used the wrong port number. The jnp port was different from the port jboss is running from. But now I am receiving another strange error:
          javax.naming.NameNotFoundException: comp not bound
          at org.jnp.server.NamingServer.getBinding(NamingServer.java:491)
          at org.jnp.server.NamingServer.getBinding(NamingServer.java:499)
          at org.jnp.server.NamingServer.getObject(NamingServer.java:505)
          at org.jnp.server.NamingServer.lookup(NamingServer.java:249)
          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25).

          I deployed the ejb ws client without problems and there are no errors on server startup. I also looked into the jmx console under Jndi View and found the bean:

          java:comp namespace of the CATsClientBean bean:
          +- env (class: org.jnp.interfaces.NamingContext)
          | +- service (class: org.jnp.interfaces.NamingContext)
          | | +- IRISServiceFacade (class: org.jboss.webservice.client.ServiceReferenceable)

          So what am I doing wrong? Here is how I initalize my context:
          Context c = null;

          Properties props = new Properties();
          props.put(Context.INITIAL_CONTEXT_FACTORY,
          "org.jnp.interfaces.NamingContextFactory");
          props.put(Context.PROVIDER_URL, "localhost:1199");
          try{
          c = new InitialContext(props);
          }
          catch (Exception e){
          System.out.println("CATsClientBean: can't get initial context.");
          }try{
          CATsEndpointService service = (CATsEndpointService)c.lookup("java:comp/env/service/IRISServiceFacade");