java.lang.UnsupportedOperationException: query result offset is not supported

Hibernate JIRA | Brian Peterson | 7 months ago
tip
Click on the to mark the solution that helps you, Samebug will learn from it.
As a community member, you’ll be rewarded for you help.
  1. 0

    During a migration from Spring Boot 1.3.8 to Spring Boot 1.4.1, the Hibernate version was upgraded. This upgrade has broken Pagination supported in versions prior to Hibernate 5+. This may be related to HHH-10489. A partial stack trace is below. java.lang.UnsupportedOperationException: query result offset is not supported at org.hibernate.dialect.DB2400Dialect$1.processSql(DB2400Dialect.java:28) at org.hibernate.loader.Loader.executeQueryStatement(Loader.java:1904) at org.hibernate.loader.Loader.executeQueryStatement(Loader.java:1887) at org.hibernate.loader.Loader.doQuery(Loader.java:932) at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:349) at org.hibernate.loader.Loader.doList(Loader.java:2615) at org.hibernate.loader.Loader.doList(Loader.java:2598) at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2430) at org.hibernate.loader.Loader.list(Loader.java:2425) at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:502) at org.hibernate.hql.internal.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:371) at org.hibernate.engine.query.spi.HQLQueryPlan.performList(HQLQueryPlan.java:216) at org.hibernate.internal.SessionImpl.list(SessionImpl.java:1458) at org.hibernate.query.internal.AbstractProducedQuery.doList(AbstractProducedQuery.java:1426) at org.hibernate.query.internal.AbstractProducedQuery.list(AbstractProducedQuery.java:1398) at org.hibernate.Query.getResultList(Query.java:417) at org.hibernate.query.criteria.internal.compile.CriteriaQueryTypeQueryAdapter.getResultList(CriteriaQueryTypeQueryAdapter.java:72) at org.springframework.data.jpa.repository.query.JpaQueryExecution$PagedExecution.doExecute(JpaQueryExecution.java:195) at org.springframework.data.jpa.repository.query.JpaQueryExecution.execute(JpaQueryExecution.java:82)

    Hibernate JIRA | 7 months ago | Brian Peterson
    java.lang.UnsupportedOperationException: query result offset is not supported

    Root Cause Analysis

    1. java.lang.UnsupportedOperationException

      query result offset is not supported

      at org.hibernate.dialect.DB2400Dialect$1.processSql()
    2. Hibernate
      SessionImpl.list
      1. org.hibernate.dialect.DB2400Dialect$1.processSql(DB2400Dialect.java:28)
      2. org.hibernate.loader.Loader.executeQueryStatement(Loader.java:1904)
      3. org.hibernate.loader.Loader.executeQueryStatement(Loader.java:1887)
      4. org.hibernate.loader.Loader.doQuery(Loader.java:932)
      5. org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:349)
      6. org.hibernate.loader.Loader.doList(Loader.java:2615)
      7. org.hibernate.loader.Loader.doList(Loader.java:2598)
      8. org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2430)
      9. org.hibernate.loader.Loader.list(Loader.java:2425)
      10. org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:502)
      11. org.hibernate.hql.internal.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:371)
      12. org.hibernate.engine.query.spi.HQLQueryPlan.performList(HQLQueryPlan.java:216)
      13. org.hibernate.internal.SessionImpl.list(SessionImpl.java:1458)
      13 frames
    3. org.hibernate.query
      AbstractProducedQuery.list
      1. org.hibernate.query.internal.AbstractProducedQuery.doList(AbstractProducedQuery.java:1426)
      2. org.hibernate.query.internal.AbstractProducedQuery.list(AbstractProducedQuery.java:1398)
      2 frames
    4. Hibernate
      Query.getResultList
      1. org.hibernate.Query.getResultList(Query.java:417)
      1 frame
    5. org.hibernate.query
      CriteriaQueryTypeQueryAdapter.getResultList
      1. org.hibernate.query.criteria.internal.compile.CriteriaQueryTypeQueryAdapter.getResultList(CriteriaQueryTypeQueryAdapter.java:72)
      1 frame
    6. Spring Data JPA
      JpaQueryExecution.execute
      1. org.springframework.data.jpa.repository.query.JpaQueryExecution$PagedExecution.doExecute(JpaQueryExecution.java:195)
      2. org.springframework.data.jpa.repository.query.JpaQueryExecution.execute(JpaQueryExecution.java:82)
      2 frames