tracker issue : CF-4203628

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

GetComponentMetaData - coldfusion.compiler.ASTliteral

| View in Tracker

Status/Resolution/Reason: Closed/Fixed/Fixed

Reporter/Name(from Bugbase): Steve Sommers / ()

Created: 12/03/2018

Components: Language, Struct Functions

Versions: 2018

Failure Type: Incorrectly functioning

Found In Build/Fixed In Build: 2018,0,0,01,311402 / CF2016U11,CF2018U4

Priority/Frequency: Normal / Some users will encounter

Locale/System: / Win 2012 Server x64

Vote Count: 0

Problem Description:
In testing CF-2018 compatibility we came across the following error: "coldfusion.compiler.ASTliteral cannot be cast to coldfusion.compiler.ASTtagAttribute". In further testing and some forum help the error was narrowed down to a specific reference to a call to a user defined queryExecute. Steps to produce below has a cfc. It works as-is, but if you uncomment the code within the bad() declaration, you'll receive the error - and it was very difficult to pinpoint as there is no indication of the actual failed code block within the cfc.

Also, once you're able to duplicate the error, renaming the daoVaultService.queryExecute(... call to daoVaultService.qExecute(... corrects the issue.

Steps to Reproduce:

{code:java}
component {

	variables.daoVaultService = 0;

	public void function good( struct rc ){
	}

	public void function bad( struct rc ){
/*
		local.qOAuthAccess = variables.daoVaultService.queryExecute(
			queryStr="
				SELECT
					[vendorID],
					[oauthVendorAccessID],
					[email],
					[allowAPI],
					[allowDoc],
					[oauthAdmin]
				FROM
					[oauthVendorAccess]
				WHERE
					[email] = ?
			",
			queryParams=[
				{ value="#rc.user.getEmail()#",cfsqltype="CF_SQL_VARCHAR",maxlength="255" }
			],
			module="act_loginPost",
			text="Read delegations" );
*/
	}

}
{code}

Actual Result:
coldfusion.compiler.ASTliteral cannot be cast to coldfusion.compiler.ASTtagAttribute

Expected Result:
The normal GetComponentMetaData structured response. This application works in both CF11 and CF-2016.

Any Workarounds:
Don't use queryExecute as a user defined function name. While this specific error is fairly easy to fix (search and replace .queryExecute with .qExecute and rename the declaration), the concern is other name conflicts.

Attachments:

Comments:

I forgot to mention in steps to produce: The sample cfc must be save and in another module, call GetComponentBetaData( x ) where x references the saved cfc.
Comment by Steve S.
30002 | December 04, 2018 06:25:22 PM GMT
This issue is fixed now. The fix for this issue will be available as part of the next update of ColdFusion 2018.
Comment by Nimit S.
30553 | March 21, 2019 02:39:53 PM GMT