2 Replies Latest reply on Apr 21, 2005 11:46 PM by rosonsandy

    JNDI problem with initial context instantiation

    poesraven7 Newbie

      Hi I can't get JBOSS 4.0 to read the JNDI.properties file
      when I attempt to instantiate a new context I get an exception that I the class "org.jnp.interfaces.NamingContextFactory" can't be instantiated. Does anyone know how to fix this problem?

      -John

      try
      {
      Hashtable env = new Hashtable(11);
      env.put(Context.INITIAL_CONTEXT_FACTORY,
      "org.jnp.interfaces.NamingContextFactory");
      Context ctx = new InitialContext(env);
      ...
      }

      catch (NamingException e) {
      System.out.println("JNDI lookup failed : " + e);}