<strong>ClassCastException while lookup() using weblogic 6</strong>
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   ashish_suvarna
Posted On:   Thursday, February 21, 2002 03:52 AM

public void lookup(){ try{ InitialContext ic = new InitialContext(); Object objRef = ic.lookup("masterBeanJNDI"); mh = (trialweblogic.masterHome)PortableRemoteObject.narrow(objRef,trialweblogic.masterHome.class); } catch(Exception ex){ System.out.println("inside lookupError xx "+ex); } } Error displayed : inside lookupError xx java.lang.ClassCastException: Cannot narrow remote object to trialweblogic.masterHome    More>>
public void lookup(){

try{

InitialContext ic = new InitialContext();

Object objRef = ic.lookup("masterBeanJNDI");

mh = (trialweblogic.masterHome)PortableRemoteObject.narrow(objRef,trialweblogic.masterHome.class);

}
catch(Exception ex){

System.out.println("inside lookupError xx "+ex);

}

}





Error displayed :

inside lookupError xx java.lang.ClassCastException: Cannot narrow remote object to trialweblogic.masterHome
   <<Less
About | Sitemap | Contact