Title: InterestServlet example questions

Hi,

I've finally, finally got this servlet example to work, sort of.

If I change this line:

         Object ref  = jndiContext.lookup("java:comp/env/ejb/Interest");

to

         Object ref  = jndiContext.lookup("interest/Interest");

it works. If I run the original line I get:

javax.servlet.ServletException: Failed to lookup java:comp/env/ejb/Interest
        at org.jboss.docs.interest.InterestServlet.init(InterestServlet.java:46)
        at javax.servlet.GenericServlet.init(GenericServlet.java:258)
.
.
.

Root cause:
javax.naming.NameNotFoundException: env not bound
        at org.jnp.server.NamingServer.getBinding(NamingServer.java:473)
        at org.jnp.server.NamingServer.getBinding(NamingServer.java:481)

.
.
.

Is this a bug in the servlet since it doesn't match up to the entry in jboss.xml?

Thanks,

Martin

Reply via email to