1 Reply Latest reply on Dec 21, 2005 12:00 PM by Scott Stark

    Problems with JNP: Class not Found Exception

    Martin Guth Newbie

      Hi,

      I'm using JBoss 4.0.3SP1 with ObjectWeb Lomboz Eclipse 3.1 .

      props.put(InitialContext.INITIAL_CONTEXT_FACTORY,
       "org.jnp.interfaces.NamingContextFactory");
       props.put(InitialContext.PROVIDER_URL,
       "jnp://127.0.0.1:1099");


      This code excerpt leads to the following exception:

      javax.naming.NoInitialContextException: Cannot instantiate class: org.jnp.interfaces.NamingContextFactory [Root exception is java.lang.ClassNotFoundException: org.jnp.interfaces.NamingContextFactory]
      at javax.naming.spi.NamingManager.getInitialContext(Unknown Source)
      at javax.naming.InitialContext.getDefaultInitCtx(Unknown Source)
      at javax.naming.InitialContext.init(Unknown Source)
      at javax.naming.InitialContext.(Unknown Source)
      at statelessBeanClient.SessionBeantestKlasse.getContext(SessionBeantestKlasse.java:28)
      ....



      I've already searched for a solution in the forums. The solution provided was to include te files jnp-client.jar, jboss-client.jar and jboss-j2ee.jar into the classpath. However, after having done this, the exception continues to occur.

      Thanks in advance for your advice

      Martin Guth