Win a copy of The Way of the Web Tester: A Beginner's Guide to Automating Tests this week in the Testing forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

NameNotFoundException and jndi

JP Estrada
Ranch Hand
Posts: 48
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi guys,

I'm having this error when trying to access a session bean:

[5/19/07 16:50:34:860 CST] 30379f6f Helpers W NMSV0605W: A Reference object looked up from the context "java:" with the name "comp/env/ejb/MyTest" was sent to the JNDI Naming Manager and an exception resulted. Reference data follows:
Reference Factory Class Name:
Reference Factory Class Location URLs: <null>
Reference Class Name: java.lang.Object
Type: JndiLookupInfo
Content: JndiLookupInfo: jndiName="local:ejb/ejb/ejbs/MyTestHome"; providerURL=""; initialContextFactory=""

Exception data follows:
javax.naming.NameNotFoundException: Name ejb not found in context "local:".

what could be causing this??

Here's the entry in my ejb-jar.xml:

<ejb-jar id="ejb-jar_ID">
<session id="MyTest">

Here's from my web.xml:

<ejb-local-ref id="EJBLocalRef_1179562165290">

Here's how i access the ejb from my code:

InitialContext context = new InitialContext();
obj = context.lookup("java:comp/env/ejb/MyTest");
MyTestLocal bean = ((MyTestLocalHome)obj).create();

Please help... thanks in advance!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic