Skip to Content
author's profile photo Former Member
Former Member

Naming Problems with EJB when accessing from WebApplication

Hi all,

I'm trying to deploy an application consisting of several stateless session beans, one message driven bean and a web application. Everything works fine, until I try to log in (webapp). Then I get the following error: Path to object does not exist at ik, the whole lookup name is ik/sec/IKAuthenticationEJB.

So the lookup name ik/sec/IKAuthenticationEJB is used in the code, whereas the JNDI Name of the requested bean is (As showed in the Admin Tool). I'm wondering why there is this "" as I choosed a different name for the provider (But the error remains even if I change it to "").

As I cannot find any information about the "NameNotFoundException" I just tried the following:

- add a "ejb-ref" section to web.xml







- add a web-j2ee-engine.xml to the Web Application:






Does anybody know what to do? Did I declare the references in a wrong way?

Is there a complete API Javadoc available? I just found the very small one on SDN...

Thanks a lot,


Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Best Answer
    Posted on Jan 08, 2005 at 07:10 PM

    Hi Nadine,

    in order to lookup ab EJB from a web component you have to declare an ejb reference (ejb-ref section) in the web.xml. The jndi name in the web-j2ee-engine.xml can be omitted if you are sure that the information provided by the "ejb-ref" section is sufficient to identify the EJB component.

    From the example you wrote I see that the ejb-link element is not correct. According to the EJB 2.0 FR specification (Appendix B, page 518) "ejb-link element must be the ejb-name of an enterprise bean". Probably this inconsistent information misleads the EJB Container in resolving the right reference.

    My advice is simply to omit this and leave the "home" and "remote" elements. They should be enough.

    A hint: you can use the "lsn" shell command from the "naming" group to observe the JNDI tree on a particular server node.

    I hope this will help you.

    Best regards,


    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.