Remy, I will send you the config files shortly (they're on a laptop I don't have access to at the moment).
My situation does have one unique feature. The servlet which is causing these issues is in a jar which I have installed under "common/lib". The reason I have done this is because the servlet acts in a similar manner to the struts controller servlet, in that it catches all urls and then dispatches to appropriate action classes. All action classes are also in this jar so I shouldn't have any classloader related problems, the web applications have some config files (accessed via getResourceAsStream) and JSP files. That is the only difference I can think of, everything else is normal usage. As I say I will forward you the files later today or early tomorrow. Regards, Arshad ----- Original Message ----- From: "Remy Maucherat" <[EMAIL PROTECTED]> To: "Tomcat Developers List" <[EMAIL PROTECTED]> Sent: Friday, June 14, 2002 4:45 PM Subject: Re: JNDI with a custom factory not working > > I had a look at the JNDI example, unfortunately it wasn't totally relevant > > as everything > > is defined in the web.xml and that has always worked for me. > > > > After a lot more debugging and I am getting even more confused (!!!). I put > > some trace > > into the "init" function of my servlet. It's within the "init" that I do the > > JNDI name lookups. > > The "init" gets called twice per servlet. On the first call everything is OK > > and my lookup > > succeeds. The second time however the lookup fails with a NamingException. > > > > I notice that the first time the "init" gets called, the context returned > > has the bindings I expect. > > The second call to "init" which performs identical processing gets a > > NamingContext with > > nothing bound (I don't have any entries in the web.xml, had I defined any I > > think they would be > > the only entries there). > > > > It also looked like the two inits were done by different class loaders, as I > > defined some static > > members and they were not carried across to the second init. > > > > Can anybody explain why the "init" may be called twice? > > This is a very odd behavior, and I will try to reproduce it. From what > I've seen in your config, you are using a load-on-startup servlet. Do > you have anything else which isn't the default ? > > Remy > > > -- > To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> > For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> > -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>