Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

NoInitialContextException when i execute my Simple EJB Client

843830Jun 11 2008 — edited Jun 12 2008
Hi,
I am trying to execute... a ConverterApp which comes with J2EE V1.2.1 Dev Guide.

I am getting NoInitialContextException when i execute my client program...

My Client code is as follows...



Context initial = new InitialContext();
Object objref = initial .lookup("ejb/ConverterEJB");

When i execute this code i got the below exceltion at second line....


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
45)
at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:247
)
at javax.naming.InitialContext.getURLOrDefaultInitCtx(InitialContext.jav
a:284)
at javax.naming.InitialContext.lookup(InitialContext.java:351)
at ConverterClient.main(ConverterClient.java:21)

Few more Details which may help you figure out issue...

App Server : Sun 8.1
Java : Java EE SDK 1.4.3

Edited by: mchepuri on Jun 11, 2008 3:12 PM
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 10 2008
Added on Jun 11 2008
1 comment
123 views