File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes EJB and other Java EE Technologies and the fly likes JNDI in version 1.4 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "JNDI in version 1.4" Watch "JNDI in version 1.4" New topic

JNDI in version 1.4

Arthur Griffith

Joined: Jan 06, 2005
Posts: 6
In J2EE version 1.4 I use the deploytool to deploy the EJB into the reference implementation of the server, but I can't use the lookup() method of the InitialContext to find the JNDI name. It always throws a NoInitialContextException. I feel like I'm missing something obvious, but I can't figure it out.

I can set the JNDI name in the sun-specific area of the deploytool, and it comes back with that name in the produced xml, but I can't look up the name from inside my program. I get exactly the same result from both Windows XP and Linux installations of J2E.E version 1.4.

I'm stuck and I don't know what to try to do.
Chris Johnston
Ranch Hand

Joined: Dec 13, 2004
Posts: 85
Without a stack trace or a little code it is hard to tell what is going on. However, my first instinct is that you are running in problems a step before trying to find the jndi source. How are you handling the task of obtaining an initial context?
Arthur Griffith

Joined: Jan 06, 2005
Posts: 6
I managed to locate and download version 1.3 of J2EE and the same code worked the first time. As far as I can see there are only two possibilities--either there is an extra step that isn't documented, or there is a bug in version 1.4. I am going to continue with version 1.3 until 1.4 is released and I will try it again.

I will make another post here when 1.4 is released, and I will describe in detail whether or not it works.

Thanks for your time.
I agree. Here's the link:
subject: JNDI in version 1.4