Uploaded image for project: 'Hibernate ORM'
  1. HHH-12869

SingletonEhcacheRegionFactory initialization fails

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 5.3.3
    • Fix Version/s: 5.3.4, 5.4
    • Component/s: hibernate-ehcache
    • Labels:
      None
    • Bug Testcase Reminder (view):

      Bug reports should generally be accompanied by a test case!

    • Worked in:
    • Last commented by a user?:
      true

      Description

      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.

        Attachments

          Activity

            People

            • Votes:
              1 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: