In my opinion this struggle is caused by RegionFactory not logging root causes of failed startup. See HHH-12630 Open . I too had to debug hibernate-core to find out why caches successfully start in apache tomcat, but fail to start in our JUnit environment after upgrading to hibernate 5.3 and migrating configurations. I added my cache config as "classpath:ehcache.xml". Apache Tomcat registers a URL handler that is cappable of handling "classpath:" protocol - JUnit by default doesn't.
org.apache.catalina.webresources.TomcatURLStreamHandlerFactory.register()
As you said: maze of possibilities. |