The initial context is obtained from something like:
Properties h = new Properties();
h.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.cosnaming.CNCtxFactory");
h.put(Context.PROVIDER_URL, "iiop://localhost:7001");
return new InitialContext(h);
Where as the narrow is done via:
private static Object narrow (Object ref, Class c) {
return PortableRemoteObject.narrow(ref, c);
}
The exception is thrown with:
java.lang.ClassCastException
at com.sun.corba.se.internal.javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java:296)
at javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java:137)
at com.realm.portal.data.security.rbac.ejb.common.EjbFinder.narrow(EjbFinder.java:180)
..
The object returned from WL is narrowed to the class c, where c is loaded by Tomcat
from the web application's classes directory. (ie. webapps/app/WEB-INF/classes)
Any idea of how I can get this RMI/IIOP lookup to work ? (I don't want to use
the t3 protocol so I can dynamically download stubs from WL.)
Thanks,
Hanson
It's fixed now.
Thanks,
Hanson