Uploaded image for project: 'Hibernate ORM'
  1. Hibernate ORM
  2. HHH-11617

Statement leak in case of "SQLGrammarException: could not extract ResultSet"

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 5.0.11, 5.1.5, 5.2.9
    • Fix Version/s: 5.2.10
    • Component/s: hibernate-core
    • Labels:
      None
    • Environment:
      Hibernate 5.0.11, Oracle 12.1.0.2
    • Bug Testcase Reminder (view):

      Bug reports should generally be accompanied by a test case!

    • Last commented by a user?:
      true

      Description

      I am using "javax.persistence.lock.timeout" property which can cause "org.hibernate.loader.plan.exec.internal.AbstractLoadPlanBasedLoader.getResultSet()" to throw "SQLGrammarException: could not extract ResultSet". This is valid and expected behavior but prevents creating SqlStatementWrapper in executeQueryStatement() ( AbstractLoadPlanBasedLoader:186 ) and that in turn means that no statement is released in finally section: AbstractLoadPlanBasedLoader.java:138 and one was created in ( AbstractLoadPlanBasedLoader.java:185 )
      Additionally getResultSet() releases statement on its own in case of SQLException but not HibernateException/org.hibernate.exception.SQLGrammarException ( AbstractLoadPlanBasedLoader:L446 )

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: