Win a copy of 97 Things Every Java Programmer Should Know this week in the Java in General forum!
  • 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 ...
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
  • Piet Souris
  • salvin francis
  • fred rosenberger

Installing old EJB App

Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ok, I need some old timers here.
Win NT
Websphere 3.5
DB2 7.2

I've been tasked with installing an old JSP/EJB app on 10 yr old technology for demo purposes, and I have things mostly working. One thing that is tripping me up is we seem to get random NamingExceptions.

I'm perplexed, because it seems like another underlying error is causing these, but stack traces only reveal that there was a NamingException.

The code that generates these exceptions looks something like this:

The same type of code runs everywhere and seems to be successful...
My question is how can I get at the root cause of these errors
or what common problems can cause NamingExceptions that I am not thinking of?

author & internet detective
Posts: 39997
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to JavaRanch!

Wow. WebSphere 3.5 and remote EJBs. I worked with WebSphere 3.5 for a couple months right out of college.

First thing I would check: does "HomeName" exist in the JNDI? You can check n the admin console. Also what does HomeName contain? In particular is it something like "LocationEntityHome" or "ejb/LocationEntityHome" or ....

Also, you say the same type of code runs elsewhere. Is that in the same ear? same ejb jar? same bean?

I'm hoping some of these questions lead us towards an answers.
Jim Marnangle
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, the name is correct in JNDI. It is actually using a constant defined in another class, which is indeed correct.
There are 29 beans in total deployed to the app server, and all of the code to find them looks like the code I posted with the exception of changing names and such to lookup the object needed.

The actual exception I get is:

I fear, however, that there is another root cause that this error is hiding.
We are talking to a db2 database which is occasionally flaky. We've had error before where the database failed to service a request for one reason or another, yet the only error we get on the Java side are the NamingException errors.
So I believe that the problem does not lie in JNDI, but somewhere deeper.
What I'm looking for is a method to somehow get at the root cause of this.
I'm also spoiled by modern visual debuggers, so I'm not sure even what debugger I can use to try to attach to this process.
Thanks for listening...
Everyone is a villain in someone else's story. Especially this devious tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
    Bookmark Topic Watch Topic
  • New Topic