0 Replies Latest reply on Jul 20, 2004 5:13 PM by Vijay G

    JNDI over Http

    Vijay G Newbie

      I am getting a NullPointerException when trying to execute the following piece of code.


      System.setProperty("java.naming.factory.initial","org.jboss.naming.HttpNamingContextFactory");
      System.setProperty("java.naming.provider.url","http://localhost/invoker/JNDIFactory/");
      System.setProperty("java.naming.factory.url.pkgs","org.jboss.naming:org.jnp.interfaces");
      InitialContext iniCtx = new InitialContext();

      javax.naming.NamingException: Failed to retrieve Naming interface. Root exception is java.lang.NullPointerException
      at org.jboss.invocation.http.interfaces.Util.configureHttpsHostVerifier(Util.java:145)
      at org.jboss.naming.HttpNamingContextFactory.getNamingServer(HttpNamingContextFactory.java:111)
      at org.jboss.naming.HttpNamingContextFactory.getInitialContext(HttpNamingContextFactory.java:65)
      at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:660)
      at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:241)
      at javax.naming.InitialContext.init(InitialContext.java:217)
      at javax.naming.InitialContext.(InitialContext.java:173)
      at com.vfa.assetfusion.MessageClient.main(MessageClient.java:54)