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())
rs.close();
}
} catch (SQLException e)
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
- duplicates
-
HIVE-7303 IllegalMonitorStateException when stmtHandle is null in HiveStatement
- Closed