Skip to Content
0
Former Member
May 27, 2004 at 05:11 PM

JNDI lookup - wrong type found

15 Views

Hello,

I've got some problem while looking up my EJB HomeInterface from whithin a simple WebApp:

<i>

ctx = new InitialContext();

IMyHomeInterface home = (IMyHomeInterface)ctx.lookup("IMyHomeInterfaceRemoteJNDI");

</i>

This results in a ClassCastException.

The location is valid: I've deployed an .ear before, which contains an EJB-Home-Interface bound to "IMyHomeInterfaceRemoteJNDI".

Trying a LOOKUP in the admin console shows that the actual object at this JNDI location is of type "com.sap.engine.interfaces.cross.ObjectReferenceImpl"- what is this ? How do I get "my" interface from that ?

"PortableRemoteObject.narrow(...)" doesn't help here..

There was a post on this topic before, but I still don't get it 😔

Perhaps it has something to do with my webapp and ejb-references- i don't use Dynpro, just plain JSP right now

Thanks in advance for your help.

Florian