tracker issue : CF-3849494

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

<Regression> CacheRemove throws an exception when one or more queries do not have cacheId attribute

| View in Tracker

Status/Resolution/Reason: Closed/Fixed/

Reporter/Name(from Bugbase): / ext-user (Akhila K Srinivas)

Created: 11/10/2014

Components: Caching

Versions: 11.0

Failure Type:

Found In Build/Fixed In Build: 292034 / 292048

Priority/Frequency: Major / Most users will encounter

Locale/System: English / Win All

Vote Count: 0

Listed in the version 11.0.03.292480 Issues Fixed doc
Problem:  CacheRemove throws an exception when one or more queries do not have cacheId attribute.

Test code to repro :

<cfscript>
  cacheRemoveAll("query");
  q1 = queryNew("");
  q2 = queryNew("");
</cfscript>
<cfquery name="q1" dbtype="query" cachedwithin="#createTimeSpan(0,0,1,0)#"><!--- causes exception b/c no cacheid attribute --->
SELECT * FROM q1
</cfquery>
<cfquery name="q2" dbtype="query" cachedwithin="#createTimeSpan(0,0,1,0)#" cacheid="foo">
SELECT * FROM q2
</cfquery>
<cfscript>
  writeDump(cacheGetAllIDs("query"));
  cacheRemove(cacheGetAllIds("query"), true, "query");//Exception: coldfusion.sql.QueryDetails cannot be cast to java.lang.String 
  writeDump(cacheGetAllIDs("query"));
</cfscript>


Exception message :

Error casting an object of type coldfusion.sql.QueryDetails cannot be cast to java.lang.String to an incompatible type. This usually indicates a programming error in Java, although it could also mean you have tried to use a foreign object in a different way than it was designed.
coldfusion.sql.QueryDetails cannot be cast to java.lang.String 

Stack trace :

java.lang.ClassCastException: coldfusion.sql.QueryDetails cannot be cast to java.lang.String
	at coldfusion.tagext.io.cache.CacheTagHelper.deleteFromObjectCache(CacheTagHelper.java:446)
	at coldfusion.runtime.CFPage.CacheRemove(CFPage.java:10318)
	at coldfusion.runtime.CFPage.CacheRemove(CFPage.java:10310)
	at cfnewestBug2ecfm1465863730.runPage(C:\ColdFusion11\cfusion\wwwroot\newestBug.cfm:14)
	at coldfusion.runtime.CfJspPage.invoke(CfJspPage.java:246)
	at coldfusion.tagext.lang.IncludeTag.handlePageInvoke(IncludeTag.java:736)
	at coldfusion.tagext.lang.IncludeTag.doStartTag(IncludeTag.java:572)
	at coldfusion.filter.CfincludeFilter.invoke(CfincludeFilter.java:65)
	at coldfusion.filter.IpFilter.invoke(IpFilter.java:45)
	at coldfusion.filter.ApplicationFilter.invoke(ApplicationFilter.java:487)
	at coldfusion.filter.RequestMonitorFilter.invoke(RequestMonitorFilter.java:42)
	at coldfusion.filter.MonitoringFilter.invoke(MonitoringFilter.java:40)
	at coldfusion.filter.PathFilter.invoke(PathFilter.java:142)
	at coldfusion.filter.ExceptionFilter.invoke(ExceptionFilter.java:94)
	at coldfusion.filter.ClientScopePersistenceFilter.invoke(ClientScopePersistenceFilter.java:28)
	at coldfusion.filter.BrowserFilter.invoke(BrowserFilter.java:38)
	at coldfusion.filter.NoCacheFilter.invoke(NoCacheFilter.java:58)
	at coldfusion.filter.GlobalsFilter.invoke(GlobalsFilter.java:38)
	at coldfusion.filter.DatasourceFilter.invoke(DatasourceFilter.java:22)
	at coldfusion.filter.CachingFilter.invoke(CachingFilter.java:62)
	at coldfusion.CfmServlet.service(CfmServlet.java:219)
	at coldfusion.bootstrap.BootstrapServlet.service(BootstrapServlet.java:89)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
	at coldfusion.monitor.event.MonitoringServletFilter.doFilter(MonitoringServletFilter.java:42)
	at coldfusion.bootstrap.BootstrapFilter.doFilter(BootstrapFilter.java:46)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
	at coldfusion.inspect.weinre.MobileDeviceDomInspectionFilter.doFilter(MobileDeviceDomInspectionFilter.java:121)
	at coldfusion.bootstrap.BootstrapFilter.doFilter(BootstrapFilter.java:46)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:501)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:422)
	at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1040)
	at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:607)
	at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:316)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
	at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
	at java.lang.Thread.run(Unknown Source)


Method:

Result:

Expected:

Workaround:

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

Watson Bug ID:	3849494

External Customer Info:
External Company:  
External Customer Name:  
External Customer Email:

Attachments:

Comments:

Hi Akhila, I've verified this is fixed in CF11 Update 3 (11,0,03,292245(PreRelease)). Thanks!, -Aaron
Comment by External U.
10206 | November 20, 2014 09:54:48 PM GMT