java.lang.ClassCastException PortableRemoteObject.narrow(PortableRemoteObje
843829Apr 8 2004 — edited Apr 12 2004Hi,
I have a problem with a JNDI -lookup() using the CORBA namig system.
After looking up: System.out.println( lookup("jndi-name") );
I get an IOR: IOR:0000000000000053524d493a...............
ok
then I print out the name and the package of this object:
Object o = lookup("jndi-name");
System.out.println("name of o : " + o.getClass().getName());
System.out.println("package of o : " + o.getClass().getPackage());
and get:
name of o : com.sun.corba.ee.impl.corba.CORBAObjectImpl
package of o : package com.sun.corba.ee.impl.corba
I expected the type of a Home-Interface, so that i could narrow the object o:
PortableRemoteObject.narrow( o , classname);
and the result is a:
java.lang.ClassCastException
at com.sun.corba.ee.impl.javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java:293)
at javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java:134)........
What's wrong