I\'m trying to add ehcache
(v2.6.0) to my Hibernate 4.1.5.SP1
project, but having some configuration issues. Specifically, I\'m getting a ja
I checked maven the dependencies. Maven always loads ehcache-code when the hibernate-ehcache package is loaded.
Dependency tree:
+--- org.hibernate:hibernate-ehcache:4.3.0.Final
| +--- org.jboss.logging:jboss-logging:3.1.3.GA
| +--- org.jboss.logging:jboss-logging-annotations:1.2.0.Beta1
| +--- org.hibernate:hibernate-core:4.3.0.Final (*)
| \--- net.sf.ehcache:ehcache-core:2.4.3
| \--- org.slf4j:slf4j-api:1.6.1 -> 1.6.6
Please check your persistence configuration. It should not include any classes where the package name starts with "net.sf"
For example, you have to replace the following string in your code:
.setProperty("hibernate.cache.region.factory_class", "net.sf.ehcache.hibernate.EhCacheRegionFactory")
with the following string:
.setProperty("hibernate.cache.region.factory_class", "org.hibernate.cache.ehcache.EhCacheRegionFactory")