Surf 11 » ASTsimpleVariableReference Error

Finding the best waves on the web.

Ever get this error with ColdFusion?

Error casting an object of type coldfusion.compiler.ASTsimpleVariableReference to an incompatible type. This usually indicates a programming error in Java, although it could also mean you have tried to use a foreign object in a different way than it was designed.
java.lang.ClassCastException: coldfusion.compiler.ASTsimpleVariableReference
	at coldfusion.compiler.StmtAssembler.createCFloopIndexVariable(StmtAssembler.java:2020)
	at coldfusion.compiler.StmtAssembler.cfloopList(StmtAssembler.java:1838)
	at coldfusion.compiler.StmtAssembler.cfloop(StmtAssembler.java:1687)
	at coldfusion.compiler.StmtAssembler.assembleStatement(StmtAssembler.java:284)
	at coldfusion.compiler.TemplateAssembler.assembleStatement(TemplateAssembler.java:238)
	at coldfusion.compiler.StmtAssembler.block(StmtAssembler.java:201)
	at coldfusion.compiler.TemplateAssembler.assemblePage(TemplateAssembler.java:200)
	at coldfusion.compiler.TemplateAssembler.assemble(TemplateAssembler.java:77)
	at coldfusion.compiler.NeoTranslator.translateJava(NeoTranslator.java:316)
	at coldfusion.compiler.NeoTranslator.translateJava(NeoTranslator.java:119)
	at coldfusion.runtime.TemplateClassLoader$1.fetch(TemplateClassLoader.java:310)
	at coldfusion.util.LruCache.get(LruCache.java:180)
	at coldfusion.runtime.TemplateClassLoader$TemplateCache.fetchSerial(TemplateClassLoader.java:254)
	at coldfusion.util.AbstractCache.fetch(AbstractCache.java:58)
	at coldfusion.util.SoftCache.get(SoftCache.java:81)
	at coldfusion.runtime.TemplateClassLoader.findClass(TemplateClassLoader.java:476)
	at coldfusion.filter.PathFilter.invoke(PathFilter.java:79)
	at coldfusion.filter.LicenseFilter.invoke(LicenseFilter.java:27)
	at coldfusion.filter.ExceptionFilter.invoke(ExceptionFilter.java:70)
	at coldfusion.filter.ClientScopePersistenceFilter.invoke(ClientScopePersistenceFilter.java:28)
	at coldfusion.filter.BrowserFilter.invoke(BrowserFilter.java:38)
	at coldfusion.filter.NoCacheFilter.invoke(NoCacheFilter.java:46)
	at coldfusion.filter.GlobalsFilter.invoke(GlobalsFilter.java:38)
	at coldfusion.filter.DatasourceFilter.invoke(DatasourceFilter.java:22)
	at coldfusion.CfmServlet.service(CfmServlet.java:175)
	at coldfusion.bootstrap.BootstrapServlet.service(BootstrapServlet.java:89)
	at jrun.servlet.FilterChain.doFilter(FilterChain.java:86)
	at coldfusion.monitor.event.MonitoringServletFilter.doFilter(MonitoringServletFilter.java:42)
	at coldfusion.bootstrap.BootstrapFilter.doFilter(BootstrapFilter.java:46)
	at jrun.servlet.FilterChain.doFilter(FilterChain.java:94)
	at jrun.servlet.FilterChain.service(FilterChain.java:101)
	at jrun.servlet.ServletInvoker.invoke(ServletInvoker.java:106)
	at jrun.servlet.JRunInvokerChain.invokeNext(JRunInvokerChain.java:42)
	at jrun.servlet.JRunRequestDispatcher.invoke(JRunRequestDispatcher.java:286)
	at jrun.servlet.ServletEngineService.dispatch(ServletEngineService.java:543)
	at jrun.servlet.jrpp.JRunProxyService.invokeRunnable(JRunProxyService.java:203)
	at jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRunnable(ThreadPool.java:428)
	at jrunx.scheduler.WorkerThread.run(WorkerThread.java:66)

It is caused when you put a variable with pound signs where it is expecting a variable name. For example this code with throw this exception:

<cfloop list="#list#" item="#item#"></cfloop>

The #item# should just be item



Related Entries
Name:

Email: (optional, not displayed on site)
   Subscribe to this thread
Comments: (html will be escaped)



Subscribe to our RSS Feed: subscribe to this feed XML
Archives   Tags   Contact