EHC ❯ RefreshAheadCache does not use the same classloader as the underlying cache
-
Bug
-
Status: New
-
2 Major
-
Resolution:
-
ehcache-core
-
-
drb
-
Reporter: robbyd
-
September 14, 2016
-
0
-
Watchers: 1
-
September 14, 2016
-
Description
private void initSupportCache() { this.supportConfig = new CacheConfiguration();
This results in the supportConfig having the EhcacheDefaultClassLoader and not the classloader of the original cache. Therefor an exception is thrown when we try to user the cache.
Caused by: net.sf.ehcache.CacheException: This cache (operationalstatus_net.sf.ehcache.constructs.refreshahead.RefreshAheadCache_refreshAheadSupport) is configurated with a different classloader reference than its containing cache manager
at net.sf.ehcache.Cache.initialise(Cache.java:1076)
at net.sf.ehcache.CacheManager.initializeEhcache(CacheManager.java:1333)
at net.sf.ehcache.CacheManager.addCacheNoCheck(CacheManager.java:1399)
at net.sf.ehcache.CacheManager.addCacheIfAbsent(CacheManager.java:1916)
at net.sf.ehcache.constructs.refreshahead.RefreshAheadCache.initSupportCache(RefreshAheadCache.java:125)
at net.sf.ehcache.constructs.refreshahead.RefreshAheadCache.