tracker issue : CF-4203628

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

GetComponentMetaData - coldfusion.compiler.ASTliteral

| View in Tracker

Status/Resolution/Reason: Open//

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

Created: 12/03/2018

Components: Functions, Structures

Versions: 13.0

Failure Type: Incorrectly functioning

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

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:
component {

	variables.daoVaultService = 0;

	public void function good( struct rc ){

	public void function bad( struct rc ){
		local.qOAuthAccess = variables.daoVaultService.queryExecute(
					[email] = ?
				{ value="#rc.user.getEmail()#",cfsqltype="CF_SQL_VARCHAR",maxlength="255" }
			text="Read delegations" );


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.



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 Sommers
30002 | December 04, 2018 06:25:22 PM GMT