I try to migrate our application from Hibernate 5.2 with Ehcache 2 to Hibernate 5.3 with Jcache and Ehcache 3.
I have a problem to get Hibernate (EntityManagerFactory) started with enabled Jcache/Ehcache in my Tomcat webserver. The problem is: The configuration file ehcache.xml is not found.
I don’t know how to configure the location of this configuration file. Probably it’s a problem with the URI.The result is a (catched) javax.cache.CacheException: org.ehcache.xml.exceptions.XmlConfigurationException: Error parsing XML configuration at file:/META-INF/ehcache.xml in in AbstractRegionFactory.start().
These are my relevant JARs:
This is my configuration for the second level cache:
“hibernate.javax.cache.uri”, “file:///META-INF/ehcache.xml” // tried many alternative values
The location of my ehcache.xml is
What is the correct value of the property “hibernate.javax.cache.uri”?
- When I put this ehcache.xml in my root directory C: and configure “file:///ehcache.xml”, the configuration file is found and parsed and everything seems to work fine. But that is not the correct location…
Thank you very much in advance!