Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-103106

SetFirstResult when paginating past the first row does not work on HSQL because the 'limit ?' parameter is getting stripped throwing an out of range exception

    Details

      Description

      https://testray.liferay.com/home/-/testray/subtasks/826749657/view?cur=1&delta=20&testraySubtaskId=826749657

           [exec] 11:07:32,028 ERROR [http-nio-8080-exec-10][JDBCExceptionReporter:234] Invalid argument in JDBC call: parameter index out of range: 5
           [exec] Invalid argument in JDBC call: parameter index out of range: 5
           [exec] 11:07:32,031 ERROR [http-nio-8080-exec-10][ExceptionMapper:31] com.liferay.portal.kernel.exception.SystemException: com.liferay.portal.kernel.dao.orm.ORMException: org.hibernate.exception.GenericJDBCException: could not execute query
           [exec] com.liferay.portal.kernel.exception.SystemException: com.liferay.portal.kernel.dao.orm.ORMException: org.hibernate.exception.GenericJDBCException: could not execute query
           [exec] 	at com.liferay.portal.kernel.service.persistence.impl.BasePersistenceImpl.processException(BasePersistenceImpl.java:446)
           [exec] 	at com.liferay.dynamic.data.mapping.service.persistence.impl.DDMStructureLayoutPersistenceImpl.findByG_C_SV(DDMStructureLayoutPersistenceImpl.java:3821)
           [exec] 	at com.liferay.dynamic.data.mapping.service.persistence.impl.DDMStructureLayoutPersistenceImpl.findByG_C_SV(DDMStructureLayoutPersistenceImpl.java:3694)
           [exec] 	at com.liferay.dynamic.data.mapping.service.impl.DDMStructureLayoutLocalServiceImpl.getStructureLayouts(DDMStructureLayoutLocalServiceImpl.java:254)
           [exec] 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
           [exec] 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
           [exec] 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
           [exec] 	at java.lang.reflect.Method.invoke(Method.java:498)
           [exec] 	at com.liferay.portal.spring.aop.AopMethodInvocationImpl.proceed(AopMethodInvocationImpl.java:50)
           [exec] 	at com.liferay.portal.spring.transaction.TransactionInterceptor.invoke(TransactionInterceptor.java:69)
           [exec] 	at com.liferay.portal.spring.aop.AopMethodInvocationImpl.proceed(AopMethodInvocationImpl.java:57)
           [exec] 	at com.liferay.portal.spring.aop.AopInvocationHandler.invoke(AopInvocationHandler.java:49)
           [exec] 	at com.sun.proxy.$Proxy720.getStructureLayouts(Unknown Source)
           [exec] 	at com.liferay.data.engine.rest.internal.resource.v1_0.DataLayoutResourceImpl.getDataDefinitionDataLayoutsPage(DataLayoutResourceImpl.java:123)
           [exec] 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
           [exec] 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
           [exec] 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
           [exec] 	at java.lang.reflect.Method.invoke(Method.java:498)
           [exec] 	at org.apache.cxf.service.invoker.AbstractInvoker.performInvocation(AbstractInvoker.java:179)
           [exec] 	at org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:96)
           [exec] 	at org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:192)
           [exec] 	at org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:103)
           [exec] 	at org.apache.cxf.interceptor.ServiceInvokerInterceptor$1.run(ServiceInvokerInterceptor.java:59)
           [exec] 	at org.apache.cxf.interceptor.ServiceInvokerInterceptor.handleMessage(ServiceInvokerInterceptor.java:96)
           [exec] 	at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:308)
           [exec] 	at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:121)
           [exec] 	at org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:267)
           [exec] 	at org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:234)
           [exec] 	at org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:208)
           [exec] 	at org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:160)
           [exec] 	at org.apache.cxf.transport.servlet.CXFNonSpringServlet.invoke(CXFNonSpringServlet.java:216)
           [exec] 	at org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.java:301)
           [exec] 	at org.apache.cxf.transport.servlet.AbstractHTTPServlet.doGet(AbstractHTTPServlet.java:225)
           [exec] 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:634)
           [exec] 	at org.apache.cxf.transport.servlet.AbstractHTTPServlet.service(AbstractHTTPServlet.java:276)
           [exec] 	at org.eclipse.equinox.http.servlet.internal.registration.EndpointRegistration.service(EndpointRegistration.java:153)
           [exec] 	at org.eclipse.equinox.http.servlet.internal.servlet.FilterChainImpl.doFilter(FilterChainImpl.java:50)
           [exec] 	at com.liferay.portal.security.auth.verifier.internal.tracker.AuthVerifierFilterTracker$RemoteAccessFilter.doFilter(AuthVerifierFilterTracker.java:165)
           [exec] 	at org.eclipse.equinox.http.servlet.internal.registration.FilterRegistration.doFilter(FilterRegistration.java:121)
           [exec] 	at org.eclipse.equinox.http.servlet.internal.servlet.FilterChainImpl.doFilter(FilterChainImpl.java:45)
           [exec] 	at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:147)
           [exec] 	at com.liferay.portal.servlet.filters.authverifier.AuthVerifierFilter.processFilter(AuthVerifierFilter.java:198)
           [exec] 	at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:49)
           [exec] 	at org.eclipse.equinox.http.servlet.internal.registration.FilterRegistration.doFilter(FilterRegistration.java:121)
           [exec] 	at org.eclipse.equinox.http.servlet.internal.servlet.FilterChainImpl.doFilter(FilterChainImpl.java:45)
           [exec] 	at org.eclipse.equinox.http.servlet.internal.servlet.ResponseStateHandler.processRequest(ResponseStateHandler.java:70)
           [exec] 	at org.eclipse.equinox.http.servlet.internal.context.DispatchTargets.doDispatch(DispatchTargets.java:120)
           [exec] 	at org.eclipse.equinox.http.servlet.internal.HttpServiceRuntimeImpl.doDispatch(HttpServiceRuntimeImpl.java:373)
           [exec] 	at org.eclipse.equinox.http.servlet.internal.servlet.ProxyServlet.service(ProxyServlet.java:70)
           [exec] 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:741)
           [exec] 	at com.liferay.portal.module.framework.ModuleFrameworkServletAdapter.service(ModuleFrameworkServletAdapter.java:52)
           [exec] 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:741)
           [exec] 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)
           [exec] 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
           [exec] 	at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
           [exec] 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
           [exec] 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
           [exec] 	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:124)
           [exec] 	at com.liferay.portal.servlet.filters.password.modified.PasswordModifiedFilter.processFilter(PasswordModifiedFilter.java:62)
           [exec] 	at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:49)
           [exec] 	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:215)
           [exec] 	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:116)
           [exec] 	at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:147)
           [exec] 	at com.liferay.portal.sharepoint.SharepointFilter.processFilter(SharepointFilter.java:88)
           [exec] 	at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:49)
           [exec] 	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:215)
           [exec] 	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:116)
           [exec] 	at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:147)
           [exec] 	at com.liferay.portal.servlet.filters.virtualhost.VirtualHostFilter.processFilter(VirtualHostFilter.java:268)
           [exec] 	at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:49)
           [exec] 	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:215)
           [exec] 	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:116)
           [exec] 	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:196)
           [exec] 	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:99)
           [exec] 	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:196)
           [exec] 	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:99)
           [exec] 	at org.tuckey.web.filters.urlrewrite.RuleChain.handleRewrite(RuleChain.java:176)
           [exec] 	at org.tuckey.web.filters.urlrewrite.RuleChain.doRules(RuleChain.java:145)
           [exec] 	at org.tuckey.web.filters.urlrewrite.UrlRewriter.processRequest(UrlRewriter.java:92)
           [exec] 	at org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:389)
           [exec] 	at com.liferay.portal.servlet.filters.urlrewrite.UrlRewriteFilter.processFilter(UrlRewriteFilter.java:65)
           [exec] 	at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:49)
           [exec] 	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:215)
           [exec] 	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:116)
           [exec] 	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:175)
           [exec] 	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:99)
           [exec] 	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:175)
           [exec] 	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:99)
           [exec] 	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:196)
           [exec] 	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:99)
           [exec] 	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilter.doFilter(InvokerFilter.java:104)
           [exec] 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
           [exec] 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
           [exec] 	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:200)
           [exec] 	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
           [exec] 	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:490)
           [exec] 	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139)
           [exec] 	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)
           [exec] 	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74)
           [exec] 	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343)
           [exec] 	at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:408)
           [exec] 	at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
           [exec] 	at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:834)
           [exec] 	at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1415)
           [exec] 	at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
           [exec] 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
           [exec] 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
           [exec] 	at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
           [exec] 	at java.lang.Thread.run(Thread.java:745)
           [exec] Caused by: com.liferay.portal.kernel.dao.orm.ORMException: org.hibernate.exception.GenericJDBCException: could not execute query
           [exec] 	at com.liferay.portal.dao.orm.hibernate.ExceptionTranslator.translate(ExceptionTranslator.java:39)
           [exec] 	at com.liferay.portal.dao.orm.hibernate.QueryImpl.list(QueryImpl.java:124)
           [exec] 	at com.liferay.portal.dao.orm.hibernate.QueryImpl.list(QueryImpl.java:104)
           [exec] 	at com.liferay.portal.kernel.dao.orm.QueryUtil.list(QueryUtil.java:84)
           [exec] 	at com.liferay.portal.kernel.dao.orm.QueryUtil.list(QueryUtil.java:53)
           [exec] 	at com.liferay.dynamic.data.mapping.service.persistence.impl.DDMStructureLayoutPersistenceImpl.findByG_C_SV(DDMStructureLayoutPersistenceImpl.java:3807)
           [exec] 	... 107 more
           [exec] Caused by: org.hibernate.exception.GenericJDBCException: could not execute query
           [exec] 	at org.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:140)
           [exec] 	at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:128)
           [exec] 	at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66)
           [exec] 	at org.hibernate.loader.Loader.doList(Loader.java:2545)
           [exec] 	at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2276)
           [exec] 	at org.hibernate.loader.Loader.list(Loader.java:2271)
           [exec] 	at org.hibernate.hql.classic.QueryTranslatorImpl.list(QueryTranslatorImpl.java:940)
           [exec] 	at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:196)
           [exec] 	at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1268)
           [exec] 	at org.hibernate.impl.QueryImpl.list(QueryImpl.java:102)
           [exec] 	at com.liferay.portal.dao.orm.hibernate.QueryImpl.list(QueryImpl.java:112)
           [exec] 	... 111 more
           [exec] Caused by: java.sql.SQLException: Invalid argument in JDBC call: parameter index out of range: 5
           [exec] 	at org.hsqldb.jdbc.JDBCUtil.sqlException(JDBCUtil.java:418)
           [exec] 	at org.hsqldb.jdbc.JDBCUtil.sqlException(JDBCUtil.java:113)
           [exec] 	at org.hsqldb.jdbc.JDBCUtil.sqlException(JDBCUtil.java:160)
           [exec] 	at org.hsqldb.jdbc.JDBCUtil.outOfRangeArgument(JDBCUtil.java:217)
           [exec] 	at org.hsqldb.jdbc.JDBCPreparedStatement.checkSetParameterIndex(JDBCPreparedStatement.java:4025)
           [exec] 	at org.hsqldb.jdbc.JDBCPreparedStatement.setInt(JDBCPreparedStatement.java:444)
           [exec] 	at com.zaxxer.hikari.pool.HikariProxyPreparedStatement.setInt(HikariProxyPreparedStatement.java)
           [exec] 	at org.hibernate.loader.Loader.bindLimitParameters(Loader.java:1812)
           [exec] 	at org.hibernate.loader.Loader.prepareQueryStatement(Loader.java:1719)
           [exec] 	at org.hibernate.loader.Loader.doQuery(Loader.java:801)
           [exec] 	at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:274)
           [exec] 	at org.hibernate.loader.Loader.doList(Loader.java:2542)
           [exec] 	... 118 more
           [exec] Caused by: org.hsqldb.HsqlException: Invalid argument in JDBC call: parameter index out of range: 5
           [exec] 	at org.hsqldb.error.Error.error(Error.java:83)
           [exec] 	at org.hsqldb.error.Error.error(Error.java:72)
           [exec] 	... 128 more
       
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                kyle.miho Kyle Miho
                Reporter:
                joshua.itagaki Joshua Itagaki
                Participants of an Issue:
                Recent user:
                Kyle Miho
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Days since last comment:
                  3 weeks, 2 days ago

                  Packages

                  Version Package
                  Master