• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

CF-2018:coldfusion.compiler.ASTliteral cannot be cast to coldfusion.compiler.ASTtagAttribute

Advocate ,
Nov 28, 2018 Nov 28, 2018

Copy link to clipboard

Copied

We're trying out CF-2018 with an application that uses FrameWork/1 and one of the first thing we have hit is:

coldfusion.compiler.ASTliteral cannot be cast to coldfusion.compiler.ASTtagAttribute

The error occurred in ...\framework\one.cfc: line 1842

Called from ...\framework\one.cfc: line 1869

Called from ...\framework\one.cfc: line 260

Called from ...\framework\one.cfc: line 2967

Called from ...\framework\one.cfc: line 991

1839: private string function normalizeQueryString( any queryString ) {

1840: // if queryString is a struct, massage it into a string

1841: if ( isStruct( queryString ) && structCount( queryString ) ) {

1842: var q = '';

1843: for( var key in queryString ) {

1844: if ( isSimpleValue( queryString[key] ) ) {

I've googled and found no references to "coldfusion ASTliteral ". Help.

Views

768

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 28, 2018 Nov 28, 2018

Copy link to clipboard

Copied

My guess is that you have a "var" declaration inside the "if" condition. Declarations for local variables are, if I recall correctly, supposed to be located directly after the function declaration.

Dave Watts, Fig Leaf Software

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
Nov 28, 2018 Nov 28, 2018

Copy link to clipboard

Copied

I think that was the case in CF9 and maybe 11. I know the var declaration could be at the beginning of any block in 2016. I would be disappointed if 2018 went backwards. I'll do some code tweaks and see if that is indeed the issue and I'll let everyone know. Thanks.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
Nov 28, 2018 Nov 28, 2018

Copy link to clipboard

Copied

LATEST

Update: Nope. I moved the var to the top of the function and the compiler squawks with the same error but now on the if() statement that was moved down due to the var line moving up. Now I'm wondering if there is a module/cfc size limit in 2018 that I'm running into? Here is the stack trace for anyone that is more fluent in stacktrace than me:

java.lang.ClassCastException: coldfusion.compiler.ASTliteral cannot be cast to coldfusion.compiler.ASTtagAttribute

at coldfusion.compiler.ExprAssembler.assembleFuncParams(ExprAssembler.java:1369)

at coldfusion.compiler.ExprAssembler.assembleFuncParams(ExprAssembler.java:1355)

at coldfusion.compiler.ExprAssembler.invoke(ExprAssembler.java:1321)

at coldfusion.compiler.ExprAssembler._assembleExpr(ExprAssembler.java:508)

at coldfusion.compiler.ExprAssembler.assembleExpr(ExprAssembler.java:562)

at coldfusion.compiler.ExprAssembler.cast(ExprAssembler.java:1762)

at coldfusion.compiler.StmtAssembler.cast(StmtAssembler.java:759)

at coldfusion.compiler.ExprAssembler._assembleExpr(ExprAssembler.java:270)

at coldfusion.compiler.ExprAssembler.assembleExpr(ExprAssembler.java:562)

at coldfusion.compiler.ExprAssembler.assignStruct(ExprAssembler.java:1580)

at coldfusion.compiler.ExprAssembler.assignStatement(ExprAssembler.java:1493)

at coldfusion.compiler.StmtAssembler.assignStatement(StmtAssembler.java:545)

at coldfusion.compiler.StmtAssembler.assembleStatement(StmtAssembler.java:359)

at coldfusion.compiler.FunctionAssembler.assembleStatement(FunctionAssembler.java:327)

at coldfusion.compiler.StmtAssembler.block(StmtAssembler.java:262)

at coldfusion.compiler.StmtAssembler.assembleStatement(StmtAssembler.java:334)

at coldfusion.compiler.FunctionAssembler.assembleStatement(FunctionAssembler.java:327)

at coldfusion.compiler.StmtAssembler.block(StmtAssembler.java:258)

at coldfusion.compiler.StmtAssembler.cfif(StmtAssembler.java:3364)

at coldfusion.compiler.StmtAssembler.assembleStatement(StmtAssembler.java:364)

at coldfusion.compiler.FunctionAssembler.assembleStatement(FunctionAssembler.java:327)

at coldfusion.compiler.StmtAssembler.block(StmtAssembler.java:262)

at coldfusion.compiler.FunctionAssembler.function(FunctionAssembler.java:241)

at coldfusion.compiler.FunctionAssembler.assemble(FunctionAssembler.java:135)

at coldfusion.compiler.TemplateAssembler.assembleFunctions(TemplateAssembler.java:492)

at coldfusion.compiler.TemplateAssembler.assemble(TemplateAssembler.java:183)

at coldfusion.compiler.NeoTranslator.translateJava(NeoTranslator.java:410)

at coldfusion.compiler.NeoTranslator.translateJava(NeoTranslator.java:160)

at coldfusion.runtime.TemplateClassLoader$TemplateCache$1.fetch(TemplateClassLoader.java:478)

at coldfusion.util.LruCache.get(LruCache.java:180)

at coldfusion.runtime.TemplateClassLoader$TemplateCache.fetchSerial(TemplateClassLoader.java:404)

at coldfusion.util.AbstractCache.fetch(AbstractCache.java:58)

at coldfusion.util.SoftCache.get_statsOff(SoftCache.java:142)

at coldfusion.util.SoftCache.get(SoftCache.java:81)

at coldfusion.runtime.TemplateClassLoader.findClass(TemplateClassLoader.java:672)

at coldfusion.runtime.TemplateClassLoader.newInstance(TemplateClassLoader.java:609)

at coldfusion.runtime.TemplateClassLoader.newInstance(TemplateClassLoader.java:592)

at coldfusion.runtime.TemplateProxyFactory.getCFCInstance(TemplateProxyFactory.java:284)

at coldfusion.runtime.TemplateProxyFactory.resolveName(TemplateProxyFactory.java:177)

at coldfusion.runtime.TemplateProxyFactory.resolveName(TemplateProxyFactory.java:162)

at coldfusion.runtime.TemplateProxyFactory.resolveName(TemplateProxyFactory.java:152)

at coldfusion.cfc.ComponentProxyFactory.getProxy(ComponentProxyFactory.java:74)

at coldfusion.cfc.ComponentProxyFactory.getProxy(ComponentProxyFactory.java:56)

at coldfusion.runtime.CFPage.CreateObject(CFPage.java:8107)

at coldfusion.runtime.CFPage.CreateObject(CFPage.java:8126)

at cfone2ecfc936010325$funcGETCACHEDCONTROLLER.runFunction(D:\Shift4\myportal\pub\framework\one.cfc:1842)

at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:552)

at coldfusion.runtime.UDFMethod$ReturnTypeFilter.invoke(UDFMethod.java:483)

at coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.java:446)

at coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:95)

at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:397)

at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:370)

at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:286)

at coldfusion.runtime.CfJspPage._invokeUDF(CfJspPage.java:3928)

at coldfusion.runtime.CfJspPage._invokeUDF(CfJspPage.java:3908)

at cfone2ecfc936010325$funcGETCONTROLLER.runFunction(D:\Shift4\myportal\pub\framework\one.cfc:1869)

at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:552)

at coldfusion.runtime.UDFMethod$ReturnTypeFilter.invoke(UDFMethod.java:483)

at coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.java:446)

at coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:95)

at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:397)

at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:370)

at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:597)

at coldfusion.runtime.CfJspPage._invokeUDF(CfJspPage.java:3869)

at coldfusion.runtime.CfJspPage._invokeUDF(CfJspPage.java:3850)

at cfone2ecfc936010325$funcCONTROLLER.runFunction(D:\Shift4\myportal\pub\framework\one.cfc:260)

at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:552)

at coldfusion.runtime.UDFMethod$ReturnTypeFilter.invoke(UDFMethod.java:483)

at coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.java:446)

at coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:95)

at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:397)

at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:370)

at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:286)

at coldfusion.runtime.CfJspPage._invokeUDF(CfJspPage.java:3928)

at coldfusion.runtime.CfJspPage._invokeUDF(CfJspPage.java:3908)

at cfone2ecfc936010325$funcSETUPREQUESTWRAPPER.runFunction(D:\Shift4\myportal\pub\framework\one.cfc:2968)

at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:552)

at coldfusion.runtime.UDFMethod$ReturnTypeFilter.invoke(UDFMethod.java:483)

at coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.java:446)

at coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:95)

at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:397)

at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:370)

at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:286)

at coldfusion.runtime.CfJspPage._invokeUDF(CfJspPage.java:3928)

at coldfusion.runtime.CfJspPage._invokeUDF(CfJspPage.java:3908)

at cfone2ecfc936010325$funcONREQUESTSTART.runFunction(D:\Shift4\myportal\pub\framework\one.cfc:991)

at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:552)

at coldfusion.runtime.UDFMethod$ReturnTypeFilter.invoke(UDFMethod.java:483)

at coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.java:446)

at coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:95)

at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:397)

at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:370)

at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:286)

at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:818)

at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:601)

at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:426)

at coldfusion.runtime.AppEventInvoker.invoke(AppEventInvoker.java:115)

at coldfusion.runtime.AppEventInvoker.onRequestStart(AppEventInvoker.java:286)

at coldfusion.filter.ApplicationFilter.invoke(ApplicationFilter.java:493)

at coldfusion.filter.RequestMonitorFilter.invoke(RequestMonitorFilter.java:43)

at coldfusion.filter.MonitoringFilter.invoke(MonitoringFilter.java:40)

at coldfusion.filter.PathFilter.invoke(PathFilter.java:162)

at coldfusion.filter.IpFilter.invoke(IpFilter.java:45)

at coldfusion.filter.ExceptionFilter.invoke(ExceptionFilter.java:96)

at coldfusion.filter.ClientScopePersistenceFilter.invoke(ClientScopePersistenceFilter.java:28)

at coldfusion.filter.BrowserFilter.invoke(BrowserFilter.java:38)

at coldfusion.filter.NoCacheFilter.invoke(NoCacheFilter.java:60)

at coldfusion.filter.GlobalsFilter.invoke(GlobalsFilter.java:38)

at coldfusion.filter.DatasourceFilter.invoke(DatasourceFilter.java:22)

at coldfusion.filter.CachingFilter.invoke(CachingFilter.java:62)

at coldfusion.CfmServlet.service(CfmServlet.java:226)

at coldfusion.bootstrap.BootstrapServlet.service(BootstrapServlet.java:311)

at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)

at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)

at coldfusion.monitor.event.MonitoringServletFilter.doFilter(MonitoringServletFilter.java:46)

at coldfusion.bootstrap.BootstrapFilter.doFilter(BootstrapFilter.java:47)

at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)

at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)

at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)

at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)

at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)

at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:199)

at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)

at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:491)

at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139)

at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)

at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)

at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:357)

at org.apache.coyote.ajp.AjpProcessor.service(AjpProcessor.java:422)

at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)

at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:764)

at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1388)

at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)

at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)

at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)

at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)

at java.base/java.lang.Thread.run(Unknown Source)

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation