-
1. Re: Failed to retrieve stub from server
stetsonab Jan 6, 2006 3:16 PM (in response to 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");