7 Replies Latest reply on Apr 18, 2002 6:25 PM by Enrique Rodriguez

    InitilaContext instantiation error

    Javier Arrieta Newbie

      Hi,

      Whenever I try to create an initialcontext my jboss/tomcat distro (2.4.4) throws the following exception.

      javax.naming.NoInitialContextException: Cannot instantiate class: org.jnp.interfaces.NamingContextFactory. Root exception is
      java.lang.ClassCastException: org.jnp.interfaces.NamingContextFactory
      at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:659)

      I tried specifying the properties explicitly also
      Properties h = new Properties();
      h.put(Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory");
      h.put(Context.PROVIDER_URL, "localhost:1099");
      h.put(Context.URL_PKG_PREFIXES, "org.jboss.naming:org.jnp.interfaces");

      with no result

      Any guess appreciated. Thanx in advance

      Javier Arrieta