Deployment of war with config file on classpath root fails due to '!' in url
----------------------------------------------------------------------------
Key: GERONIMO-2008
URL: http://issues.apache.org/jira/browse/GERONIMO-2008
Project: Geronimo
Type: Bug
Security: public (Regular issues)
Components: deployment
Versions: 1.1
Environment: Windows XP - Geronimo 1.1 SNAPSHOT
Reporter: Bryan Noll
Priority: Blocker
Geronimo fails to properly deploy a webapp that uses Hibernate due to a
configuration file named 'ehcache.xml' that lives on the root of the classpath.
See the following for details. The most likely cause of the issue is the
existence of a '!' in the url... but the fact that a directory named '!' does
not actually exist on the file system under 'repository/default/...'.
logging output:
DEBUG [Configurator] Configuring ehcache from ehcache.xml found in the
classpath:
jar:file:/C:/go11/repository/default/equinox-jsf/1147295851453/equinox-jsf-1147295851453.war/WEB-INF/classes/!/ehcache.xml
I think the thing to notice there is the directory named '!'.
It doesn't actually exist on the file system.
The root exception I'm getting says:
org.hibernate.cache.CacheException: net.sf.ehcache.CacheException: Cannot
configure CacheManager: Access is denied
ehcache code:
public void configure(final Object bean)
throws Exception {
final SAXParser parser = SAXParserFactory.newInstance().newSAXParser();
final BeanHandler handler = new BeanHandler(bean);
URL url = getClass().getResource(DEFAULT_CLASSPATH_CONFIGURATION_FILE);
if (url != null) {
if (LOG.isDebugEnabled()) {
LOG.debug("Configuring ehcache from ehcache.xml found in the
classpath: " + url);
}
} else {
url = getClass().getResource(FAILSAFE_CLASSPATH_CONFIGURATION_FILE);
if (LOG.isWarnEnabled()) {
LOG.warn("No configuration found. Configuring ehcache from
ehcache-failsafe.xml"
+ " found in the classpath: " + url);
}
}
parser.parse(url.toExternalForm(), handler);
}
...
where DEFAULT_CLASSPATH_CONFIGURATION_FILE is:
private static final String DEFAULT_CLASSPATH_CONFIGURATION_FILE =
"/ehcache.xml";
...
A previous snapshot (had from the last week of April sometime) WORKED and
produced this debug msg.
15:49:26,765 DEBUG [Configurator] Configuring ehcache from ehcache.xml found in
the classpath:
file:/C:/good/repository/default/equinox-jsf/1/equinox-jsf-1.car/WEB-INF/classes/ehcache.xml
A snapshot had from 5/8/06 (give or take a day or two... sorry for the lack of
precision here) produced this debug msg... and this is the one that DOES NOT
WORK. Notice the '!'
15:17:36,765 DEBUG [Configurator] Configuring ehcache from ehcache.xml found in
the classpath:
jar:file:/C:/go11/repository/default/equinox-jsf/1147295851453/equinox-jsf-1147295851453.war/WEB-INF/classes/!/ehcache.xml
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira