• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

Unable to Find EJB in JNDI

 
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Good Morning to All!

I have been scratching my head all day yesterday trying to understand this error:

[2005-06-15 09:44:38,203][Servlet.Engine.Transports : 1][FATAL][{ServiceLocator}{getHome}{CONFIG0001}{Failed to find EJB Reference from JNDI tree}{External Message:Name comp/env/ejb not found in context "java:".}]
{ServiceLocator}{getHome}{CONFIG0001}{Failed to find EJB Reference from JNDI tree}{External Message:Name comp/env/ejb not found in context "java:".}



What is going on is the user is logging into the web application. The process is the user comes in from the web container and enters the EJB container through the AdminEJB. The AdminEJB has a reference to a singleton POJO entitled ServiceLocator. This POJO follows the locator pattern. One of the things the Locator is attempting to accomplish is retrieving the CacheEJBLocalHome. This Cache ejb has a JNDI name of

ejb/CacheEJBHome

I have promoted the Cache ejb to the Local and the Remote interfaces using WSAD.

I realize the lookup method can not find the EJB, but I do not know what is causing this behavior. I originally thought the AdminEJB needed a bean reference to the CacheEJB, but this did not work.

Any insight or debugging techniques into this issue would be greatly appreciated.

Thank you for reading my post.

Russ
 
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Check whether EJB is properly deployed or not. This kind of error is encountered only when EJB is not deployed correctly.

Regards,
Milind
 
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
comp/env/ejb is private environment for AdminEJB...the actual JNDI location should be java:/ejb/CacheHomeEJB
 
Ranch Hand
Posts: 1683
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The recommended ejb context of the bean�s environment is java:comp/env/ejb. So, you would expect the home interface to be found by looking up the JNDI tree for "java:comp/env/ejb/CacheHomeEJB".

The recommended subcontexts of the bean's environment for other resource manager connection factory references are:
java:comp/env/service (web service)
java:comp/env/jdbc (JDBC)
java:comp/env/jms (JMS)
java:comp/env/mail (JavaMail)
java:comp/env/url (URL)
 
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
HI,
I am getting a similar error. I have added an BMP entity bean to an existing application. When i try to look up the bean i am getting the following error

javax.naming.NameNotFoundException: Name "ejb/DMT/NpSpeedMaintHome" not found in context "local:".
Should i set the context somewhere so that this bean is in the local context ??

Thank You
 
30 seconds to difuse a loaf of bread ... here, use this tiny ad:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic