I have created my first session bean, and a client code to get the Home object. But when I am running I am getting an Exception saying:
java.lang.RuntimeException: ItenaryDelegate.getRemote caught Naming Exception.
I dont know what it is, so anyone can tell how to resolve it, it would be of great help. My client code is pasted below:
private ItenaryRemote getRemote() {
//Get ItenaryHome object from JNDI lookup
try {
if (this.itenary == null) {
ItenaryHome home = (ItenaryHome) EJBHomeFactory.getFactory().lookupRemoteHome(
"com.jbhunt.apps.driverplace.gui.scheduling.ItenaryRemote", ItenaryHome.class);
//Create Remote object from Home object and set the remote object to
//this class remote object
this.itenary = home.create();
}
}
catch (NamingException e) {
log.error("ItenaryDelegate.getRemote caught Naming Exception" + e);
throw new RuntimeException("ItenaryDelegate.getRemote caught Naming Exception",e);
}
catch (RemoteException e) {
log.error("ItenaryDelegate.getRemote caught RemoteException" + e);
throw new RuntimeException("ItenaryDelegate.getRemote caught RemoteException",e);
}
catch (CreateException e) {
log.error("ItenaryDelegate.getRemote caught CreateException" + e);
throw new RuntimeException("ItenaryDelegate.getRemote caught CreateException",e);
}
catch (Exception e) {
log.error("ItenaryDelegate.getRemote caught Exception" + e);
throw new RuntimeException("ItenaryDelegate.getRemote caught Exception",e);
}
return this.itenary;
}
Thanks,
Latha