• Bug
  • Status: Closed
  • Resolution: Fixed
  • drb
  • Reporter: sourceforgetracker
  • September 21, 2009
  • 0
  • Watchers: 0
  • September 22, 2009
  • September 22, 2009

Description

I am unable to load an EhCache configuration file from a class loader other then the one that loaded EhCache.

I am attempting to use ehcache with hibernate and the EhCacheProvider insists on the path to the configuration file (as defined in the net.sf.ehcache.configurationResourceName property)being preceeded with a ‘/’.

This prevents the file being loaded by EhCacheProvider using the classloader forcing it to defer to the class’s classloader.

Using a preceding slash when calling ClassLoader.getResource is not used for this reason as documented here http://java.sun.com/j2se/1.5.0/docs/guide/lang/resources.html#classloader.

This forces any configuration file to be accessible by the same classloader that loaded EhCache.

This can easily be reproduced by locating the ehcache.jar in the jre/lib/ext directory and pustting the config file on the system classpath. Sourceforge Ticket ID: 1977481 - Opened By: strontium90dog - 29 May 2008 09:01 UTC

Comments

Fiona OShea 2009-09-22

Re-opening so that I can properly close out these issues and have correct Resolution status in Jira