You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ode.apache.org by "Oleg Zenzin (JIRA)" <ji...@apache.org> on 2010/07/14 01:08:50 UTC

[jira] Created: (ODE-872) DECIMAL and NUMERIC types are not handled properly for xvar on Oracle

DECIMAL and NUMERIC types are not handled properly for xvar on Oracle
---------------------------------------------------------------------

                 Key: ODE-872
                 URL: https://issues.apache.org/jira/browse/ODE-872
             Project: ODE
          Issue Type: Bug
          Components: BPEL Runtime
    Affects Versions: 1.3.4
         Environment: External Variables on Oracle 9g/10g
            Reporter: Oleg Zenzin
             Fix For: 1.3.5


The external variables functionality can suffer form Oracle 9g/10g bug when run on Java 1.5. Essentially what happens is when a BigDecimal data is being updated or inserted the numbers like 125000 or others with trailing zeros can become "125", i.e. lose the zeros! The bug is discussed here: http://www.javalobby.org/java/forums/t88158.html. Here's an excerpt:

"Between Java 1.4 and Java 1.5, the BigDecimal class changed. In Java 1.4, the scale must be non-negative. In Java 1.5, the scale can now be negative (see the javadoc). 

If you look at the value 12500000 as a BigDecimal, in Java 1.5, this gets represented as 125 with a scale of -5. In 1.4, this would get represented as 12500000 with a scale of 0. 

In Oracle's driver, they appear to do the conversion to an array of bytes to send to the driver themselves; I'm not sure which cases it will work for, but I'd suspect that it won't work correctly for a large number of negative scales. I'd guess that they designed it under 1.4 and didn't test it adequately under 1.5. "


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


[jira] Updated: (ODE-872) DECIMAL and NUMERIC types are not handled properly for xvar on Oracle

Posted by "Oleg Zenzin (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/ODE-872?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Oleg Zenzin updated ODE-872:
----------------------------

    Attachment: bpel-runtime.patch

My fault, I have changed the number, but left ref to the project name. Fixed now.
Thanks for pointing it out!

> DECIMAL and NUMERIC types are not handled properly for xvar on Oracle
> ---------------------------------------------------------------------
>
>                 Key: ODE-872
>                 URL: https://issues.apache.org/jira/browse/ODE-872
>             Project: ODE
>          Issue Type: Bug
>          Components: BPEL Runtime
>    Affects Versions: 1.3.4
>         Environment: External Variables on Oracle 9g/10g
>            Reporter: Oleg Zenzin
>             Fix For: 1.3.5
>
>         Attachments: bpel-runtime.patch
>
>
> The external variables functionality can suffer form Oracle 9g/10g bug when run on Java 1.5. Essentially what happens is when a BigDecimal data is being updated or inserted the numbers like 125000 or others with trailing zeros can become "125", i.e. lose the zeros! The bug is discussed here: http://www.javalobby.org/java/forums/t88158.html. Here's an excerpt:
> "Between Java 1.4 and Java 1.5, the BigDecimal class changed. In Java 1.4, the scale must be non-negative. In Java 1.5, the scale can now be negative (see the javadoc). 
> If you look at the value 12500000 as a BigDecimal, in Java 1.5, this gets represented as 125 with a scale of -5. In 1.4, this would get represented as 12500000 with a scale of 0. 
> In Oracle's driver, they appear to do the conversion to an array of bytes to send to the driver themselves; I'm not sure which cases it will work for, but I'd suspect that it won't work correctly for a large number of negative scales. I'd guess that they designed it under 1.4 and didn't test it adequately under 1.5. "

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


[jira] Updated: (ODE-872) DECIMAL and NUMERIC types are not handled properly for xvar on Oracle

Posted by "Oleg Zenzin (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/ODE-872?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Oleg Zenzin updated ODE-872:
----------------------------

    Attachment: bpel-runtime.patch

Patch with fix is attached. This patch touches only bpel-runtime module and should be run from this module root folder.

> DECIMAL and NUMERIC types are not handled properly for xvar on Oracle
> ---------------------------------------------------------------------
>
>                 Key: ODE-872
>                 URL: https://issues.apache.org/jira/browse/ODE-872
>             Project: ODE
>          Issue Type: Bug
>          Components: BPEL Runtime
>    Affects Versions: 1.3.4
>         Environment: External Variables on Oracle 9g/10g
>            Reporter: Oleg Zenzin
>             Fix For: 1.3.5
>
>         Attachments: bpel-runtime.patch
>
>
> The external variables functionality can suffer form Oracle 9g/10g bug when run on Java 1.5. Essentially what happens is when a BigDecimal data is being updated or inserted the numbers like 125000 or others with trailing zeros can become "125", i.e. lose the zeros! The bug is discussed here: http://www.javalobby.org/java/forums/t88158.html. Here's an excerpt:
> "Between Java 1.4 and Java 1.5, the BigDecimal class changed. In Java 1.4, the scale must be non-negative. In Java 1.5, the scale can now be negative (see the javadoc). 
> If you look at the value 12500000 as a BigDecimal, in Java 1.5, this gets represented as 125 with a scale of -5. In 1.4, this would get represented as 12500000 with a scale of 0. 
> In Oracle's driver, they appear to do the conversion to an array of bytes to send to the driver themselves; I'm not sure which cases it will work for, but I'd suspect that it won't work correctly for a large number of negative scales. I'd guess that they designed it under 1.4 and didn't test it adequately under 1.5. "

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


[jira] Commented: (ODE-872) DECIMAL and NUMERIC types are not handled properly for xvar on Oracle

Posted by "Hudson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/ODE-872?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12888605#action_12888605 ] 

Hudson commented on ODE-872:
----------------------------

Integrated in ODE-trunk #337 (See [http://hudson.zones.apache.org/hudson/job/ODE-trunk/337/])
    

> DECIMAL and NUMERIC types are not handled properly for xvar on Oracle
> ---------------------------------------------------------------------
>
>                 Key: ODE-872
>                 URL: https://issues.apache.org/jira/browse/ODE-872
>             Project: ODE
>          Issue Type: Bug
>          Components: BPEL Runtime
>    Affects Versions: 1.3.4
>         Environment: External Variables on Oracle 9g/10g
>            Reporter: Oleg Zenzin
>             Fix For: 1.3.5
>
>         Attachments: bpel-runtime.patch
>
>
> The external variables functionality can suffer form Oracle 9g/10g bug when run on Java 1.5. Essentially what happens is when a BigDecimal data is being updated or inserted the numbers like 125000 or others with trailing zeros can become "125", i.e. lose the zeros! The bug is discussed here: http://www.javalobby.org/java/forums/t88158.html. Here's an excerpt:
> "Between Java 1.4 and Java 1.5, the BigDecimal class changed. In Java 1.4, the scale must be non-negative. In Java 1.5, the scale can now be negative (see the javadoc). 
> If you look at the value 12500000 as a BigDecimal, in Java 1.5, this gets represented as 125 with a scale of -5. In 1.4, this would get represented as 12500000 with a scale of 0. 
> In Oracle's driver, they appear to do the conversion to an array of bytes to send to the driver themselves; I'm not sure which cases it will work for, but I'd suspect that it won't work correctly for a large number of negative scales. I'd guess that they designed it under 1.4 and didn't test it adequately under 1.5. "

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


[jira] Updated: (ODE-872) DECIMAL and NUMERIC types are not handled properly for xvar on Oracle

Posted by "Oleg Zenzin (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/ODE-872?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Oleg Zenzin updated ODE-872:
----------------------------

    Attachment:     (was: bpel-runtime.patch)

> DECIMAL and NUMERIC types are not handled properly for xvar on Oracle
> ---------------------------------------------------------------------
>
>                 Key: ODE-872
>                 URL: https://issues.apache.org/jira/browse/ODE-872
>             Project: ODE
>          Issue Type: Bug
>          Components: BPEL Runtime
>    Affects Versions: 1.3.4
>         Environment: External Variables on Oracle 9g/10g
>            Reporter: Oleg Zenzin
>             Fix For: 1.3.5
>
>
> The external variables functionality can suffer form Oracle 9g/10g bug when run on Java 1.5. Essentially what happens is when a BigDecimal data is being updated or inserted the numbers like 125000 or others with trailing zeros can become "125", i.e. lose the zeros! The bug is discussed here: http://www.javalobby.org/java/forums/t88158.html. Here's an excerpt:
> "Between Java 1.4 and Java 1.5, the BigDecimal class changed. In Java 1.4, the scale must be non-negative. In Java 1.5, the scale can now be negative (see the javadoc). 
> If you look at the value 12500000 as a BigDecimal, in Java 1.5, this gets represented as 125 with a scale of -5. In 1.4, this would get represented as 12500000 with a scale of 0. 
> In Oracle's driver, they appear to do the conversion to an array of bytes to send to the driver themselves; I'm not sure which cases it will work for, but I'd suspect that it won't work correctly for a large number of negative scales. I'd guess that they designed it under 1.4 and didn't test it adequately under 1.5. "

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


[jira] Resolved: (ODE-872) DECIMAL and NUMERIC types are not handled properly for xvar on Oracle

Posted by "Rafal Rusin (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/ODE-872?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Rafal Rusin resolved ODE-872.
-----------------------------

    Resolution: Fixed

Applied. Thanks!

> DECIMAL and NUMERIC types are not handled properly for xvar on Oracle
> ---------------------------------------------------------------------
>
>                 Key: ODE-872
>                 URL: https://issues.apache.org/jira/browse/ODE-872
>             Project: ODE
>          Issue Type: Bug
>          Components: BPEL Runtime
>    Affects Versions: 1.3.4
>         Environment: External Variables on Oracle 9g/10g
>            Reporter: Oleg Zenzin
>             Fix For: 1.3.5
>
>         Attachments: bpel-runtime.patch
>
>
> The external variables functionality can suffer form Oracle 9g/10g bug when run on Java 1.5. Essentially what happens is when a BigDecimal data is being updated or inserted the numbers like 125000 or others with trailing zeros can become "125", i.e. lose the zeros! The bug is discussed here: http://www.javalobby.org/java/forums/t88158.html. Here's an excerpt:
> "Between Java 1.4 and Java 1.5, the BigDecimal class changed. In Java 1.4, the scale must be non-negative. In Java 1.5, the scale can now be negative (see the javadoc). 
> If you look at the value 12500000 as a BigDecimal, in Java 1.5, this gets represented as 125 with a scale of -5. In 1.4, this would get represented as 12500000 with a scale of 0. 
> In Oracle's driver, they appear to do the conversion to an array of bytes to send to the driver themselves; I'm not sure which cases it will work for, but I'd suspect that it won't work correctly for a large number of negative scales. I'd guess that they designed it under 1.4 and didn't test it adequately under 1.5. "

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


[jira] Commented: (ODE-872) DECIMAL and NUMERIC types are not handled properly for xvar on Oracle

Posted by "Rafal Rusin (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/ODE-872?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12888306#action_12888306 ] 

Rafal Rusin commented on ODE-872:
---------------------------------

+                        //PXE-872: Oracle 9g and 10g has problems with BigDecimal on Java1.5
+                        value = new BigDecimal(new BigDecimal(value.toString()).toPlainString());


> DECIMAL and NUMERIC types are not handled properly for xvar on Oracle
> ---------------------------------------------------------------------
>
>                 Key: ODE-872
>                 URL: https://issues.apache.org/jira/browse/ODE-872
>             Project: ODE
>          Issue Type: Bug
>          Components: BPEL Runtime
>    Affects Versions: 1.3.4
>         Environment: External Variables on Oracle 9g/10g
>            Reporter: Oleg Zenzin
>             Fix For: 1.3.5
>
>         Attachments: bpel-runtime.patch
>
>
> The external variables functionality can suffer form Oracle 9g/10g bug when run on Java 1.5. Essentially what happens is when a BigDecimal data is being updated or inserted the numbers like 125000 or others with trailing zeros can become "125", i.e. lose the zeros! The bug is discussed here: http://www.javalobby.org/java/forums/t88158.html. Here's an excerpt:
> "Between Java 1.4 and Java 1.5, the BigDecimal class changed. In Java 1.4, the scale must be non-negative. In Java 1.5, the scale can now be negative (see the javadoc). 
> If you look at the value 12500000 as a BigDecimal, in Java 1.5, this gets represented as 125 with a scale of -5. In 1.4, this would get represented as 12500000 with a scale of 0. 
> In Oracle's driver, they appear to do the conversion to an array of bytes to send to the driver themselves; I'm not sure which cases it will work for, but I'd suspect that it won't work correctly for a large number of negative scales. I'd guess that they designed it under 1.4 and didn't test it adequately under 1.5. "

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


[jira] Commented: (ODE-872) DECIMAL and NUMERIC types are not handled properly for xvar on Oracle

Posted by "Veresh Jain (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/ODE-872?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12888128#action_12888128 ] 

Veresh Jain commented on ODE-872:
---------------------------------

Can you please remove references to PXE ? It doesn't make sense in ODE

> DECIMAL and NUMERIC types are not handled properly for xvar on Oracle
> ---------------------------------------------------------------------
>
>                 Key: ODE-872
>                 URL: https://issues.apache.org/jira/browse/ODE-872
>             Project: ODE
>          Issue Type: Bug
>          Components: BPEL Runtime
>    Affects Versions: 1.3.4
>         Environment: External Variables on Oracle 9g/10g
>            Reporter: Oleg Zenzin
>             Fix For: 1.3.5
>
>         Attachments: bpel-runtime.patch
>
>
> The external variables functionality can suffer form Oracle 9g/10g bug when run on Java 1.5. Essentially what happens is when a BigDecimal data is being updated or inserted the numbers like 125000 or others with trailing zeros can become "125", i.e. lose the zeros! The bug is discussed here: http://www.javalobby.org/java/forums/t88158.html. Here's an excerpt:
> "Between Java 1.4 and Java 1.5, the BigDecimal class changed. In Java 1.4, the scale must be non-negative. In Java 1.5, the scale can now be negative (see the javadoc). 
> If you look at the value 12500000 as a BigDecimal, in Java 1.5, this gets represented as 125 with a scale of -5. In 1.4, this would get represented as 12500000 with a scale of 0. 
> In Oracle's driver, they appear to do the conversion to an array of bytes to send to the driver themselves; I'm not sure which cases it will work for, but I'd suspect that it won't work correctly for a large number of negative scales. I'd guess that they designed it under 1.4 and didn't test it adequately under 1.5. "

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


[jira] Commented: (ODE-872) DECIMAL and NUMERIC types are not handled properly for xvar on Oracle

Posted by "Oleg Zenzin (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/ODE-872?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12888145#action_12888145 ] 

Oleg Zenzin commented on ODE-872:
---------------------------------

I can't find any refs to PXE, where?

> DECIMAL and NUMERIC types are not handled properly for xvar on Oracle
> ---------------------------------------------------------------------
>
>                 Key: ODE-872
>                 URL: https://issues.apache.org/jira/browse/ODE-872
>             Project: ODE
>          Issue Type: Bug
>          Components: BPEL Runtime
>    Affects Versions: 1.3.4
>         Environment: External Variables on Oracle 9g/10g
>            Reporter: Oleg Zenzin
>             Fix For: 1.3.5
>
>         Attachments: bpel-runtime.patch
>
>
> The external variables functionality can suffer form Oracle 9g/10g bug when run on Java 1.5. Essentially what happens is when a BigDecimal data is being updated or inserted the numbers like 125000 or others with trailing zeros can become "125", i.e. lose the zeros! The bug is discussed here: http://www.javalobby.org/java/forums/t88158.html. Here's an excerpt:
> "Between Java 1.4 and Java 1.5, the BigDecimal class changed. In Java 1.4, the scale must be non-negative. In Java 1.5, the scale can now be negative (see the javadoc). 
> If you look at the value 12500000 as a BigDecimal, in Java 1.5, this gets represented as 125 with a scale of -5. In 1.4, this would get represented as 12500000 with a scale of 0. 
> In Oracle's driver, they appear to do the conversion to an array of bytes to send to the driver themselves; I'm not sure which cases it will work for, but I'd suspect that it won't work correctly for a large number of negative scales. I'd guess that they designed it under 1.4 and didn't test it adequately under 1.5. "

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