I am attempting to run a servlet with the following init function:
public void init() throws ServletException
// Get a naming context
InitialContext jndiContext = new InitialContext();
// Get a reference to the Dean Bean
Object ref = jndiContext.lookup("java:comp/env/ejb/Dean");
// Get a reference from this to the Bean's Home interface
deanHome = (DeanHome) PortableRemoteObject.narrow(ref, DeanHome.class);
throw new ServletException("Failed to lookup java:comp/env/ejb/Dean", e);
Unfortunately the exception is being thrown. I am new to this and would like to know if there are any (obvious) errors with this code...
Did you remember to add the <ejb-ref> for the private lookup you're using (ejb/Dean) ?