tracker issue : CF-3339491

select a category, or use search below
(searches all categories and all time range)
Title:

Upgrading Ehcache causes silent failure and unexpected behavior

| View in Tracker

Status/Resolution/Reason: Closed/Fixed/

Reporter/Name(from Bugbase): Jordan Clark / Jordan Clark (Y Guy)

Created: 10/01/2012

Components: Caching

Versions: 10.0

Failure Type:

Found In Build/Fixed In Build: Final / CF10_Update14

Priority/Frequency: Major / All users will encounter

Locale/System: English / Win 2008 Server R2

Vote Count: 2

Problem Description:

When upgrading the bundled Ehcache libraries from 2.5.1 to 2.5.5 or 2.6.0 Ehcache fails in an unexpected way. There are no error messages reported in the log files, and caching appears to still work. However what has happened is the \cfusion\lib\ehcache.xml is ignored, the application specific this.cache.configFile = "ehcache.xml" is ignored, and the OBJECT, TEMPLATE and caches created with cacheRegionNew() are are being added to the "AuthCacheManager" cache manager which is defined in \cfusion\lib\auth-ehcache.xml.

This is a silent failure that was not easy to figure out. In ColdFusion 9 it was possible to upgrade Ehcache without this behaviour, so this is a regression. It should be possible to upgrade the Ehcache subcomponent as newer versions contain bug fixes and new features including Terracotta server and BigMemory.

Our site relies on using a newer version of Ehcache to connect to our Terracotta Cache Server, until this bug is fixed it is not possible for us to upgrade our servers from CF 9 to CF 10.

It is possible to verify this behaviour by running this code:

<cfset cacheManager = createObject("java", "net.sf.ehcache.CacheManager")>
<cfdump label="#cacheManager.getInstance().getName()#" var="#cacheManager.getInstance().getCacheNames()#">

Steps to Reproduce:

Replace ehcache-core-2.5.1.jar with ehcache-core-2.5.5.jar or ehcache-core-2.6.0.jar


Actual Result: 

When running version 2.5.5 or 2.6 the output cache manager will be "AuthCacheManager" and the only defined cache is "authcache"


Expected Result:

Normally the cache manager should be unnamed with the the caches defined in ehcache.xml including: "customcache", OBJECT & TEMPLATE


Any Workarounds:

----------------------------- Additional Watson Details -----------------------------

Watson Bug ID:	3339491

Deployment Phase:	Release Candidate

External Customer Info:
External Company:  
External Customer Name: Y Guy
External Customer Email:  
External Test Config: My Hardware and Environment details: ColdFusion 10 (with all updates) on Windows 2003 and Windows 2008

Attachments:

Comments:

When "ehcache-core-2.5.1.jar" is replaced by "ehcache-core-2.6.0.jar" in cfusion/lib, I see the reported behavior.
Comment by Akhila K.
17773 | October 08, 2012 07:36:13 AM GMT
I am also experiencing this issue with the Terracotta's enterprise caching. All cache settings are reading from the auth-ehcache.xml and cached objects are going to the AuthCacheManager. Why is CF10 ignoring the ehcache.xml. I tried adding the customcache region with the <terracotta/> switch to the auth-ehcache.xml but the cacheRegionNew() method does not create Terracotta-clustered region. In order to get around this you have to explicitly added your custom regions to the auth-ehcache.xml. I am sure this is not the intended behavior. I am using this files: ehcache-core-ee-2.5.2.jar ehcache-terracotta-ee-2.5.2.jar terracotta-toolkit-1.5-runtime-ee-4.2.0.jar ehcache-web-2.0.4.jar slf4j-api-1.6.1.jar slf4j-jdk14-1.6.1.jar slf4j-log4j12-1.6.1.jar <cache name="customcache" maxElementsInMemory="1000" eternal="false" timeToIdleSeconds="720" timeToLiveSeconds="720" maxElementsOnDisk="100000" memoryStoreEvictionPolicy="LRU"> <terracotta/> </cache>
Vote by External U.
17776 | November 28, 2012 12:14:38 PM GMT
Since the bug has been verified is there any information Adobe can provide as to when the fix is going to be released?
Comment by External U.
17774 | March 05, 2013 04:09:31 PM GMT
I've bumped into this as well, and it's preventing me from upgrading to the latest version of Ehcache so I can use it along with BigMemory.
Vote by External U.
17777 | March 18, 2013 03:05:16 PM GMT
Now that this is marked as fixed, will it be going out in an upcoming hotfix/updater?
Comment by External U.
17775 | January 02, 2014 09:59:51 AM GMT