1 Reply Latest reply on Apr 27, 2006 10:45 PM by jaikiran pai

    Error javax.naming.NoInitialContextException

    Praveen Kumar Newbie

      Hi All,

      I am new to EJB and JBoss. I have created stateless Session EJB's (using Jdevloper) and the JBoss has deployed them successfully...but when i run my application from JBoss....I receive the following error...

      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

      javax.naming.Context javax.naming.spi.NamingManager.getInitialContext(java.util.Hashtable)

      NamingManager.java:643

      javax.naming.Context javax.naming.InitialContext.getDefaultInitCtx()

      InitialContext.java:246

      javax.naming.Context javax.naming.InitialContext.getURLOrDefaultInitCtx(java.lang.String)

      InitialContext.java:283

      java.lang.Object javax.naming.InitialContext.lookup(java.lang.String)

      InitialContext.java:350

      void mypackage1.WelcomeScreen1_applet.main(java.lang.String[])

      WelcomeScreen1_applet.java:248

      The Java File where it shows the error contains these lines....
      Context ctx = new InitialContext(env);
      ErpFacadeHome = (erpFacadeHome)ctx.lookup("erpFacade");


      Can any one please help me to solve this problem..

      Thanks to all.