Thank you, Dewayne,
Actually, I've tried something else that accomplished the necessary thing,
but your way is much simpler and does not require any rewrites.
Nonetheless, I still cannot get the lookup to work. Here is what happens:
I get a NameNotFoundException: env not bound thrown from
org.jnp.server.NamingServer.getBinding(NamingServer.java:474)
I'll look more into it but it seems that all the bindings done by
JbossWebXmlReader are still not visible to the servlets.
-------------------------------------------------------------------------
Anatoly Akkerman
Computer Science Dept.
Courant Institute of Mathematical Sciences, NYU
719 Broadway, #715 Tel: 212 998-3525
New York, NY 10003 Fax: 212 995-4123
-------------------------------------------------------------------------
On Sun, 18 Feb 2001, Dewayne McNair wrote:
> Have you tried adding:
>
> <ContextInterceptor
> className="org.jboss.tomcat.naming.JbossWebXmlReader" />
>
> to Tomcat's server.xml? Give that a shot and let me know if that solves the
> problem.
>
>
> ----- Original Message -----
> From: "Anatoly Akkerman" <[EMAIL PROTECTED]>
> To: "JBoss-Dev" <[EMAIL PROTECTED]>; "jboss-user mailing list"
> <[EMAIL PROTECTED]>
> Sent: Sunday, February 18, 2001 12:03 PM
> Subject: [jBoss-User] latest tomcat-service.jar broke JNDI namespace
> integration
>
>
> >
> > Hello, everybody
> >
> > I am one of the people fighting with the PetStore. After having figured
> > out that EmbeddedTomcat was not handling form-based logins and the
> > prevented PetStore from functioning, I followed the advice of Scott M
> > Stark to upgrade to the latest tomcat-service snapshot. Indeed, I
> > preceeded in that direction. It turns out, that the latest snapshot of
> > tomcat-service.jar breaks JNDI integration between Tomcat and JBoss
> > (though it does fix form-based logins, as advertised).
> >
> > I tried to fix that myself. Here is what I did and problems I ran into. At
> > this moment I'm stuck.
> >
> > 1. I've tried adding JbossWebXmlReader interceptor to Tomcat's
> > ContextManager as soon as TomcatEntry creates it in execute() method.
> >
> > 3. PROBLEM. Trying to run this caused an exception when JbossWebXmlReader
> > tries to get ServletLoader from the Context upon a initContext() call into
> > it. I get a null pointer exception. Presumably, TomCat has not initialized
> > the ServletLoader at this moment for this context and will do it sometime
> > later.
> >
> > 4. Attempt to fix: I tried simply removing this line from
> > JbossWebXmlReader (it was needed to set current thread's
> > ContextClassLoader and keep mapping between the classloader and document
> > base, since I was not sure how it was being used, I commented it out,
> > stupid, but what the heck!) This prevented the exception, jboss-web.xml
> > was read by TomCat, but my problem -- that a servlet failed on JNDI lookup
> > for the SecurityAdapter classname -- was not resolved. So, I guess that
> > knowing the classloader was essential for proper operation of JNDI (sorry
> > for my illiteracy in this, I am very new to J2EE and related technologies,
> > have to learn on the fly by trial and error)
> >
> > I've looked around a bit how to obtain the classloader that
> > JbossWebXmlReader wants but at this moment I did not figure this out, so
> > anyone has suggestions?
> >
> >
> > -------------------------------------------------------------------------
> > Anatoly Akkerman
> > Computer Science Dept.
> > Courant Institute of Mathematical Sciences, NYU
> > 719 Broadway, #715 Tel: 212 998-3525
> > New York, NY 10003 Fax: 212 995-4123
> > -------------------------------------------------------------------------
> >
> >
> >
> >
> >
> > --
> > --------------------------------------------------------------
> > To subscribe: [EMAIL PROTECTED]
> > To unsubscribe: [EMAIL PROTECTED]
> > List Help?: [EMAIL PROTECTED]
> >
> >
>
>
>
> --
> --------------------------------------------------------------
> To subscribe: [EMAIL PROTECTED]
> To unsubscribe: [EMAIL PROTECTED]
> List Help?: [EMAIL PROTECTED]
>
>