I am trying to use entity beans within Session bean (2.0). Following are the steps followed
1.From the servlet i have made the jndilookup to session bean. 2.I am successfully able to make the session bean lookup 3.I have put some logs on the session bean method, that is getting printed after that i make a similar jndi lookup what i had made in the servlet, but this time it is for the Entity bean.
I am keeping getting error saying javax.naming.NameNotFoundException: Context: widCell/nodes/widNode/servers/server1, name: com/Life_BeanLocalHome: First component in name com/Life_BeanLocalHome not found. Root exception is org.omg.CosNaming.NamingContextPackage.NotFound: IDL mg.org/CosNaming/NamingContext/NotFound:1.0
I have cross checked the jndi name against the ejb jar.xml those are correct and also i have given ejb references in the web.xml.
I would like to know how to solve the JNDI lookup Error, which works fine for the session bean but for Entity bean it is giving the above error, both are in same jar.
I could discover the problem, When ever we create entity bean in wsad, we should map the datasource for that entity bean in ejb-jar.xml. Unless this is done JNDI lookup of the enity bean will not be successful.
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop