• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Knute Snortum
  • Bear Bibeault
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Ganesh Patekar
Bartenders:
  • Frits Walraven
  • Carey Brown
  • Tim Holloway

help Kyle - can't look up local home on WSAD 5.1.1

 
Ranch Hand
Posts: 365
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi-
I've seen similar postings on this issue but can't get this to work:

scenario:

my web.xml:

<ejb-local-ref id="EJBLocalRef_1085070564434">
<ejb-ref-name>dummyEJB</ejb-ref-name>
<ejb-ref-type>Session</ejb-ref-type>
<local-home>dummy.dummyEJBLocalHome</local-home>
<local>dummy.dummyEJBLocal</local>
<ejb-link>dummyEJB.jar#dummyEJB</ejb-link>
</ejb-local-ref>

my jsp code:

dummyEJBLocalHome home = (dummyEJBLocalHome)ctx.lookup("java:comp/env/dummyEJB");

error returned is :

Exception occurred while the JNDI NamingManager was processing a javax.naming.Reference object.

console shows:

[5/20/04 9:49:45:169 PDT] 6d736bdf Helpers W NMSV0605W: A Reference object looked up from the context "java:" with the name "comp/env/dummyEJB" was sent to the JNDI Naming Manager and an exception resulted. Reference data follows:
Reference Factory Class Name: com.ibm.ws.naming.util.IndirectJndiLookupObjectFactory
Reference Factory Class Location URLs: <null>
Reference Class Name: java.lang.Object
Type: JndiLookupInfo
Content: JndiLookupInfo: jndiName="local:ejb/dummyEJB"; providerURL=""; initialContextFactory=""

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

so WSAD knows to map to the local home context but still can't find my ejb

thanks as usual
Max
 
author
Posts: 3892
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try changing the ejb-ref-name to ejb/dummyEJB and make sure that what you are looking up in the InitialContext is exactly "java:comp/env/ejb/dummyEJB" and see if it helps.

Kyle
 
Max Tomlinson
Ranch Hand
Posts: 365
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ok, I set my ejbRef to:

ejb/dummyEJB

my jndi name is the same

my lookup is:

dummyEJBLocalHome home = (dummyEJBLocalHome)ctx.lookup("java:comp/env/ejb/dummyEJB");

and the error is now:

Type: JndiLookupInfo
Content: JndiLookupInfo: jndiName="local:ejb/ejb/dummyEJB"; providerURL=""; initialContextFactory=""

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

thanks
Max
 
Kyle Brown
author
Posts: 3892
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Huh. What I told you works in WSAD 5.0 -- that's basically taken directly from the sample code from my book. Let me create a new simple example in WSAD 5.1.1 and get back to you later today.

Kyle
 
Max Tomlinson
Ranch Hand
Posts: 365
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks--
I think it might be a bug in 5.1.1 as I don't recall having htis problem in 5.0.x.
Max
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!