cancel
Showing results for 
Search instead for 
Did you mean: 

NameNotFoundException

Former Member
0 Kudos

Hi

I am using a Java Bean Model as a model in WD application and this model accesses EJB ...It works fine like my model is imported and it is called also but when i look up for my EJB it throws an exception :NameNotFoundException"

I am using this code:

home = (DepartmentLocalHome)ctx.lookup("DepartmentBean");

When i check the Jndi name for my bean in VA in EJB container -->my EAR project it gives me Jndi name as "DepartmentBean"

Please help why i am getting this error

Monika

Edited by: Monika Jain on Feb 5, 2008 11:30 AM

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Monika,

Try performing the lookup using "java:comp/env/DepartmentBean" .

Regards,

Shabeer.

Former Member
0 Kudos

Hi Shabeer

Thanks for the reply....but still getting the same exception...

Monika

Former Member
0 Kudos

Hi,

Give a try using

ctx.lookup("localejbs/DepartmentBean")

This article may be of use for you

https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/1f5f3366-0401-0010-d6b0-e85a49e9...

Specifying Arbitrary JNDI Names for Your Beans

http://help.sap.com/saphelp_nw04/helpdata/en/86/2ccbdefb8f5843958a11062e19fc1d/content.htm

Regards

Ayyapparaj

Former Member
0 Kudos

Hi

It is still giving the same exception....

Thanks

Former Member
0 Kudos

Hi All

Now i am getting ClassCastExcetion

i used this line of code

home = (DepartmentLocalHome)ctx.lookup("sap.com/WD_EJB_EAR1/DepartmentBean");

Former Member
0 Kudos

Hi

Can anybody help...still getting the same exception

Thanks

Monika

Edited by: Monika Jain on Feb 6, 2008 7:36 AM