• 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
  • Liutauras Vilda
  • Tim Cooke
  • Jeanne Boyarsky
  • Bear Bibeault
  • Knute Snortum
  • paul wheaton
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Ron McLeod
  • Piet Souris
  • Ganesh Patekar
  • Tim Holloway
  • Carey Brown
  • salvin francis

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: 39435
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...
roses are red, violets are blue. Some poems rhyme and some are a tiny ad:
Enterprise-grade Excel API for Java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!