Hi there,

I've got a class loading problem (at least that is my impression) with
Tomcat 5 that I did not have with Tomcat 4.

I have the following lines of code in my app:
"URL hibernateConfigFileURL =
this.getClass().getResource("/hibernate.cfg.xml");"
and
"URL hibernateMappingsURL =
this.getClass().getResource("/hibernate-mappings.jar");"
(If you change this.getClass().getResource(...) to
Thread.currentThread().getContextClassLoader().getResource(...) it does not
work either.)

For  the first resource lookup (the xml file) the class loader correctly
searches in "Tomcat 5.0\webapps\rad_webmodule\WEB-INF\classes" and below
(The classpath of the webapp).
For  the second resource lookup (the JAR) the class loader searches in
"Tomcat 5.0\work\Catalina\localhost\rad_webmodule\loader " (Tomcat's work
directory) and not in the webapp classpath under "Tomcat 5.0
\webapps\rad_webmodule\WEB-INF\classes" (or in the WEB-INF/lib) where the
JAR is located. Why?

Any help is greatly appreciated!

Thanks a lot in advance!

Regards,

Oliver


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

Reply via email to