commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bill Mitchell (JIRA)" <>
Subject [jira] [Commented] (DBCP-521) dbcp 2.5.0 doesn't work with JDBC 3.0 drivers, e.g., jtds
Date Sat, 01 Sep 2018 23:57:00 GMT


Bill Mitchell commented on DBCP-521:

Thanks for the suggestion to check the snapshot version.  You're right, I should have checked
to see if the issue was already open, but I probably would not have thought to look for a
snapshot.  The problem I was seeing with jtds is resolved in the snapshot version.   

> dbcp 2.5.0 doesn't work with JDBC 3.0 drivers, e.g., jtds
> ---------------------------------------------------------
>                 Key: DBCP-521
>                 URL:
>             Project: Commons DBCP
>          Issue Type: Bug
>    Affects Versions: 2.5.0
>            Reporter: Bill Mitchell
>            Priority: Major
> Thanks to DBCP-508, to add the schema to the keys for the prepared statement cache, the
Connection.getSchema() method is called.  On the dbcp side, this call is issued in a try-catch
block that ignores a returned SQLException.  Unfortunately, at least one JDBC 3.0 driver,
jdts 1.3.1, throws an AbstractMethodError in its getSchema method, as it doesn't support this. 
(The 2.4.0 version of dbcp works fine with jtds.)
> At least two fixes are possible.  One could ignore any Throwable from getSchema call. 
Or one could determine the major/minor JDBC version for the connection and issue the method
call only on drivers that claim support for 4.1.  

This message was sent by Atlassian JIRA

View raw message