JDBC SQL execution exception does not contain cause ---------------------------------------------------
Key: HIVE-2675 URL: https://issues.apache.org/jira/browse/HIVE-2675 Project: Hive Issue Type: Bug Components: JDBC Affects Versions: 0.8.0 Environment: Any Reporter: Greg Cottman If SQL execution throws an exception in the HiveStatement.executeSQL() method then it's message is rethrown as a SQLException with a SQLState of "08S01": try { resultSet = null; client.execute(sql); } catch (HiveServerException e) { throw new SQLException(e.getMessage(), e.getSQLState(), e.getErrorCode()); } catch (Exception ex) { throw new SQLException(ex.toString(), "08S01"); } In the case of failed DDL, the exception "ex" has a cause - such as a java.io.IOException - that contains the actual error text. The description of the actual problem is lost by failing to include "ex" as the cause in the new SQLException. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira