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(Unknown Source) at javax.naming.InitialContext.getDefaultInitCtx(Unknown Source) at javax.naming.InitialContext.getURLOrDefaultInitCtx(Unknown Source) at javax.naming.InitialContext.lookup(Unknown Source) at hai.HelloClient.main(HelloClient.java:14)

so pls suggest me a solution for this problem as this is my first ejb program Thanks in advance Regards Pradeep

I assume that you are running to run your code as stand-alone clients of that EJB.

Looking at the exceptions, I'm not convinced that the JNDI name is the problem: it seems to me that JNDI doesn't know what initial context factory to use. Check out this GlassFish FAQ for more details.

Cheers, Oliver

alex Rozario

Greenhorn

Posts: 4

posted 10 years ago

hi juan & pradeep,

me too have an same error. just now i posted that.

hi mr.joe i have tried your suggestion but still it shows me the same error can you help me further thank you

Dave Michels

Greenhorn

Posts: 5

posted 10 years ago

Pradeep,

It apprears that your client doesn't have the correct IntialContextFactory configured for the JNDI environment based on the exception stack trace. See the following Glassfish Naming Factory Env