Julio César Aguilar wrote:

I've done several tests in Windows and this is what I found.
To remember my settings

No CATALINA_BASE defined. Tests done with CATALINA_HOME/shared/lib.

1. As being told, I can find jars put in CATALINA_HOME/common/lib.

2.
What exactly the moment when CNFE is thrown? You said that the applications is not even start due to CNFE, so that classes are needed during deployment or while normal application functioning?

The original problem was with a Filter, which was started at deployment.

Then to my opinion this is due to Filter initialization (not run-time usage) as implemented in Tomcat: it uses a classloader that sees private webapp libraries (WEB-INF/lib/*) and libraries common to both webapp and Tomcat itself (CATALINA_HOME/common/lib/*), but not CATALINA_HOME/shared/lib/* . Hey, anybody with internals knowlegde can clarify this?


If I place the jar that contains the Filter class in WEB-INF/lib then the
application starts, but looking for classes needed after deployment (during a normal run) I can't find them if the corresponding jars are in shared/lib.


3. Something I had not mentioned about my application (I did not thought it was relevant) is that it lives outside the CATALINA_HOME directory, is referred to by a context.xml file in CATALINA_HOME/conf/Catalina/localhost.

I don't think this is relevant eithter...


Using a test application in CATALINA_HOME/webapps and compiling the IsThereThisClass servlet provided by Veniamin I can finally find the classes within shared/lib.

Stop, now I've messed up. :-) Your code can not find some jars in question, but mine does?? That code simply get servlet's classloader and searches a class by given name. So while it gets an ordinary this.getClass().getClassLoader(), it legally uses a classloader mentioned in Tomcat's docs as "WebappX classloader", which surely should find all classes in its classpath.



--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to