2 Replies Latest reply on Jul 10, 2002 12:48 AM by jack wu

    NoInitialContextException, jndi look up from separate VM

    jack wu Newbie

      i have jboss-tomcat 2.4.4 running in one VM and started a separate VM to run a client program. i then received the

      "javax.naming.NoInitialContextException: Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file: java.naming.factory.initial
      at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:643)"

      when the following lines are called:
      InitialContext ic = new InitialContext();
      Object result = ic.lookup("Idgenerator");

      going to http://localhost:8082/, i can see the global jndi name as follows:


      when start up the client program i had the necessary jar files such as: jndi.jar, jnp-client.jar, etc. on classpath. and i used

      java -Djava.naming.provider.url=localhost:1099

      so i suppose the system property was passed to the VM.

      what else could go wrong?