javax.naming.NoInitialContextException:
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Rajat_Roy
Posted On:   Friday, December 8, 2006 02:01 AM

i am trying to run a Simple client program for Ejb and getting the following error javax.naming.NoInitialContextException: Need to specify class name in environmen t or system property, or as an applet parameter, or in an application resource f ile: java.naming.factory.initial at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:6 40) at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:243 ) at javax.naming.InitialContext.getURLOrDefaultInitCtx(InitialContext.jav a:280) at javax.naming.InitialContext.lookup(InitialContext.java:347) at AdviceClient.go(AdviceClient.java:17) at AdviceClient.main(AdviceClien   More>>

i am trying to run a Simple client program for Ejb and getting the following error



javax.naming.NoInitialContextException: Need to specify class name in environmen
t or system property, or as an applet parameter, or in an application resource f
ile: java.naming.factory.initial
at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:6
40)
at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:243
)
at javax.naming.InitialContext.getURLOrDefaultInitCtx(InitialContext.jav
a:280)
at javax.naming.InitialContext.lookup(InitialContext.java:347)
at AdviceClient.go(AdviceClient.java:17)
at AdviceClient.main(AdviceClient.java:11)





i have included the jar file in the classpath

D:projectadvice>java -classpath %classpath%.AdviceAppClient.jar AdviceClient





i am using j2sdk 1.4.0 and j2ee 1.3.1 server    <<Less

Re: javax.naming.NoInitialContextException:

Posted By:   Anonymous  
Posted On:   Thursday, February 22, 2007 03:23 AM

Include this appserv-rt.jar in your Classpath and then execute the code. You should be able to find this jar file in your appserver's lib directory.

Thanks,
Srini
About | Sitemap | Contact