I am configuring my hibernate project to use a 2nd-level cache provider, so that I can take advantage of query caching.
I added a dependency to ehcache:
if you wish to use Hibernate 4.0.0.Final. for the value of hibernate.cache.region.factory_class property use:
org.hibernate.cache.ehcache.SingletonEhCacheRegionFactory
instead of net.sf.ehcache.hibernate.SingletonEhCacheRegionFactory
and org.hibernate.cache.ehcache.EhCacheRegionFactory
instead of net.sf.ehcache.hibernate.EhCacheRegionFactory
Otherwise you will end up with some internal ClassNotFound exceptions