| When configured to load configuration from classpath (using configuration like net.sf.ehcache.configurationResourceName = "META-INF/ehcache.xml" and hibernate.cache.region.factory_class = "org.hibernate.cache.ehcache.SingletonEhCacheRegionFactory") org.hibernate.cache.ehcache.SingletonEhCacheRegionFactory initialization fails with IllegalStateException: Cannot load resource through a non-started EhcacheRegionFactory exception. This is caused by org.hibernate.cache.ehcache.internal.SingletonEhcacheRegionFactory.resolveCacheManager() method implementation which for configurations placed on classpath invokes org.hibernate.cache.ehcache.internal.EhcacheRegionFactory.loadResource() which will always fail in such case because org.hibernate.cache.ehcache.internal.EhcacheRegionFactory.cacheManager is not yet set. |