Details
-
Bug
-
Resolution: Unresolved
-
Low
-
None
-
8.5.7
-
None
-
2
-
Severity 3 - Minor
-
6
-
Description
Issue Summary
When Confluence is upgraded to 8.5.7 and the cache-settings-overrides.properties file contains the below record, Confluence fails to start after the upgrade.
cache.maxEntriesLocalHeap.com.atlassian.confluence.plugin.CachingPluginStateStore=2
This is reproducible on Data Center: (yes) / (no): yes
Steps to Reproduce
- Add the below record in the config/cache-settings-overrides.properties file in the home directory (or shared home directory in a Confluence Data Center cluster).
cache.maxEntriesLocalHeap.com.atlassian.confluence.plugin.CachingPluginStateStore=2
- Upgrade to Confluence 8.5.7
Note - This issue was reproduced for the Confluence 7.19.19 upgrade to the Confluence 8.5.7 version but can affect other versions also.
Expected Results
Confluence started without any errors post-upgrade.
Actual Results
The below exception is thrown in the atlassian-confluence.log file and Confluence fails to start :
2024-03-20 19:29:48,669 ERROR [Catalina-utility-1] [springframework.web.context.ContextLoader] initWebApplicationContext Context initialization failed org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'cacheConfigManager' defined in class path resource [services/cacheServiceContext.xml]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [java.lang.Object]: Factory method 'selectBean' threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'ehCacheConfigManager' defined in URL [jar:file:/Users/nrastogi/confluence/atlassian-confluence-8.5.7/confluence/WEB-INF/lib/com.atlassian.confluence.cache_confluence-cache-ehcache-8.5.7.jar!/cacheProviderContext.xml]: Invocation of init method failed; nested exception is java.lang.ClassCastException: class com.atlassian.cache.impl.metrics.InstrumentedCachedReference cannot be cast to class com.atlassian.cache.Cache (com.atlassian.cache.impl.metrics.InstrumentedCachedReference and com.atlassian.cache.Cache are in unnamed module of loader org.apache.catalina.loader.ParallelWebappClassLoader @6136f2d7)
Detailed error is attached in the file.
Workaround
Update the plugin-related cache record in cache-settings-overrides.properties file as mentioned below and restart Confluence:
Old record
cache.maxEntriesLocalHeap.com.atlassian.confluence.plugin.CachingPluginStateStore=2
New record
cache.maxEntriesLocalHeap.com.atlassian.confluence.plugin.CachingPluginPersistentStateStore =2