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:
http://wiki.apache.org/jakarta-commons/BeanUtils/FAQ

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 column,
+ the result set's metadata reports the column type (correctly) as 
javax.sql.Timestamp. And therefore
+ 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 10.1.0.4.
+ 
+ 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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to