Java Forums

Main Menu
Home
Today's Posts
FAQ
Search
Contact Us

Java Network
Java Tips
Java Tips Blog

Sponsored Links





Welcome to the Java Forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community, you will:

  • have access to post topics
  • communicate privately with other members (PM)
  • not see advertisements between posts
  • have the possibility to earn one of our surprises if you are an active member
  • access many other special features that will be introduced later.

Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 06-29-2007, 03:06 AM
Member
 
Join Date: Jun 2007
Posts: 92
Daniel is on a distinguished road
javax.naming.NameNotFoundException: ejb/RatingEJB
Hi, Iam using the following code to access the ejb from my jsp.
And iam getting an error. My environment is wsad5.1 + jsp + j2ee 1.3.
My jsp code is:
Code:
Hashtable env = new Hashtable(); env.put(Context.INITIAL_CONTEXT_FACTORY, "com.ibm.websphere.naming.WsInitialContextFactory"); env.put(Context.PROVIDER_URL, "iiop://localhost:9081"); Context context = new InitialContext(env); home = context.lookup("ejb/Hello");
where ejb/Hello is the ejb name in ejb-jar.xml file
Code:
[Servlet Error]-[ejb/RatingEJB]: javax.naming.NameNotFoundException: ejb/RatingEJB. Root exception is org.omg.CosNaming.NamingContextPackage.NotFound at com.ibm.ws.naming.ipcos.WsnOptimizedNamingImpl.do_resolve_complete_info(WsnOptimizedNamingImpl.java:964)
thanks.

Daniel

Last edited by Daniel : 06-29-2007 at 03:08 AM.
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 06-29-2007, 03:09 AM
Senior Member
 
Join Date: Jun 2007
Posts: 111
Eric is on a distinguished road
It sounds like your JNDI may not be set up correctly. I'm totally unfamiliar with WSAD but if there is a way to first verify that your JNDI environment is correct first I'd start there.
Greetings.

Eric
Bookmark Post in Technorati
Reply With Quote
  #3 (permalink)  
Old 06-29-2007, 03:12 AM
Member
 
Join Date: Jun 2007
Posts: 92
Daniel is on a distinguished road
Hi, Thanks for your reply.my problem is solved.

The problem was with the jndi name.

Thanks.

Daniel
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
javax.microedition.io/ javax.bluetooth ahtiven New To Java 0 01-20-2008 02:38 PM
Naming a Class Java Tip Java Tips 0 12-22-2007 12:21 PM
RMI naming problem Robbinz New To Java 1 12-07-2007 12:32 AM
Naming conventions Java Tip Java Tips 0 12-03-2007 10:53 AM
error in JNDI naming jitendra.ibs Java Servlet 0 06-08-2007 06:23 PM


All times are GMT +3. The time now is 10:16 AM.


VBulletin, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2006 - 2007, www.java-forums.org