Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
2.10.3
-
None
-
Unknown
Description
Similar to CAMEL-5950, but only occurs at lazy cache initialization.
net.sf.ehcache.ObjectExistsException: Cache sampleCache already exists at net.sf.ehcache.CacheManager.addCacheNoCheck(CacheManager.java:1294) ~[org.apache.servicemix.bundles.ehcache-2.5.2_1.jar:na] at net.sf.ehcache.CacheManager.addCache(CacheManager.java:1184) ~[org.apache.servicemix.bundles.ehcache-2.5.2_1.jar:na] at org.apache.camel.component.cache.CacheEndpoint.initializeCache(CacheEndpoint.java:137) ~[camel-cache-2.10.3.jar:2.10.3]
Workaround:
for (Endpoint endpoint : context.getEndpoints()) { if (endpoint instanceof CacheEndpoint) { CacheEndpoint ce = (CacheEndpoint) endpoint; ce.initializeCache(); } }