Hello everyone,
I am trying to add 2nd level caching to an existing Eclipse project. It is using hibernate 3.6.0.final, so I added hibernate-ehcache-3.6.0.final, and ehcache-core-1.5.0. I added to my hibernateProperties the following lines,
<prop key="hibernate.cache.region.factory_class">net.sf.ehcache.hibernate.EhCacheRegionFactory</prop>
<prop key="hibernate.cache.provider_configuration">config/ehcache.xml</prop>
<prop key="hibernate.cache.use_second_level_cache">true</prop>
<prop key="hibernate.cache.use_query_cache">true</prop>
But I get an exception when I run the code
java.lang.ClassNotFoundException: net.sf.ehcache.hibernate.EhCacheRegionFactory cannot be found
I've tried multiple things,
Tried upgrading to:
hibernate 3.6.10.final, hibernate-ehcache-3.6.10.final, and ehcache-core-2.4.3
, but I just got the same error.
I also tried changing
<prop key="hibernate.cache.region.factory_class">net.sf.ehcache.hibernate.EhCacheRegionFactory</prop>
to
<prop key="hibernate.cache.provider_class">org.hibernate.cache.EhCacheProvider</prop>
But I got the error: java.lang.ClassNotFoundException: net.sf.ehcache.CacheException cannot be found
I also tried
<prop key="hibernate.cache.provider_class">net.sf.ehcache.hibernate.EhCacheProvider</prop>
but go an error java.lang.ClassNotFoundException: net.sf.ehcache.hibernate.EhCacheProvider cannot be found
I'm using Windows 7, and Eclipse Kepler
Any clues would be appreciated.
Thanks.