Strange issue with QueryRowData() function after compailing

I encountered strange issue. On lucee versions 5.3.6.61 ( Linux (4.18.0-240.el8.x86_64) 64bit, Apache Tomcat/9.0.35,JAVA: 11.0.7 (AdoptOpenJDK) 64bit), QueryRowData() is working properly with both uncompiled and compiled code. But on lucce version Lucee 5.3.9.133 ( Linux (4.18.0-348.el8.x86_64) 64bit, Apache Tomcat/9.0.62,JAVA: 11.0.15 (Eclipse Adoptium) 64bit) it only works when it is uncompiled; compiled version give noSuchMethod error. I have tried to add uncompiled file into compiled app (both so to say front end, and the backend component with the query), and it haven’t work either. At the end I refactor the function and used returntype=“array” , but I am curious why his was happening? Have anybody else encountered same isssue? Thanks!

@Alek101 Can you please share your test code and full stack trace?

This is trace:
“ERROR”,“http-nio-8888-exec-6”,“02/04/2023”,“11:58:43”,“”,"‘lucee.runtime.type.Struct lucee.runtime.functions.query.QueryRowData.call(lucee.runtime.PageContext, lucee.runtime.type.Query, double)’;lucee.runtime.exp.NativeException: ‘lucee.runtime.type.Struct lucee.runtime.functions.query.QueryRowData.call(lucee.runtime.PageContext, lucee.runtime.type.Query, double)’
at something.something.something_cfm$cf$3y.call(/application/something/something/something.cfm:36)
at lucee.runtime.PageContextImpl._doInclude(PageContextImpl.java:1043)
at lucee.runtime.PageContextImpl._doInclude(PageContextImpl.java:935)
at lucee.runtime.PageContextImpl.doInclude(PageContextImpl.java:916)
at index_cfm$cf$1a.call(/unicredit/index.cfm:480)
at lucee.runtime.PageContextImpl._doInclude(PageContextImpl.java:1043)
at lucee.runtime.PageContextImpl._doInclude(PageContextImpl.java:935)
at lucee.runtime.listener.ClassicAppListener._onRequest(ClassicAppListener.java:65)
at lucee.runtime.listener.MixedAppListener.onRequest(MixedAppListener.java:45)
at lucee.runtime.PageContextImpl.execute(PageContextImpl.java:2475)
at lucee.runtime.PageContextImpl._execute(PageContextImpl.java:2465)
at lucee.runtime.PageContextImpl.executeCFML(PageContextImpl.java:2436)
at lucee.runtime.engine.Request.exe(Request.java:45)
at lucee.runtime.engine.CFMLEngineImpl._service(CFMLEngineImpl.java:1194)
at lucee.runtime.engine.CFMLEngineImpl.serviceCFML(CFMLEngineImpl.java:1140)
at lucee.loader.engine.CFMLEngineWrapper.serviceCFML(CFMLEngineWrapper.java:97)
at lucee.loader.servlet.CFMLServlet.service(CFMLServlet.java:51)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:764)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:227)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:197)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:97)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:541)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:135)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)
at mod_cfml.core.invoke(core.java:180)
at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:687)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:78)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:360)
at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:399)
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:890)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1743)
at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191)
at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.base/java.lang.Thread.run(Unknown Source)
Caused by: java.lang.NoSuchMethodError: ‘lucee.runtime.type.Struct lucee.runtime.functions.query.QueryRowData.call(lucee.runtime.PageContext, lucee.runtime.type.Query, double)’
… 41 more
"
, and I can’t share the code; but there is a function in cfc file with just regular cfquery; and in cfm it is called with createobject(‘component’,‘cfcfile’). Result of the function, which is query is used in QueryRowData function with result.lastrow as second parameter.

@Alek101 is that you are using compiled code from version 5.3.6.61 on 5.3.9?

Because the QueryRowData().call() method return type has changed from “Struct” to “Object” mid of 5.3.8. So the compiled code return type doesn’t match with 5.3.9. That is why this noSuchMethod error occurs.

Compiling the code in 5.3.9 and running the class file on 5.3.9 work fine for me. So you have to recompile the code with that version.

1 Like

That might have happened. Thanks for explanation.

1 Like