While doing some work on a project that is currently running on cfmx, but which I'm testing on cf8, this strange error message appeared:
coldfusion.compiler.ASTsimpleVariableReference cannot be cast to java.lang.String
If you get this message, it's basically telling you that somewhere you've passed a variable or object where a string was expected. In my case, it was with a code bug that the previous versions of cf worked with but probably should have thrown an error. What I found was an indexed loop tag with a variable being used for the index. If you think about it, that really doesn't make sense. I don't think the author meant that the actual variable name would change as the loop executed or that it needed to change based on some value passed in.
<cfloop from="1" to="#upperLimit#" index="#myIndex#">
<cfloop from="1" to="#upperLimit#" index="myIndex">
What lead me to look at the loop was the stack trace that came along with the error. I don't know if anything else will cause this error, but the variable for an index string will cause it every time.