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!

EJB client (InitialContext Properties)

843830Jan 11 2007 — edited Jan 11 2007
hi all
I've simple question on EJB (i'm newbie in EJB)

i wrote some entity and session beans and deployed them on remote computer
server - Sun Application Server.

Question :

I need InitialContext Properties For Client to connect the server.
InitialContext ctx = new InitialContext();
            UserManager bean = (UserManager) ctx
                    .lookup("UserManagerBean/remote");
This does not working. It throws an Exception like this :
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(NamingManager.java:645)
        at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:247)
        at javax.naming.InitialContext.getURLOrDefaultInitCtx(InitialContext.java:284)
        at javax.naming.InitialContext.lookup(InitialContext.java:351)
can anybody help me ?

thx :)
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 8 2007
Added on Jan 11 2007
3 comments
171 views