commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Niall Pemberton (JIRA)" <j...@apache.org>
Subject [jira] Updated: (BEANUTILS-142) [beanutils] RowSetDynaClass fails to copy resulset to DynaBean with Oracle 10g JDBC driver
Date Sat, 14 Jul 2007 01:32:05 GMT

     [ https://issues.apache.org/jira/browse/BEANUTILS-142?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Niall Pemberton updated BEANUTILS-142:
--------------------------------------

    Attachment: beanutils-142-oracle-bug.patch

I tested with Oracle (version 10.2.0.1 express edition) and I get the same results as you
for the meta data and the types returned by ResultSet getObject() - but I don't see the exception
you're getting - the date column is converted to a java.sql.Timestamp.

Also the getColumnType(idx) does return the correct types for date and timestamp columns -
so this could be used as a solution. Whether we do that or not - IMO we should remove my ConvertUtils
change for the reason I put in my previous post.

Attaching a patch for possible solution using sql type

> [beanutils] RowSetDynaClass fails to copy resulset to DynaBean with Oracle 10g JDBC driver
> ------------------------------------------------------------------------------------------
>
>                 Key: BEANUTILS-142
>                 URL: https://issues.apache.org/jira/browse/BEANUTILS-142
>             Project: Commons BeanUtils
>          Issue Type: Bug
>          Components: DynaBean
>         Environment: Operating System: Windows XP
> Platform: All
>            Reporter: Li Zhang
>            Assignee: Henri Yandell
>             Fix For: 1.8.0
>
>         Attachments: beanutils-142-oracle-bug.patch, Beanutils-142.patch, Play.java
>
>
> Beginning in Oracle 9.2, DATE is mapped to Date and TIMESTAMP is mapped to
> Timestamp. However if you were relying on DATE values to contain time
> information, there is a problem. When using Oracle 10g JDBC driver, the
> ResultSetMetaData.getColumnClassName returns java.sql.Timestamp but
> ResultSet.getObject(name).getClass() returns java.sql.Date. Obviously these two
> do not match each other. When the RowSetDynaClass.copy function tries to set the
> value to BasicDynaBean, it throws exception. Need a workaround.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
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