diff --git a/jdbc/src/java/org/apache/hive/jdbc/HiveBaseResultSet.java b/jdbc/src/java/org/apache/hive/jdbc/HiveBaseResultSet.java index 775ebee..4c1ab3b 100644 --- a/jdbc/src/java/org/apache/hive/jdbc/HiveBaseResultSet.java +++ b/jdbc/src/java/org/apache/hive/jdbc/HiveBaseResultSet.java @@ -229,7 +229,7 @@ public Date getDate(int columnIndex) throws SQLException { return Date.valueOf((String) obj); } catch (Exception e) { throw new SQLException("Cannot convert column " + columnIndex - + " to date: " + e.toString()); + + " to date: " + e.toString(), e); } } @@ -258,7 +258,7 @@ public double getDouble(int columnIndex) throws SQLException { throw new Exception("Illegal conversion"); } catch (Exception e) { throw new SQLException("Cannot convert column " + columnIndex - + " to double: " + e.toString()); + + " to double: " + e.toString(), e); } } @@ -287,7 +287,7 @@ public float getFloat(int columnIndex) throws SQLException { throw new Exception("Illegal conversion"); } catch (Exception e) { throw new SQLException("Cannot convert column " + columnIndex - + " to float: " + e.toString()); + + " to float: " + e.toString(), e); } } @@ -311,7 +311,9 @@ public int getInt(int columnIndex) throws SQLException { } throw new Exception("Illegal conversion"); } catch (Exception e) { - throw new SQLException("Cannot convert column " + columnIndex + " to integer" + e.toString()); + throw new SQLException( + "Cannot convert column " + columnIndex + " to integer" + e.toString(), + e); } } @@ -331,7 +333,9 @@ public long getLong(int columnIndex) throws SQLException { } throw new Exception("Illegal conversion"); } catch (Exception e) { - throw new SQLException("Cannot convert column " + columnIndex + " to long: " + e.toString()); + throw new SQLException( + "Cannot convert column " + columnIndex + " to long: " + e.toString(), + e); } } @@ -578,7 +582,7 @@ public short getShort(int columnIndex) throws SQLException { throw new Exception("Illegal conversion"); } catch (Exception e) { throw new SQLException("Cannot convert column " + columnIndex - + " to short: " + e.toString()); + + " to short: " + e.toString(), e); } } diff --git a/jdbc/src/java/org/apache/hive/jdbc/HiveConnection.java b/jdbc/src/java/org/apache/hive/jdbc/HiveConnection.java index 17b4d39..0e90fec 100644 --- a/jdbc/src/java/org/apache/hive/jdbc/HiveConnection.java +++ b/jdbc/src/java/org/apache/hive/jdbc/HiveConnection.java @@ -146,7 +146,7 @@ private void openTransport(String uri, String host, int port, Map