1 2 Previous Next 19 Replies Latest reply: Mar 25, 2008 2:18 PM by 807581 RSS

    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

    807581
      Hi!
      I got this error message at runtime.
      After adding value to the Intialcontext by adding the following code snippet:

      Properties p = new Properties();
      p.put("java.naming.factory.initial",
      "com.sun.jndi.cosnaming.CNCtxFactory");
      p.put("java.naming.provider.url",
      "iiop://127.0.0.1:9010");
      initContext = new javax.naming.InitialContext(p);

      After this i am getting different error message:
      org.omg.CORBA.COMM_FAILURE:
      minor code: 1 completed: Maybe at om.sun.corba.se.internal.iiop.IIOPConnection.purge_calls(Unknown Source)
      at com.sun.corba.se.internal.iiop.ReaderThread.run(Unknown Source)

      Looking forward a proper solution
      for this problem.

      Thanks in advance.
      Regards,
      James Arun
        1 2 Previous Next