[hibernate-issues] [Hibernate-JIRA] Commented: (HHH-2357) Patch to work around setDecimal() bug with Oracle JDBC driver < 10.2.0.4 and JDK >= 1.5 (bug 5527479

Yves Galante (JIRA) noreply at atlassian.com
Wed Feb 27 18:08:33 EST 2008


    [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-2357?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_29609 ] 

Yves Galante commented on HHH-2357:
-----------------------------------

You can close this issue.

Oracle have patch this bug, we need juste get lastest ojdbc5.jar (version 11.x.x) on oracle site.

> Patch to work around setDecimal() bug with Oracle JDBC driver < 10.2.0.4 and JDK >= 1.5 (bug 5527479
> ----------------------------------------------------------------------------------------------------
>
>                 Key: HHH-2357
>                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-2357
>             Project: Hibernate3
>          Issue Type: Patch
>          Components: core
>    Affects Versions: 3.2.1
>         Environment: Hibernate 3.2.1, Oracle 9i, Oracle 10g, JDK 1.5+
>            Reporter: Benoit Goudreault-Emond
>         Attachments: WorkaroundForOracleBrokenSetDecimal.patch
>
>
> First, see http://www.javalobby.org/java/forums/t88158.html
> In a nutshell, JDK 1.5 changed the representation of BigDecimal; namely, they changed totally the way toString() works. Nobody is sure how Oracle parses out the BigDecimal for storage inside the database, but it seems BigDecimals with negative scales don't work well. It's not really this surprising, given that Sun did something a bit evil here (changing the contract of the scale property, for one).
> The proposed workarounds from Oracle: 1) stay with JDK 1.4 (not an option when you've written several thousand lines of generic-aware code, retroweaver nonwithstanding) 2) wait for their patched JDBC driver.
> However, they won't issue a patch for Oracle 9i, and those using the OCI driver are kinda stuck.  Plus, Oracle's patch isn't there yet.
> This patch is not necessarily meant to go in the main Hibernate code; it is, after all, Oracle's bug.  Still, the patch itself is harmless even for other databases (it simply rescales the BigDecimal), and if it's useful to someone, great.  It seems to
> be a good solution in the meantime.
> I've marked this bug as MAJOR because it can lead to data corruption--the BigDecimal put in is not the one you get back.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the hibernate-issues mailing list