commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <>
Subject [Jakarta-commons Wiki] Update of "BeanUtils/FAQ" by SimonKitching
Date Wed, 15 Jun 2005 09:52:40 GMT
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Jakarta-commons Wiki" for change notification.

The following page has been changed by SimonKitching:

The comment on the change is:
Added info re RowSetDynaClass, javax.sql.Timestamp and broken Oracle driver

  FAQ entry titled "How can I correctly convert locale-specific input?" for specific information
  about this.
+ === Why do I get ConversionException when using RowSetDynaClass with Oracle? ===
+ Oracle's JDBC driver is broken. When a query is run against a table containing a Timestamp
+ the result set's metadata reports the column type (correctly) as javax.sql.Timestamp. And
+ the !DynaClass object created to represent the query has a field of type javax.sql.Timestamp
to store
+ the data for that column in. However calling resultset.getObject on that column returns
an object of 
+ type javax.sql.Date(!), which then of course cannot be assigned to the corresponding field
on a !DynaBean
+ object with that !DynaClass.
+ This has been reported with Oracle10g, driver ojdbc14 version
+ Possible solutions (untested) are:
+  * subclass !RowSetDynaClass and override the copy method to fudge the conversion. 
+  * subclass !BasicDynaBean and override the set method to handle the problem, then subclass
!RowSetDynaClass and override createDynaBean to return instances of your custom bean that
handles broken Oracle resultsets.
+ If you have a license for Oracle, don't forget to send in a complaint!

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message