Uploaded image for project: 'Hive'
  1. Hive
  2. HIVE-9598

java.lang.IllegalMonitorStateException/java.util.concurrent.locks.ReentrantLock$Sync.tryRelease if ResultSet.closed called after Statement.close called

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Duplicate
    • 0.13.0
    • 0.14.0
    • JDBC
    • None

    Description

      http://docs.oracle.com/javase/7/docs/api/java/sql/ResultSet.html#close()
      http://docs.oracle.com/javase/7/docs/api/java/sql/Statement.html#close()

      Statement stmt;
      try {
      stmt = dbConnection.createStatement();
      stmt.executeQuery("select* from t");
      ResultSet rs = stmt.getResultSet();
      stmt.close();
      if (rs != null) {
      System.out.println("IS NOT NULL");
      // Hive does not implement isClosed()
      // if (!rs.isClosed())

      { // System.out.println("IS NOT CLOSED"); // }

      rs.close();
      }
      } catch (SQLException e)

      { // TODO Auto-generated catch block e.printStackTrace(); }

      Exception in thread "main" java.lang.IllegalMonitorStateException
      at java.util.concurrent.locks.ReentrantLock$Sync.tryRelease(ReentrantLock.java:166)
      at java.util.concurrent.locks.AbstractQueuedSynchronizer.release(AbstractQueuedSynchronizer.java:1271)
      at java.util.concurrent.locks.ReentrantLock.unlock(ReentrantLock.java:471)
      at org.apache.hive.jdbc.HiveStatement.closeClientOperation(HiveStatement.java:175)
      at org.apache.hive.jdbc.HiveQueryResultSet.close(HiveQueryResultSet.java:293)

      /D:/JDBC/Hortonworks_Hive13/commons-configuration-1.6.jar
      /D:/JDBC/Hortonworks_Hive13/commons-logging-1.1.3.jar
      /D:/JDBC/Hortonworks_Hive13/hadoop-common-2.4.0.2.1.1.0-385.jar
      /D:/JDBC/Hortonworks_Hive13/hive-exec-0.13.0.2.1.1.0-385.jar
      /D:/JDBC/Hortonworks_Hive13/hive-jdbc-0.13.0.2.1.1.0-385.jar
      /D:/JDBC/Hortonworks_Hive13/hive-service-0.13.0.2.1.1.0-385.jar
      /D:/JDBC/Hortonworks_Hive13/httpclient-4.2.5.jar
      /D:/JDBC/Hortonworks_Hive13/httpcore-4.2.5.jar
      /D:/JDBC/Hortonworks_Hive13/libfb303-0.9.0.jar
      /D:/JDBC/Hortonworks_Hive13/libthrift-0.9.0.jar
      /D:/JDBC/Hortonworks_Hive13/log4j-1.2.16.jar
      /D:/JDBC/Hortonworks_Hive13/slf4j-api-1.7.5.jar
      /D:/JDBC/Hortonworks_Hive13/slf4j-log4j12-1.7.5.jar

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              the6campbells N Campbell
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: