SixFive...

ColdFusion.Compiler says what?

I have just been testing our applications on the new ColdFusion 8 and everything was running fine until I tried to process a couple of payments through a test gateway on our ecommmerce modules. We mostly integrate using the XML method provided by the gateway, and therefore have to do some manipulation on the XML […]
July 26, 2007 5:24 am

ColdFusion.Compiler says what?

I have just been testing our applications on the new ColdFusion 8 and everything was running fine until I tried to process a couple of payments through a test gateway on our ecommmerce modules.

We mostly integrate using the XML method provided by the gateway, and therefore have to do some manipulation on the XML once its returned to be able to get some information out.
When I ran this code on ColdFusion 8 however I was hitting this error:

coldfusion.compiler.ASTsimpleVariableReference cannot be cast to java.lang.String

Thanks to Mike Rankin here for blogging about this and letting me know that because the loop that is running over the ColdFusion XML object is using a variable in the index, this loop was throwing an error that it didnt used to in previous versions of CF.

So CF is expecting a string but we have passed it an object or a variable. Using Mikes Example:

BAD

<cfloop from="1" to="#upperLimit#" index="myIndex">

GOOD

<cfloop from="1" to="#upperLimit#" index="#myIndex#"> 

Leave a Comment