Status/Resolution/Reason: Closed/Fixed/
Reporter/Name(from Bugbase): Colby Ackerfield / Colby Ackerfield (Colby Ackerfield)
Created: 06/01/2015
Components: Caching
Versions: 11.0
Failure Type:
Found In Build/Fixed In Build: CF11_Final /
Priority/Frequency: Major / Most users will encounter
Locale/System: English / Windows 7
Vote Count: 3
Problem Description:
After returning to an inactive server (overnight, ~16 hours) cached queries return an error:
The CacheManager has been shut down. It can no longer be used.
Steps to Reproduce:
A simple application with the following two pages exhibits the problem. Request the page query.cfm and then leave the server overnight and attempt to fetch query.cfm in the morning.
Application.cfc:
<cfcomponent>
<!--- Set up the application. --->
<cfset THIS.Name = "cachtest" />
<cfset THIS.ApplicationTimeout = CreateTimeSpan( 0, 0, 0, 10 ) /> <!--- tested with this so leaving in here, but couldn't seem to make it fail sooner than overnight --->
</cfcomponent>
query.cfm:
<cfquery datasource="MyDataSource" name="LastUpdatedQry" cachedwithin="#CreateTimeSpan(0, 0, 10, 0)#">
SELECT MAX(l.modStamp) AS maxModStamp,
GetDate() AS lastChecked
FROM dbo.MyTable l
</cfquery>
Actual Result:
The CacheManager has been shut down. It can no longer be used.
The error occurred in C:/work/webroot/cfcachetest/query.cfm: line 1
1 : <cfquery datasource="MyDataSource" name="LastUpdatedQry" cachedwithin="#CreateTimeSpan(0, 0, 10, 0)#">
2 : SELECT MAX(l.modStamp) AS maxModStamp,
3 : GetDate() AS lastChecked
Expected Result:
Running code like this shows that the #Application.name#QUERY cache is missing.
<cfscript>
cacheManager = createObject('java', 'net.sf.ehcache.CacheManager').getInstance();
regions = cacheManager.getCacheNames();
writeDump(regions);
</cfscript>
If you attempt to Clear Query Cache Now from the CF Administrator page you get a similar error:
The CacheManager has been shut down. It can no longer be used.
The error occurred in caching.cfm: line 199
-1 : Unable to display error's location in a CFML template.
Resources: •Check the ColdFusion documentation to verify that you are using the correct syntax.
•Search the Knowledge Base to find a solution to your problem.
Browser Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; rv:11.0) like Gecko
Remote Address 127.0.0.1
Referrer http://127.0.0.1/CFIDE/administrator/settings/caching.cfm
Date/Time 01-Jun-15 09:24 AM
Stack Trace
at cfcaching2ecfm501570882._factor14(/CFIDE/administrator/settings/caching.cfm:199) at cfcaching2ecfm501570882.runPage(/CFIDE/administrator/settings/caching.cfm:1)
java.lang.IllegalStateException: The CacheManager has been shut down. It can no longer be used.
at net.sf.ehcache.CacheManager.checkStatus(CacheManager.java:1504)
at net.sf.ehcache.CacheManager.getCache(CacheManager.java:1077)
at coldfusion.tagext.io.cache.ehcache.GenericEhcache.clearCache(GenericEhcache.java:1223)
at coldfusion.tagext.io.cache.CacheTagHelper.clearQueryCache(CacheTagHelper.java:633)
at coldfusion.tagext.io.cache.CacheTagHelper.purgeAllQueryCache(CacheTagHelper.java:614)
at coldfusion.sql.Executive.purgeQueryCache(Executive.java:1861)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at coldfusion.runtime.StructBean.invoke(StructBean.java:508)
...
Any Workarounds:
I have not found a way short of restarting the server to get the cached queries working again.
----------------------------- Additional Watson Details -----------------------------
Watson Bug ID: 3998805
External Customer Info:
External Company:
External Customer Name: Colby
External Customer Email:
External Test Config: My Hardware and Environment details:
CF11 with Apache on Windows 7
Attachments:
- June 01, 2015 00:00:00: 1_querycacheCF11CFIDE.png
- July 10, 2015 00:00:00: 2_cachetest.zip
Comments: