3 Replies Latest reply on Dec 8, 2004 3:45 AM by biele

    Configuring JNDI over HTTP

    lorenet

      Hello! I'm trying to modify an application to run back a firewall using only HTTP.
      I've changed these JNDI properties in the client application:

      java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
      java.naming.provider.url=jnp://$(host):1099
      java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces


      to these:

      java.naming.factory.initial=org.jboss.naming.HttpNamingContextFactory
      java.naming.provider.url=http://$(host):8080/invoker/JNDIFactory
      java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces


      but I'm getting this Exception:

      javax.naming.NamingException: Failed to retrieve Naming interface [Root exception is java.lang.ClassNotFoundException: org.jboss.naming.interceptors.ExceptionInterceptor]
      at org.jboss.naming.HttpNamingContextFactory.getInitialContext(HttpNamingContextFactory.java:68)
      at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:662)
      at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:243)
      at javax.naming.InitialContext.init(InitialContext.java:219)
      at javax.naming.InitialContext.(InitialContext.java:175)


      What should I do? I have to change somethimg in jboss configuration? I've read jboss documentation and it seems to me that everything is just setted..

      I'm using jboss3.2.3 and j2sdk1.4.2_3

      Thanks a lot for any help!
      Lore

        • 1. Re: Configuring JNDI over HTTP
          starksm64

          you missing the jbossall-client.jar from your classpath.

          • 2. Re: Configuring JNDI over HTTP
            lorenet

            Thank's a lot for your post!
            I was including jbossall-client.jar in my classpath but you made me think that wasn't the jboss3.2.3 version but the older jboss3.2.1, the one used when the application was developed.
            Regards,
            Lorenzo Dalmonte

            • 3. Re: Configuring JNDI over HTTP
              biele

              just in case someone experiences the same problem I had:
              On one machine the root exception was not a ClassNotFoundException but the output was the following:

              "javax.naming.NamingException: Failed to retrieve Naming interface. Root exception is java.io.IOException: Server returned HTTP response code: 401 for URL:"...

              On another machine the exception was "ClassNotFound".
              As described above the problem was a wrong version of the jbossallclient.jar and replacing it with a new one solved the problem in both cases.