tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rico <>
Subject Visibility of resources under WEB-INF/classes
Date Sat, 19 Feb 2005 16:16:46 GMT
Hello Everyone.
I'm using Tomcat 4.1.31, and observed a similar problem on 4.1.18.

It is possible to deploy web applications to a location of one's
choice, other than <CATALINA_HOME>/webapps/<app_folder>, by adding
a <Context> to server.xml. 
With such a setup, I've been stuck with Tomcat not seeing resources
that the documentation on their respective websites claim to be just
a matter of placing in WEB-INF/classes and people confirming success at it.
Examples are, and hibernate.cfg.xml.

So, is this the expected behaviour?
If I install the web application in e.g c:\\myWebApp
I'd consistently have Tomcat complaining as follows:

INFO [http-8080-Processor25] cfg.Environment (<clinit>:483)
    - Hibernate 2.1.8
INFO [http-8080-Processor25] cfg.Environment (<clinit>:512)
    - not found
INFO [http-8080-Processor25] cfg.Environment (<clinit>:543)
    - using CGLIB reflection optimizer
INFO [http-8080-Processor25] cfg.Environment (<clinit>:572)
    - using JDK 1.4 java.sql.Timestamp handling
INFO [http-8080-Processor25] cfg.Configuration (configure:909)
    - configuring from resource: /hibernate.cfg.xml
INFO [http-8080-Processor25] cfg.Configuration
    - Configuration resource: /hibernate.cfg.xml
WARN [http-8080-Processor25] cfg.Configuration
    - /hibernate.cfg.xml not found
ERROR [http-8080-Processor25] persistence.HibernateUtil (<clinit>:19)
    - Initial SessionFactory creation failed.
    net.sf.hibernate.HibernateException: /hibernate.cfg.xml not found

Possible workaround's include initialization servlet for log4j and
use of ResourceBundle to pass in an absolute path for Hibernate.
But still, the documentation says place the config files under WEB-INF/classes
and they'll be found...
Not so, unless it's <CATALINA_HOME>/webapps/WEB-INF/classes.


Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message