commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 31197] - New implementarion in commons-beanutils
Date Mon, 13 Sep 2004 16:25:55 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=31197>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=31197

New implementarion in commons-beanutils





------- Additional Comments From craig.mcclanahan@sun.com  2004-09-13 16:25 -------
Hard coding the supported conversions does not seem like the correct approach. 
If BasicDynaBean were to support conversions, it would be better to create a
String<-->CLOB converter and register it with ConvertUtils, then use that.

However, the real problem is that BasicDynaBean is *not* supposed to be doing
conversions on the property values it stores.  Instead, it expects them to match
the type specified when the underlying DynaClass was created.  In turn, for the
case of RowSetDynaClass, the code in JDBCDynaClass.createDynaProperty()
determines what class the property is supposed to be by calling the
getColumnClassName() method of ResultSetMetaData.  If your JDBC driver does not
return the correct value (i.e. "java.sql.Clob" or some subclass of it), then
there is nothing that BeanUtils can do about it.

Hmm ... I was about to close this bug as WONTFIX, but just noticed that
createDynaProperty() swallows any SQLException thrown by getColumnClassName()
... with a note that this is to deal with HsqlDb.  This is really really bad,
and needs to be investigated further.  But fixing this won't help if your JDBC
driver is broken, unfortunately.

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message