Application Running on 4.5 Upgrade to 5 -- ExpressionAsStatement cannot be cast to TagComponent

I have an application which runs fine on 4.5 but am having issues getting
the application to run once I get things running with 5x. Rest of the stack
is the same, but only changing Ansible variables to enable 5x jar install.

Would anyone be able to give me a hint as to what might be causing this?
This hits on our index.cfm which boots the entire application.

lucee.transformer.bytecode.statement.ExpressionAsStatement cannot be cast

to lucee.transformer.bytecode.statement.tag.TagComponent

lucee.runtime.exp.NativeException:> lucee.transformer.bytecode.statement.ExpressionAsStatement cannot be cast

to lucee.transformer.bytecode.statement.tag.TagComponent at
lucee.transformer.cfml.script.AbstrCFMLScriptTransformer.componentStatement(AbstrCFMLScriptTransformer.java:481)
at
lucee.transformer.cfml.script.AbstrCFMLScriptTransformer.statement(AbstrCFMLScriptTransformer.java:236)
at
lucee.transformer.cfml.script.AbstrCFMLScriptTransformer.statement(AbstrCFMLScriptTransformer.java:215)
at
lucee.transformer.cfml.script.AbstrCFMLScriptTransformer.statements(AbstrCFMLScriptTransformer.java:198)
at
lucee.transformer.cfml.script.AbstrCFMLScriptTransformer.block(AbstrCFMLScriptTransformer.java:2185)
at
lucee.transformer.cfml.script.AbstrCFMLScriptTransformer.statement(AbstrCFMLScriptTransformer.java:239)
at
lucee.transformer.cfml.script.AbstrCFMLScriptTransformer.ifStatement(AbstrCFMLScriptTransformer.java:269)
at
lucee.transformer.cfml.script.AbstrCFMLScriptTransformer.statement(AbstrCFMLScriptTransformer.java:223)
at
lucee.transformer.cfml.script.AbstrCFMLScriptTransformer.statement(AbstrCFMLScriptTransformer.java:215)
at
lucee.transformer.cfml.script.AbstrCFMLScriptTransformer.statements(AbstrCFMLScriptTransformer.java:198)
at
lucee.transformer.cfml.script.AbstrCFMLScriptTransformer.block(AbstrCFMLScriptTransformer.java:2185)
at
lucee.transformer.cfml.script.AbstrCFMLScriptTransformer.statement(AbstrCFMLScriptTransformer.java:239)
at
lucee.transformer.cfml.script.AbstrCFMLScriptTransformer.ifStatement(AbstrCFMLScriptTransformer.java:269)
at
lucee.transformer.cfml.script.AbstrCFMLScriptTransformer.statement(AbstrCFMLScriptTransformer.java:223)
at
lucee.transformer.cfml.script.AbstrCFMLScriptTransformer.statement(AbstrCFMLScriptTransformer.java:215)
at
lucee.transformer.cfml.script.AbstrCFMLScriptTransformer.statements(AbstrCFMLScriptTransformer.java:198)
at
lucee.transformer.cfml.script.AbstrCFMLScriptTransformer.block(AbstrCFMLScriptTransformer.java:2185)
at
lucee.transformer.cfml.script.AbstrCFMLScriptTransformer.statement(AbstrCFMLScriptTransformer.java:239)
at
lucee.transformer.cfml.script.AbstrCFMLScriptTransformer.ifStatement(AbstrCFMLScriptTransformer.java:269)
at
lucee.transformer.cfml.script.AbstrCFMLScriptTransformer.statement(AbstrCFMLScriptTransformer.java:223)
at
lucee.transformer.cfml.script.AbstrCFMLScriptTransformer.statement(AbstrCFMLScriptTransformer.java:215)
at
lucee.transformer.cfml.script.AbstrCFMLScriptTransformer.statements(AbstrCFMLScriptTransformer.java:198)
at
lucee.transformer.cfml.script.AbstrCFMLScriptTransformer.block(AbstrCFMLScriptTransformer.java:2185)
at
lucee.transformer.cfml.script.AbstrCFMLScriptTransformer.statement(AbstrCFMLScriptTransformer.java:239)
at
lucee.transformer.cfml.script.AbstrCFMLScriptTransformer.ifStatement(AbstrCFMLScriptTransformer.java:269)
at
lucee.transformer.cfml.script.AbstrCFMLScriptTransformer.statement(AbstrCFMLScriptTransformer.java:223)
at
lucee.transformer.cfml.script.AbstrCFMLScriptTransformer.statement(AbstrCFMLScriptTransformer.java:215)
at
lucee.transformer.cfml.script.AbstrCFMLScriptTransformer.statements(AbstrCFMLScriptTransformer.java:198)
at
lucee.transformer.cfml.script.AbstrCFMLScriptTransformer.statements(AbstrCFMLScriptTransformer.java:182)
at
lucee.transformer.cfml.script.CFMLScriptTransformer.transform(CFMLScriptTransformer.java:54)
at lucee.transformer.cfml.tag.CFMLTransformer.tag(CFMLTransformer.java:632)
at
lucee.transformer.cfml.tag.CFMLTransformer.body(CFMLTransformer.java:362)
at
lucee.transformer.cfml.tag.CFMLTransformer.transform(CFMLTransformer.java:302)
at
lucee.transformer.cfml.tag.CFMLTransformer.transform(CFMLTransformer.java:149)
at
lucee.runtime.compiler.CFMLCompilerImpl._compile(CFMLCompilerImpl.java:126)
at
lucee.runtime.compiler.CFMLCompilerImpl.compile(CFMLCompilerImpl.java:74)
at lucee.runtime.PageSourceImpl._compile(PageSourceImpl.java:360) at
lucee.runtime.PageSourceImpl.compile(PageSourceImpl.java:327) at
lucee.runtime.PageSourceImpl.loadPhysical(PageSourceImpl.java:280) at
lucee.runtime.PageSourceImpl.loadPageThrowTemplateException(PageSourceImpl.java:181)
at lucee.runtime.PageSourceImpl.loadPage(PageSourceImpl.java:884) at
lucee.runtime.PageContextImpl._doInclude(PageContextImpl.java:913) at
lucee.runtime.PageContextImpl.doInclude(PageContextImpl.java:833) at
lucee.runtime.PageContextImpl.doInclude(PageContextImpl.java:828) at
lucee.runtime.listener.ModernAppListener._onRequest(ModernAppListener.java:226)
at
lucee.runtime.listener.MixedAppListener.onRequest(MixedAppListener.java:43)
at lucee.runtime.PageContextImpl.execute(PageContextImpl.java:2293) at
lucee.runtime.PageContextImpl._execute(PageContextImpl.java:2284) at
lucee.runtime.PageContextImpl.executeCFML(PageContextImpl.java:2252) at
lucee.runtime.engine.CFMLEngineImpl.serviceCFML(CFMLEngineImpl.java:891) at
lucee.loader.engine.CFMLEngineWrapper.serviceCFML(CFMLEngineWrapper.java:103)
at lucee.loader.servlet.CFMLServlet.service(CFMLServlet.java:62) at
javax.servlet.http.HttpServlet.service(HttpServlet.java:731) at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:221)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:505)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:169)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
at org.apache.catalina.valves.RemoteIpValve.invoke(RemoteIpValve.java:683)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:436)
at
org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1078)
at
org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:625)
at
org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:316)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at
org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:745) Caused by:
java.lang.ClassCastException:
lucee.transformer.bytecode.statement.ExpressionAsStatement cannot be cast
to lucee.transformer.bytecode.statement.tag.TagComponent … 73 more

I’m running into the same thing now. Do you recall what your resolution was?

Is your code in a compiled archive or is it deployed as source code?

Was implementing cfchris’s Relaxation. Posted the issue to the github repository for Relation.
GetHTTPRequestData() takes arguments in ACF but can’t take arguments in Lucee.

What does the argument specify?

You can open a compatibility issue in JIRA and we will look into it:
https://luceeserver.atlassian.net/secure/Dashboard.jspa

https://luceeserver.atlassian.net/browse/LDEV-1481