[jboss-user] [JNDI and Naming] New message: "Re: Name lookup fails, reason unknown"

Peter Johnson do-not-reply at jboss.com
Mon Jan 25 13:02:46 EST 2010

User development,

A new message was posted in the thread "Name lookup fails, reason unknown":


Author  : Peter Johnson
Profile : http://community.jboss.org/people/peterj

If your lookup code is returning a javax.naming.Reference, then you JNDI name is not complete. For example, if the full JNDI name is aaa/bbb/ccc and you look up aaa/bbb, then you will get a Reference. One thing you could do is use the methods on Reference to examine the names within that namespace, that might help suggest a solution.
Did you double-check the JNDIView in 5.1.0 to ascertain the full name of the deployed EJB? How does that name compare to the value of "jndiName" in your example code. (By the way, providing a code example that contains a variable instead of a literal is fairly useless when it comes to debugging problems. Without knowing the value of jndiName, all I can do is make guesses as to what the name is and thus what the problem might be.)
A JNDI name lookup for an EJB always returns a proxy (not entirely true, I think that when accessing the a local EJB you get the actual object). With EJB3, the proxy implements the remote and/or local interface so casting the proxy to the interface is not a problem.


To reply to this message visit the message page: http://community.jboss.org/message/522134#522134

More information about the jboss-user mailing list