Menu

#65 Remove JDBC4 (java 6 stubs)

closed
momo
None
5
2012-08-15
2009-11-30
Anonymous
No

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)

Discussion

  • Anonymous

    Anonymous - 2009-11-30

    Also
    JTdsResultSetMetaData needs it's abstract methods removed.

     

    Last edit: Anonymous 2013-11-20
  • Anonymous

    Anonymous - 2009-11-30

    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

     
  • momo

    momo - 2009-11-30

    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

     
  • momo

    momo - 2009-12-30

    This problem has been fixed in CVS. An Ant build script removes the JDBC4
    method stubs before compiling

     

Anonymous
Anonymous

Add attachments
Cancel





Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.