• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

NamingException during lookup

 
Ranch Hand
Posts: 10198
3
Mac PPC Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Guys,

I have a scenario where in I"m doing a lookup for a Stateless session bean. This Stateless session bean extends an abstract class and in the abstract class i"m doing some DI on some resources using the @Resource annotation. Now what happens is, when I deploy this to my Weblogic, it goes off fine and when I try to access this SSB, I run into a NamingException. The JNDI path for the resource that I"m injecting in my abstract class is something like x.y.z.myAbstractClass#myAbstractClass and the JNDI name of the SSB is something like x.y.u.mySSB#mySSB. When I look at the stact trace, it says that unable to resolve x.y.u.mySSB#mySSB, resolved till x.y.

After having a look at this I started to think that this might be because of the DI which might have failed in the abstract class. But there is no way for me to check this. I tried seeing the JNDI tree but everytime I try to view it my system crashed and I really did not want to waste time on that. So ranchers is my guess correct? because I remember form the specs that if the DI fails then the bean instance is discarded. But does DI happens during deployment or during run time?
 
Joe San
Ranch Hand
Posts: 10198
3
Mac PPC Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Any thoughts on this guys?
 
Ranch Hand
Posts: 226
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Jothi,

Good to see you again - I remember you from the SCWCD forum - did you ever take it and pass?

I'm very new to EJB, so here's my stab.

Could you do something like below from your client:

Then, iterate over the NamingEnumeration to list out everything it can see.

From that, you could tell if you bean was bound to JNDI correctly, and whether the name you were using was correct.

Just an idea...

MG
 
reply
    Bookmark Topic Watch Topic
  • New Topic