tracker issue : CF-4169935

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

Variable <cached_result_set_of_cfquery> is undefined

| View in Tracker

Status/Resolution/Reason: Closed/Fixed/

Reporter/Name(from Bugbase): Hee Lee / Hee Lee (Hee Lee)

Created: 06/30/2016

Components: Caching

Versions: 11.0

Failure Type: Crash

Found In Build/Fixed In Build: CF11_Final /

Priority/Frequency: Critical / All users will encounter

Locale/System: English / Windows 7 SP1

Vote Count: 0

Problem Description:

Application.cfc:
...
<cfset application.gateway.gwFrqntData = createObject("component","#application.cfcpath.gateway#.FrqntDataGW").init()>
...

FrqntDataGW.cfc:
<cfcomponent>
<cfquery name="rsSiteCdLst" datasource="#application.datasource#" cachedwithin="#CreateTimeSpan(1,0,0,0)#" >
select distinct OfficeCode as sitecd
from view_office
order by OfficeCode		
</cfquery>
</cfcomponent>

Steps to Reproduce: Not able to reproduce

Actual Result: Exception as follows:
Message: Variable RSSITECDLST is undefined.
StackTrace: coldfusion.runtime.UndefinedVariableException: Variable RSSITECDLST is undefined. at coldfusion.runtime.CfJspPage._get(CfJspPage.java:314) at coldfusion.runtime.CfJspPage._get(CfJspPage.java:298) at coldfusion.runtime.CfJspPage._autoscalarize(CfJspPage.java:1532) at coldfusion.runtime.CfJspPage._autoscalarize(CfJspPage.java:1494) at cfFrqntDataGW2ecfc1824034440$funcINIT._factor1(D:\WEB_APPS\ITAMS\gateway\FrqntDataGW.cfc:66) at cfFrqntDataGW2ecfc1824034440$funcINIT.runFunction(D:\WEB_APPS\ITAMS\gateway\FrqntDataGW.cfc:10) at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:487) at coldfusion.filter.SilentFilter.invoke(SilentFilter.java:47) at coldfusion.runtime.UDFMethod$ReturnTypeFilter.invoke(UDFMethod.java:420) at coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.java:383) at coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:95) at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:334) at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:231) at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:643) at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:432) at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:402) at coldfusion.runtime.CfJspPage._invoke(CfJspPage.java:2483) at cfapplication2ecfc799244199$funcONAPPLICATIONSTART.runFunction(D:\WEB_APPS\ITAMS\application.cfc:243) at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:487) at coldfusion.filter.SilentFilter.invoke(SilentFilter.java:47) at coldfusion.runtime.UDFMethod$ReturnTypeFilter.invoke(UDFMethod.java:420) at coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.java:383) at coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:95) at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:334) at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:231) at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:643) at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:432) at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:402) ... See the attached text file for the entire stacktrace

Expected Result: Should retrieve a list of site codes in the query called RSSITECDLST.

Any Workarounds: 
We protected the query result into cache region as follows:

<cfset rsSiteCdLst = cacheGet("APP_rsSiteCdLst", application.cacheRegion)>
<cfif Not isDefined("rsSiteCdLst") or isNull(rsSiteCdLst)>
<cfquery name="rsSiteCdLst" datasource="#application.datasource#" cachedwithin="#CreateTimeSpan(1,0,0,0)#" cacheRegion="#application.cacheRegion#" cacheID="APP_rsSiteCdLst">
	select distinct OfficeCode as sitecd
	from view_office
	order by OfficeCode		
</cfquery>
</cfif>

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

Watson Bug ID:	4169935

External Customer Info:
External Company:  
External Customer Name: Hee Lee
External Customer Email:  
External Test Config: My Hardware and Environment details:

Attachments:

Comments:

Could you please provide the code snippet that you used to dump the result.I tried above code , it is working for me. Also let me know the CF 11 update version you are on.
Comment by Poonam J.
2258 | July 05, 2016 05:13:43 AM GMT
The code works 99 percent of all time, but it fails once in a while. There is no way to reproduce the behavior and we can't figure out why it occurs. But the workaround we came up with corrected the behavior.
Comment by External U.
2259 | July 13, 2016 07:00:42 AM GMT
Hi, Have you tested the fix provided, did it work?
Comment by Poonam J.
2260 | July 14, 2016 09:04:03 PM GMT
@Hee : Any update on the fix provided?
Comment by Poonam J.
2261 | July 19, 2016 03:28:24 AM GMT
No Updates from customer..Closing this track.
Comment by Poonam J.
2262 | July 31, 2016 09:25:26 PM GMT
I am sorry I could not get back to you. In the track, 'fix provided' was mentioned. Where is it included? A CF patch or snipet of code? Or CF release?
Comment by External U.
2263 | August 01, 2016 05:34:20 AM GMT
Hi Hee Lee, A private patch is sent to you by Mike Collins. Please check with him.
Comment by Anit K.
2264 | August 15, 2016 07:39:21 AM GMT