This content has been marked as final.
Show 1 reply
-
1. Re: Hibernate JPA never finds my ehcache2.xml
chris.simons Apr 5, 2010 4:19 PM (in response to chris.simons)Looks like I just figured it out - I was using an old property name/value pair for ehcache.xml configuration path.
I changed it to:
<property name="net.sf.ehcache.configurationResourceName" value="/ehcache2.xml"/>
But then I began to receive NoClassDefFound errors on backport-util-concurrent.jar - funny that this would only now become an issue.
To resolve this issue, I made sure backport-util-concurrent.jar was added to my EAR/lib.
Next, I changed the cacheproviderclass to the Singleton.
<!--<property name="hibernate.cache.provider_class" value="net.sf.ehcache.hibernate.EhCacheProvider"/>--> <property name="hibernate.cache.provider_class" value="net.sf.ehcache.hibernate.SingletonEhCacheProvider"/> <!--<property name="hibernate.cache.region.factory_class" value=" net.sf.ehcache.hibernate.EhCacheRegionFactory"/>--> <property name="net.sf.ehcache.configurationResourceName" value="/ehcache2.xml"/>