The statement may not return any results sometimes and this is perfectly normal. In my JavaScript event, the call to fetchTable() is encapsulated with a try catch block so the user never sees an error but the server error log records the error:
Code: Select all
Wed Jun 22 13:54:57: ERROR The executeQuery method must return a result set.
java.sql.SQLException: The executeQuery method must return a result set.
at net.sourceforge.jtds.jdbc.JtdsStatement.executeSQLQuery(JtdsStatement.java:488)
at net.sourceforge.jtds.jdbc.JtdsPreparedStatement.executeQuery(JtdsPreparedStatement.java:776)
at org.enhydra.jdbc.core.CorePreparedStatement.executeQuery(CorePreparedStatement.java:92)
at com.ebasetech.ufs.runtime.resources.RuntimeDBSource.fetchTableUsingPreparedStatement(RuntimeDBSource.java:1228)
at com.ebasetech.ufs.runtime.resources.RuntimeDBSource.fetchTable(RuntimeDBSource.java:1146)
at com.ebasetech.ufs.runtime.RuntimeTableField.fetchTable(RuntimeTableField.java:509)
at com.ebasetech.ufs.runtime.RuntimeTableField.fetchTable(RuntimeTableField.java:461)
at com.ebasetech.ufs.runtime.external.api.impl.ApiTableBase.fetchTable(ApiTableBase.java:126)
at com.ebasetech.ufs.runtime.external.api.impl.ApiTableBase.fetchTable(ApiTableBase.java:118)
at sun.reflect.GeneratedMethodAccessor920.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.mozilla.javascript.MemberBox.invoke(MemberBox.java:126)
at org.mozilla.javascript.NativeJavaMethod.call(NativeJavaMethod.java:225)
at org.mozilla.javascript.Interpreter.interpretLoop(Interpreter.java:1479)
at org.mozilla.javascript.Interpreter.interpret(Interpreter.java:815)
at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:109)
at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:393)
at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3280)
at org.mozilla.javascript.Context.callFunctionWithContinuations(Context.java:1284)
at org.mozilla.javascript.Context.executeScriptWithContinuations(Context.java:1251)
at com.ebasetech.ufs.runtime.events.rhinojavascript.JavascriptExecutionHandler.execute(JavascriptExecutionHandler.java:270)
at com.ebasetech.ufs.runtime.events.JVMScriptNode.execute_(JVMScriptNode.java:133)
at com.ebasetech.ufs.runtime.events.JVMScriptNode.execute(JVMScriptNode.java:99)
at com.ebasetech.ufs.runtime.events.RunnableContext.execute(RunnableContext.java:69)
at com.ebasetech.ufs.runtime.events.SuspendableExecutable.execute(SuspendableExecutable.java:47)
at com.ebasetech.ufs.runtime.events.SuspendableContainerExecutable.execute(SuspendableContainerExecutable.java:26)
at com.ebasetech.ufs.runtime.events.BaseEventNode.execute(BaseEventNode.java:32)
at com.ebasetech.ufs.runtime.events.RunnableContext.execute(RunnableContext.java:69)
at com.ebasetech.ufs.runtime.events.SuspendableExecutable.execute(SuspendableExecutable.java:47)
at com.ebasetech.ufs.runtime.events.SuspendableContainerExecutable.execute(SuspendableContainerExecutable.java:26)
at com.ebasetech.ufs.runtime.events.RunnableContext.execute(RunnableContext.java:69)
at com.ebasetech.ufs.runtime.events.SuspendableExecutable.execute(SuspendableExecutable.java:47)
at com.ebasetech.ufs.runtime.events.SuspendableContainerExecutable.execute(SuspendableContainerExecutable.java:26)
at com.ebasetech.ufs.runtime.events.RunnableContext.execute(RunnableContext.java:69)
at com.ebasetech.ufs.runtime.Request.execute(Request.java:448)
at com.ebasetech.ufs.runtime.Request.execute(Request.java:417)
at com.ebasetech.ufs.runtime.Request._execute(Request.java:352)
at com.ebasetech.ufs.runtime.Request.execute(Request.java:317)
at formservlets.FormProcessingUtil.executeRequest(FormProcessingUtil.java:503)
at formservlets.EbaseAjaxServlet.process(EbaseAjaxServlet.java:69)
at formservlets.EbaseAjaxServlet.doPost(EbaseAjaxServlet.java:38)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:641)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at formservlets.EbaseFilter.processRequest(EbaseFilter.java:253)
at formservlets.EbaseFilter.performFilter(EbaseFilter.java:180)
at formservlets.EbaseFilter.doFilter(EbaseFilter.java:100)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at net.bull.javamelody.MonitoringFilter.doFilter(MonitoringFilter.java:198)
at net.bull.javamelody.MonitoringFilter.doFilter(MonitoringFilter.java:176)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:225)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:169)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:927)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:999)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:565)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:309)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)