Subject Re: [Firebird-Java] Regression from 2.1.6
Author Mark Rotteveel
On Wed, 18 Jul 2012 22:56:17 -0000, "Fabiano"
> Hi all!
> I reported this bug some months ago, but jaybird 2.2.0 was released
> without solving it.
> It is a showstopper for everybody who uses CachedRowSet, like me :-(
> The result of resultSet.getMetaData.getColumnName() is inconsistent
> jaybird 2.1.6 and 2.2.0, and default Java CachedRowSetImpl rely on this
> method to assign the names of CachedRowSet columns, leading to errors
> in use with JayBird 2.2.0.
> Tested with Java 7 update 5.
> CachedRowSetImpl is part of Java 7 distribution.
> If you use Eclipse, maybe you should turn off compile warning/erros for
> "Forbidden reference (access rules)" for this code to compile.
> Is there some possibility to solve this bug ASAP? Maybe on the developer
> branch? I can try it in production if needed.
> Please also add some tests for this issue.

This change was intentional (see ) to comply with the JDBC
specification. The getColumnName() is intended to retrieve the original
column name (if any), getColumnLabel to retrieve the actual name in the
It is explicitly documented in the releasenotes (sections 'Other fixes and
changes' and 'Compatibility with com.sun.rowset.*'). The reference
implementation of com.sun.rowset.CachedRowSetImpl is itself broken as it
doesn't follow the JDBC specification (see ). For example
the MySQL Connector/J driver behaves the same as Jaybird 2.2
( )

You and I discussed this in November/December and then you agreed it would
be better to keep the new implementation, as the workaround is to override
the CachedRowSetImpl implementation by subclassing it (see my comment
quoting your e-mail in