tracker issue : CF-4158130

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

GetApplicationMetaData() sometimes returns data from a different application

| View in Tracker

Status/Resolution/Reason: Closed/Withdrawn/Duplicate

Reporter/Name(from Bugbase): Richard Davies / Richard Davies (Richard Davies)

Created: 05/26/2016

Components: Core Runtime

Versions: 10.0

Failure Type:

Found In Build/Fixed In Build: Final /

Priority/Frequency: Major / Some users will encounter

Locale/System: English / Win 2008 Server R2 64 bit

Vote Count: 0

Duplicate ID:	CF-4155785

Problem Description:

GetApplicationMetaData() is supposed to return a struct containing metadata properties of the current application, but sometimes it returns data from a different application. When this happens, the properties such as name and sessionManagement, etc. are incorrect.


Steps to Reproduce:

Run this code multiple times and look for odd behavior. The behavior is not consistent and I have not been able to determine exactly what condition(s) cause it to return data from the wrong application, but it seems to happen more frequently right after I update the .cfm file or when I first access the page (so maybe it has something to do with when CF compiles the code into Java bytecode or initializes the application, etc.)

<cfapplication name="sessiontest" sessionmanagement="true" />

<cfscript>
	public Boolean function isPersistentDataEnabled() {
		if (ListFirst(server.coldfusion.productversion,",") GTE 10) {
			return getApplicationMetaData().sessionManagement; // CF10 compatible
		} else {
			return application.getApplicationSettings().sessionManagement;
		}
	}

</cfscript>

<cfoutput>
	<cfset Session.test = "Session exists">

	<cfdump var="#Application#">
	#isPersistentDataEnabled()#
	<cfdump var="#getApplicationMetaData()#">
	<cfdump var="#Session#">
</cfoutput>


Actual Result:

getApplicationMetaData().name = "PortlandOnline"
getApplicationMetaData().sessionManagement = "NO"

(See attached screenshot)


Expected Result:

getApplicationMetaData().name = "sessiontest"
getApplicationMetaData().sessionManagement = "YES"

(See attached screenshot)


Any Workarounds:

Unknown.

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

Watson Bug ID:	4158130

External Customer Info:
External Company:  
External Customer Name: Richard Davies
External Customer Email:  
External Test Config: My Hardware and Environment details:



System Information

Server Details

Server Product 	ColdFusion

Version 	10,0,19,298511

Tomcat Version 	7.0.68.0

Edition 	Enterprise  

Operating System 	Windows Server 2008 R2  

OS Version 	6.1  

Update Level 	/D:/Applications/CFusion/cfusion/lib/updates/chf10000019.jar  

Adobe Driver Version 	4.1 (Build 0001)  

JVM Details

Java Version 	1.7.0_15  

Java Vendor 	Oracle Corporation





The sessiontest.cfm file I used for this test is located in our IISRoot\PortlandOregon directory, which also contains an application.cfm that defines a "PortlandOregon" application. The "PortlandOnline" application is defined in IISRoot\PortlandOnline\application.cfm. The ColdFusion administrator has a mapping that maps "/" to "IISRoot/PortlandOnline". So for whatever reason, GetApplicationMetaData() in sessiontest.cfm sometimes doesn't return data for the sessiontest application, or even the PortlandOregon application, but is instead returning data for the PortlandOnline application.

Attachments:

  1. May 27, 2016 00:00:00: 1_actual.png
  2. May 27, 2016 00:00:00: 2_expected.png

Comments:

Hi Richard, I tried the repro case given in this bug, but I am not facing this issue. Please share the server settings pdf to further investigate this issue.
Comment by Nimit S.
2625 | May 30, 2016 12:36:20 AM GMT
Sorry, I'm not exactly sure what you mean by "server settings pdf"... can you please explain in more detail what information you want?
Comment by External U.
2626 | May 31, 2016 02:49:29 PM GMT
Richard, Sorry, its settings summary. To generate settings summary pdf follow below mentioned steps: 1. Login into CF Admin. 2. Navigate to Server Settings > Settings Summary 3. Click on button "Save as PDF" on top right corner. Thanks, Nimit
Comment by Nimit S.
2627 | June 01, 2016 12:05:58 AM GMT
Since that information contains some sensitive data (server names, IP addresses, usernames, etc.) I'd rather not make public, is there a way I can submit that information other than uploading it to this public ticket? Can I email you the information?
Comment by External U.
2628 | June 01, 2016 03:09:41 PM GMT
Sure Richard. You can send the information at nimsharm@adobe.com
Comment by Nimit S.
2629 | June 06, 2016 11:40:11 AM GMT
Thank you. I've emailed you a requested information.
Comment by External U.
2630 | June 06, 2016 02:09:59 PM GMT
Richard, This is a duplicate of bug #CF-4155785. So, I am closing it. The fix for this issue will be available as part of an upcoming update of ColdFusion 10.
Comment by Nimit S.
2631 | August 10, 2016 04:52:05 AM GMT