posted 18 years ago
Hi all
Im doing a look up for my home interface of the bean in my service locator in the following manner
InitialContext ic = new InitialContext(ht);
Object o = ic.lookUp("mybean");
MYHome home = (MYHome)PortableRemoteObject.narrow(obj,obj.getClass());//instead of using the class name of MYHome im using the getClass method
The problem is this code is working for me fine when im running it on weblogic server sp4 but the same gives an ClassCastException: Cannot narrow remote object to java.lang.class when run on weblogic sp3
im sure that the problem is not with the version
is it a wrong idea to use obj.getClass() to get the class object of the Homeobject instead of using MYHome.class
pls guide me, im really in a soup