This content has been marked as final. Show 3 replies
The properties that I use to set up the InitialContext are:
p.put(Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory"); p.put(Context.URL_PKG_PREFIXES, "jboss.naming:org.jnp.interfaces") p.put(Context.PROVIDER_URL, "nvarma-lap:1100");
Another curious thing that I have noticed is that the exception stack references port 1200 whereas I specify port 1100 in the PROVIDER_URL.
javax.naming.CommunicationException: Failed to retrieve stub from server 10.180.0.34:1200 [Root exception is java.io.StreamCorruptedException: unexpected block data]
I haven't been able to overcome this problem. Any help will be much appreciated.
Found the problem. I was using jboss-client.jar on the client's classpath. On replacing this with jbossall-client.jar, the problem disappears.
This needs to go into JBoss Wiki!