on 08-19-2005 3:11 PM
Hi,
I went through the tutorial "Using EJBS in WebDynpro Applications" step-by-step.
If I run the application I always get the following error message:
java.lang.ClassCastException:com.sap.engine.interfaces.cross.ObjectReferenceImpl
if I try to make a lookup to the SessionBean.
I use the following code:
-
InitialContext ctx = new InitialContext();
facadeHome = (FacadeHome) ctx.lookup("FacadeBean"); <- the error is related to this line
facade = facadeHome.create();
-
I have nothing more to provide to be more specifiv.
What did I forget to specify or to define?
Thanks for any help.
Hi holger,
try to do it like this
InitialContext ctx = new InitialContext();
Object obj = ctx.lookup("FacadeBean");//where FacadeBean is your jndi name
facadeHome = (FacadeHome)PortableRemoteObject.narrow (obj,FacadeHome.class);
facade = facadeHome.create();
hope this helps,
regards,
rahul.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Are you sure that FacadeBean is the JNDI name of a bean which has FacadeHome.
and is facadehome variable of type FacadeHome.
ClassCast Exception occurs when you try to typecast a class to a different incomaptible class.
Regards
Bharathwaj
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Check this if this link helps you
http://help.sap.com/saphelp_nw04/helpdata/en/be/2e2c4142aef623e10000000a155106/content.htm
Regards,
Vijith
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
80 | |
9 | |
9 | |
7 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.