The stubs b reak C3P0, glassfish, etc, and don't do much, because they all throw an exception anyway. But their presence confuses products using reflection to see if supports JDBC 4 (which then break).
Here's the files that need to be modified to remove this, for peoples FYI. It would be cool to have an ant script that copied the "right" versions of these files before compilation to the target src directory and then compiled.
Remove all methods that throw new AbstractMethodError from
ConnectionProxy
PreparedStatementProxy
CallableStatementProxy
PooledConnection
JtdsDatabaseMetaData
JtdsCallableStatement (also remove import of NClob, RowID, SQLXML)
JtdsResultSet (also remove import of NClob, RowID, SQLXML)
JtdsPreparedStatement (also remove import of NClob, RowID, SQLXML)
ConnectionJDBC2 (also remove import of NClob,SQLClientInfoException, SQLXML)
Anonymous
View and moderate all "feature-requests Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Feature Requests"
Also
JTdsResultSetMetaData needs it's abstract methods removed.
Last edit: Anonymous 2013-11-20
View and moderate all "feature-requests Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Feature Requests"
Actually, that was an incomplete list. Here is the full list. The easiest way to find it is search for anything throwing new AbstractMethodError
Remove all methods that throw new AbstractMethodError from
ConnectionProxy
PreparedStatementProxy
CallableStatementProxy
PooledConnection
JtdsDatabaseMetaData
JtdsCallableStatement (also remove import of NClob, RowID, SQLXML)
JtdsResultSet (also remove import of NClob, RowID, SQLXML)
JtdsPreparedStatement (also remove import of NClob, RowID, SQLXML)
ConnectionJDBC2 (also remove import of NClob,SQLClientInfoException, SQLXML)
JtdsResultSetMetaData
ParameterMetaDataImpl
JtdsDataSource
BlobImpl
ClobImpl
JtdsStatement
StatementProxy
This is a known problem. See feature request [2856350], bug [2900139] and bug [2898905].
For the time being you can specify GF property JDBC30DataSource to work around this problem when using glassfish.
I will try modifying the build process to remove the stubs when building a release so the binary distribution doesn't contain the stubs while the sources can still be build in a current Java environment.
Cheers,
momo
This problem has been fixed in CVS. An Ant build script removes the JDBC4
method stubs before compiling