You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tuscany.apache.org by "René de Bloois (JIRA)" <tu...@ws.apache.org> on 2008/03/26 11:27:25 UTC

[jira] Created: (TUSCANY-2139) When updating the PK it builds the wrong WHERE clause

When updating the PK it builds the wrong WHERE clause
-----------------------------------------------------

                 Key: TUSCANY-2139
                 URL: https://issues.apache.org/jira/browse/TUSCANY-2139
             Project: Tuscany
          Issue Type: Bug
          Components: Java DAS RDB
         Environment: Version is Java-DAS-1.0-beta2 (wasn't an available choice in the "Affects Version/s" select box)
            Reporter: René de Bloois
            Priority: Blocker


I updated the CODE and the ID column (ID is the PK) and get the following logging:

DEBUG  11:06:49,524  org.apache.tuscany.das.rdb.impl.Statement                              | Executing statement update TICK_CLIENT set CODE = ?, ID = ? where ID = ? and CODE = ? and ID = ?
DEBUG  11:06:49,524  org.apache.tuscany.das.rdb.impl.Statement                              | Setting parameter 1 to test6
DEBUG  11:06:49,524  org.apache.tuscany.das.rdb.impl.Statement                              | Setting parameter 2 to test6
DEBUG  11:06:49,524  org.apache.tuscany.das.rdb.impl.Statement                              | Setting parameter 3 to test6
DEBUG  11:06:49,524  org.apache.tuscany.das.rdb.impl.Statement                              | Setting parameter 4 to test5
DEBUG  11:06:49,524  org.apache.tuscany.das.rdb.impl.Statement                              | Setting parameter 5 to test

So the ID is put twice in the WHERE clause with different values (the old value and the new). This will never update a record and results in:

org.apache.tuscany.das.rdb.exception.OptimisticConcurrencyException: An update collision occurred


-- 
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: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org


[jira] Commented: (TUSCANY-2139) When updating the PK it builds the wrong WHERE clause

Posted by "René de Bloois (JIRA)" <tu...@ws.apache.org>.
    [ https://issues.apache.org/jira/browse/TUSCANY-2139?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12582331#action_12582331 ] 

René de Bloois commented on TUSCANY-2139:
-----------------------------------------

Ah, so the difference is too great. That's a problem.

It will be difficult for me to create a new patch just now. I did my fix on the source of beta2 which I temporarily included in our project. I don't have a working development environment for tuscany DAS right now. I tried running mvn but I got Connection Refused running the tests. Maybe caused by my company's firewall. I have to run it at home then.

I hope I'll find the time this weekend. If you already made the fix manually by looking at the patch, please add a comment to this issue, then I'll see that it is fixed already (saves some time for me :-).

Thanx,
René de Bloois


> When updating the PK it builds the wrong WHERE clause
> -----------------------------------------------------
>
>                 Key: TUSCANY-2139
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-2139
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java DAS RDB
>         Environment: Version is Java-DAS-1.0-beta2 (wasn't an available choice in the "Affects Version/s" select box)
>            Reporter: René de Bloois
>            Priority: Blocker
>         Attachments: TUSCANY-2139.patch
>
>
> I updated the CODE and the ID column (ID is the PK) and get the following logging:
> DEBUG  11:06:49,524  org.apache.tuscany.das.rdb.impl.Statement                              | Executing statement update TICK_CLIENT set CODE = ?, ID = ? where ID = ? and CODE = ? and ID = ?
> DEBUG  11:06:49,524  org.apache.tuscany.das.rdb.impl.Statement                              | Setting parameter 1 to test6
> DEBUG  11:06:49,524  org.apache.tuscany.das.rdb.impl.Statement                              | Setting parameter 2 to test6
> DEBUG  11:06:49,524  org.apache.tuscany.das.rdb.impl.Statement                              | Setting parameter 3 to test6
> DEBUG  11:06:49,524  org.apache.tuscany.das.rdb.impl.Statement                              | Setting parameter 4 to test5
> DEBUG  11:06:49,524  org.apache.tuscany.das.rdb.impl.Statement                              | Setting parameter 5 to test
> So the ID is put twice in the WHERE clause with different values (the old value and the new). This will never update a record and results in:
> org.apache.tuscany.das.rdb.exception.OptimisticConcurrencyException: An update collision occurred

-- 
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: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org


[jira] Updated: (TUSCANY-2139) When updating the PK it builds the wrong WHERE clause

Posted by "René de Bloois (JIRA)" <tu...@ws.apache.org>.
     [ https://issues.apache.org/jira/browse/TUSCANY-2139?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

René de Bloois updated TUSCANY-2139:
------------------------------------

    Attachment: TUSCANY-2139.patch

This patch works for me.

> When updating the PK it builds the wrong WHERE clause
> -----------------------------------------------------
>
>                 Key: TUSCANY-2139
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-2139
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java DAS RDB
>         Environment: Version is Java-DAS-1.0-beta2 (wasn't an available choice in the "Affects Version/s" select box)
>            Reporter: René de Bloois
>            Priority: Blocker
>         Attachments: TUSCANY-2139.patch
>
>
> I updated the CODE and the ID column (ID is the PK) and get the following logging:
> DEBUG  11:06:49,524  org.apache.tuscany.das.rdb.impl.Statement                              | Executing statement update TICK_CLIENT set CODE = ?, ID = ? where ID = ? and CODE = ? and ID = ?
> DEBUG  11:06:49,524  org.apache.tuscany.das.rdb.impl.Statement                              | Setting parameter 1 to test6
> DEBUG  11:06:49,524  org.apache.tuscany.das.rdb.impl.Statement                              | Setting parameter 2 to test6
> DEBUG  11:06:49,524  org.apache.tuscany.das.rdb.impl.Statement                              | Setting parameter 3 to test6
> DEBUG  11:06:49,524  org.apache.tuscany.das.rdb.impl.Statement                              | Setting parameter 4 to test5
> DEBUG  11:06:49,524  org.apache.tuscany.das.rdb.impl.Statement                              | Setting parameter 5 to test
> So the ID is put twice in the WHERE clause with different values (the old value and the new). This will never update a record and results in:
> org.apache.tuscany.das.rdb.exception.OptimisticConcurrencyException: An update collision occurred

-- 
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: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org


[jira] Commented: (TUSCANY-2139) When updating the PK it builds the wrong WHERE clause

Posted by "Adriano Crestani (JIRA)" <tu...@ws.apache.org>.
    [ https://issues.apache.org/jira/browse/TUSCANY-2139?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12582318#action_12582318 ] 

Adriano Crestani commented on TUSCANY-2139:
-------------------------------------------

Hi René,

The patch seems out of date. I think you need to update your trunk and regenerate tha patch. Then attach the patch again ; )

Thanks,
Adriano Crestani

> When updating the PK it builds the wrong WHERE clause
> -----------------------------------------------------
>
>                 Key: TUSCANY-2139
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-2139
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java DAS RDB
>         Environment: Version is Java-DAS-1.0-beta2 (wasn't an available choice in the "Affects Version/s" select box)
>            Reporter: René de Bloois
>            Priority: Blocker
>         Attachments: TUSCANY-2139.patch
>
>
> I updated the CODE and the ID column (ID is the PK) and get the following logging:
> DEBUG  11:06:49,524  org.apache.tuscany.das.rdb.impl.Statement                              | Executing statement update TICK_CLIENT set CODE = ?, ID = ? where ID = ? and CODE = ? and ID = ?
> DEBUG  11:06:49,524  org.apache.tuscany.das.rdb.impl.Statement                              | Setting parameter 1 to test6
> DEBUG  11:06:49,524  org.apache.tuscany.das.rdb.impl.Statement                              | Setting parameter 2 to test6
> DEBUG  11:06:49,524  org.apache.tuscany.das.rdb.impl.Statement                              | Setting parameter 3 to test6
> DEBUG  11:06:49,524  org.apache.tuscany.das.rdb.impl.Statement                              | Setting parameter 4 to test5
> DEBUG  11:06:49,524  org.apache.tuscany.das.rdb.impl.Statement                              | Setting parameter 5 to test
> So the ID is put twice in the WHERE clause with different values (the old value and the new). This will never update a record and results in:
> org.apache.tuscany.das.rdb.exception.OptimisticConcurrencyException: An update collision occurred

-- 
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: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org


[jira] Updated: (TUSCANY-2139) When updating the PK it builds the wrong WHERE clause

Posted by "René de Bloois (JIRA)" <tu...@ws.apache.org>.
     [ https://issues.apache.org/jira/browse/TUSCANY-2139?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

René de Bloois updated TUSCANY-2139:
------------------------------------

    Patch Info: [Patch Available]

Added patch.

> When updating the PK it builds the wrong WHERE clause
> -----------------------------------------------------
>
>                 Key: TUSCANY-2139
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-2139
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java DAS RDB
>         Environment: Version is Java-DAS-1.0-beta2 (wasn't an available choice in the "Affects Version/s" select box)
>            Reporter: René de Bloois
>            Priority: Blocker
>         Attachments: TUSCANY-2139.patch
>
>
> I updated the CODE and the ID column (ID is the PK) and get the following logging:
> DEBUG  11:06:49,524  org.apache.tuscany.das.rdb.impl.Statement                              | Executing statement update TICK_CLIENT set CODE = ?, ID = ? where ID = ? and CODE = ? and ID = ?
> DEBUG  11:06:49,524  org.apache.tuscany.das.rdb.impl.Statement                              | Setting parameter 1 to test6
> DEBUG  11:06:49,524  org.apache.tuscany.das.rdb.impl.Statement                              | Setting parameter 2 to test6
> DEBUG  11:06:49,524  org.apache.tuscany.das.rdb.impl.Statement                              | Setting parameter 3 to test6
> DEBUG  11:06:49,524  org.apache.tuscany.das.rdb.impl.Statement                              | Setting parameter 4 to test5
> DEBUG  11:06:49,524  org.apache.tuscany.das.rdb.impl.Statement                              | Setting parameter 5 to test
> So the ID is put twice in the WHERE clause with different values (the old value and the new). This will never update a record and results in:
> org.apache.tuscany.das.rdb.exception.OptimisticConcurrencyException: An update collision occurred

-- 
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: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org


[jira] Resolved: (TUSCANY-2139) When updating the PK it builds the wrong WHERE clause

Posted by "René de Bloois (JIRA)" <tu...@ws.apache.org>.
     [ https://issues.apache.org/jira/browse/TUSCANY-2139?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

René de Bloois resolved TUSCANY-2139.
-------------------------------------

    Resolution: Cannot Reproduce

Never mind, the problem seems to be fixed already in the last revision.
Maybe it is time to make a new release (beta3) :-)


> When updating the PK it builds the wrong WHERE clause
> -----------------------------------------------------
>
>                 Key: TUSCANY-2139
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-2139
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java DAS RDB
>         Environment: Version is Java-DAS-1.0-beta2 (wasn't an available choice in the "Affects Version/s" select box)
>            Reporter: René de Bloois
>            Priority: Blocker
>         Attachments: TUSCANY-2139.patch
>
>
> I updated the CODE and the ID column (ID is the PK) and get the following logging:
> DEBUG  11:06:49,524  org.apache.tuscany.das.rdb.impl.Statement                              | Executing statement update TICK_CLIENT set CODE = ?, ID = ? where ID = ? and CODE = ? and ID = ?
> DEBUG  11:06:49,524  org.apache.tuscany.das.rdb.impl.Statement                              | Setting parameter 1 to test6
> DEBUG  11:06:49,524  org.apache.tuscany.das.rdb.impl.Statement                              | Setting parameter 2 to test6
> DEBUG  11:06:49,524  org.apache.tuscany.das.rdb.impl.Statement                              | Setting parameter 3 to test6
> DEBUG  11:06:49,524  org.apache.tuscany.das.rdb.impl.Statement                              | Setting parameter 4 to test5
> DEBUG  11:06:49,524  org.apache.tuscany.das.rdb.impl.Statement                              | Setting parameter 5 to test
> So the ID is put twice in the WHERE clause with different values (the old value and the new). This will never update a record and results in:
> org.apache.tuscany.das.rdb.exception.OptimisticConcurrencyException: An update collision occurred

-- 
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: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org