0 Replies Latest reply on Oct 21, 2004 7:34 AM by Gaurav Srivastava

    Unable to instantiate org.jnp.interfaces.NamingContextFactor

    Gaurav Srivastava Newbie

      Hi ,

      Below is the peace of section of client side code

      import java.util.Properties;
      import javax.naming.Context;
      import javax.naming.InitialContext;
      import javax.naming.*;

      Properties prop = new Properties();
      Context ctx = new InitialContext(prop);
      Object objref = ctx.lookup("First");
      FirstHome home = (FirstHome)javax.rmi.PortableRemoteObject.narrow(objref,FirstHome.class);
      First firstejb = home.create();
      System.out.println("Current Time: "+firstejb.getTime());

      I am unable to instantiate the class mention in bold letters and hence geeting the following error. "Cannot instantiate class: org.jnp.interfaces.NamingContextFactory class"
      I have included all the class files in client folder of jboss directory.

      Can anyone please look into possible reason of the error and suggest solution.