JNDI over HTTP on JBoss 4.0.4GA

Discussions

General J2EE: JNDI over HTTP on JBoss 4.0.4GA

  1. JNDI over HTTP on JBoss 4.0.4GA (1 messages)

    I'm getting an exception when trying to use JNDI over HTTP on JBoss 4.0.4GA, and was hoping someone could point me in the right direction. I'm trying to get an InitialContext using: Properties prop = new Properties(); prop.setProperty(Context.INITIAL_CONTEXT_FACTORY, "org.jboss.naming.HttpNamingContextFactory"); prop.setProperty(Context.PROVIDER_URL, "http://192.168.1.4:8080/invoker/JMXInvokerServlet"); prop.setProperty(Context.URL_PKG_PREFIXES, "org.jboss.naming:org.jnp.interfaces"); Context ctx = new InitialContext(prop); The server configuration is set up like this: <!-- Expose the Naming service interface via HTTP --> <!-- The Naming service we are proxying --> jboss:service=Naming <!-- Compose the invoker URL from the cluster node address --> http:// :8080/invoker/JMXInvokerServlet true org.jnp.interfaces.Naming org.jboss.proxy.ClientMethodInterceptor org.jboss.proxy.SecurityInterceptor org.jboss.naming.interceptors.ExceptionInterceptor org.jboss.invocation.InvokerInterceptor The client shows this exception: javax.naming.NamingException: Failed to retrieve Naming interface [Root exception is java.io.IOException: Invalid reply content seen: class org.jboss.invocation.InvocationException] at org.jboss.naming.HttpNamingContextFactory.getInitialContext(HttpNamingContextFactory.java:84) at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:667) at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:247) at javax.naming.InitialContext.init(InitialContext.java:223) at javax.naming.InitialContext.(InitialContext.java:197) at com.centerforce.ClientTestUI.initMessaging(ClientTestUI.java:37) at com.centerforce.ClientTestUI.(ClientTestUI.java:25) at com.centerforce.ClientTestUI$1.run(ClientTestUI.java:105) at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209) at java.awt.EventQueue.dispatchEvent(EventQueue.java:461) at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149) at java.awt.EventDispatchThread.run(EventDispatchThread.java:110) Caused by: java.io.IOException: Invalid reply content seen: class org.jboss.invocation.InvocationException at org.jboss.naming.HttpNamingContextFactory.getNamingServer(HttpNamingContextFactory.java:153) at org.jboss.naming.HttpNamingContextFactory.getInitialContext(HttpNamingContextFactory.java:80) ... 14 more Any help is appreciated.
  2. There's a bug in documentation. Try setting: java.naming.provider.url=http://192.168.1.4:8080/invoker/JNDIFactory