Skip Menu |

This queue is for tickets about the DBD-JDBC CPAN distribution.

Report information
The Basics
Id: 105849
Status: new
Priority: 0/

Owner: Nobody in particular
Requestors: mathewkbentley [...]

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)

Subject: Defect
Date: Tue, 14 Jul 2015 01:35:49 -0400
To: bug-DBD-JDBC [...]
From: mat bentley <mathewkbentley [...]>
Download (untitled) / with headers
text/plain 1.8k
Description: DBD-JDBC throws an exception when connecting to a HiveQL service in any Hadoop distribution. This is due to Apache's decision to throw exceptions from the DatabaseMetaData implementation in their driver for the method "supportsGetGeneratedKeys()" instead of returning false. Ideally this would be fixed in Apache's Hive drivers, however that isn't an option for those using DBD with a commercial distribution of Apache's Hive Drivers where source code is not available (in violation of the GPL, talking about IBM's BigInsights specifically). Desired behavior: I can load hive-jdbc jar and connect to hive through DBD without errors. Actual behavior: I can load hive-jdbc and start a dbd service, however when connecting an exception is thrown and DBD effectively dies: com.vizdom.dbd.jdbc.Connection - Error java.sql.SQLException: Method not supported at org.apache.hive.jdbc.HiveDatabaseMetaData.supportsGetGeneratedKeys( at com.vizdom.dbd.jdbc.Connection.handleRequest( at at Solution: catch SQLException when calling supportsGetGeneratedKeys on DatabaseMetaData instance within the com.vizdom.dbd.jdbc.Connection class. Changed: mSupportsGetGeneratedKeys = dbmd.supportsGetGeneratedKeys(); to: try{ mSupportsGetGeneratedKeys = dbmd.supportsGetGeneratedKeys(); }catch(SQLException x){ gLog.debug("Driver threw exception checking if generated keys are supported. (\"DatabaseMetaData.supportsGetGeneratedKeys()\")", x); } mSupportsGetGeneratedKeys is a boolean primitive which defaults to false, if the invocation causes an exception to throw, that can be inferred as false without a negative impact to application behavior. This impacts at least 0,71 of DBD. Cheers, Mat

This service is sponsored and maintained by Best Practical Solutions and runs on infrastructure.

Please report any issues with to