0 Replies Latest reply on Aug 9, 2003 2:49 AM by taiwuco

    HttpNamingContextFactory  in the same box

    taiwuco

      Greetings,

      In order to setup JNDI over HTTP, I did two configurations:
      The real IP is disgused as 61.xxx.xxx.xxx

      1. On the server side:
      I configured the file jboss-service.xml in the directory http-invoker.sar/META-INF.

      jboss:service=Naming
      http://61.xxx.xxx.xxx
      :8080/invoker/readonly/JMXInvokerServlet
      false

      for all of the four settings.

      2. On the client side:

      The jndi.properties contains:
      java.naming.factory.initial=org.jboss.naming.HttpNamingContextFactory
      java.naming.provider.url=http://61.xxx.xxx.xxx:8080/invoker/JNDIFactory
      java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces


      I have jboss 3.2.2RC2 and postgresql running on my notebook.
      The client is Swing-based.

      What did I do wrong?

      Since 61.xxx.xxx.xxx was retrieved from the jboss-service.xml file settings (I tested by using different IP/name), the client did get InitialContext from jBoss.
      Here is the error message:



      javax.naming.CommunicationException: Operation failed [Root exception is java.net.UnknownHostException: 61.xxx.xxx.xxx127.0.0.1]
      at org.jboss.naming.interceptors.ExceptionInterceptor.invoke(ExceptionInterceptor.java:50)
      at org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:45)
      at org.jboss.proxy.ClientMethodInterceptor.invoke(ClientMethodInterceptor.java:55)
      at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:85)
      at $Proxy0.lookup(Unknown Source)
      at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:499)
      at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:478)
      at javax.naming.InitialContext.lookup(InitialContext.java:347)


      Best Regards,

      Brian