• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

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

 
Ranch Hand
Posts: 365
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Onion rings are vegetable donuts. Taste this tiny ad:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
reply
    Bookmark Topic Watch Topic
  • New Topic