Copy link to clipboard
Copied
Copy link to clipboard
Copied
Sergey, as a sanity check, can you simply do a cfdump before the cfquery of the 3 things: this.EnvStruct.Items, this.EnvStruct, and this (in that order), to confirm that what is in them is indeed what you expect? Of course, what matters most is the first, but doing the others after it may be insightful.
Note that depending on other code we can't see, you may need to do more to be able to SEE that cfdump. Let's wait to hear back before proposing solutions to that. (At a minimum, it may help to do a cfabort right before the cfquery, to prevent its error from happening.)
Copy link to clipboard
Copied
Charlie, I saved a dump for 3 objects in files and they have valid structure. I see the error: class coldfusion.runtime.TemplateProxy cannot be cast to class coldfusion.runtime.Struct (coldfusion.runtime.TemplateProxy and coldfusion.runtime.Struct are in unnamed module of loader coldfusion.bootstrap.BootstrapClassLoader @609e57da).
Copy link to clipboard
Copied
@Sergey5C5F , please report a query-of-query bug.
In the meantime, try something like
SELECT *
FROM #this.EnvStruct.Items#
Copy link to clipboard
Copied
Sergey and Charlie, I have similar issue in CF2021:
class coldfusion.runtime.ApplicationScope cannot be cast to class coldfusion.runtime.Struct (coldfusion.runtime.ApplicationScope and coldfusion.runtime.Struct are in unnamed module of loader coldfusion.bootstrap.BootstrapClassLoader @1ddc6db2) |
Also code analyzer show error of system function CreateObject.We are not using "corba" our script:
<cfset request.Initialize = createObject("component","initialize")>
Copy link to clipboard
Copied
The error you have shown ("class coldfusion.runtime.ApplicationScope cannot be cast to class coldfusion.runtime.Struct") is incompatible with the code
<cfset request.Initialize = createObject("component","initialize")>
Is there a file named initialize.cfc in the current directory?