openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Pinaki Poddar (JIRA)" <j...@apache.org>
Subject [jira] Commented: (OPENJPA-1565) QueryTimeOut and LockTimeOut exceptions are not raised correctly
Date Tue, 16 Mar 2010 17:16:27 GMT

    [ https://issues.apache.org/jira/browse/OPENJPA-1565?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12846005#action_12846005
] 

Pinaki Poddar commented on OPENJPA-1565:
----------------------------------------

I ran with mysql-connector-java-5.1.6 locally and the tests passed for 
MySQL.

I had given Jody a patch for DB2 errors -- will check if he can verify

Can you please send me the stacktrace of SQL error for  MS-SQL 2008?

Regards --

Pinaki 







"Donald Woods (JIRA)" <jira@apache.org> 
03/16/2010 11:36 AM

To
Pinaki Poddar/Dallas/IBM@IBMUS
cc

Subject
[jira] Issue Comment Edited: (OPENJPA-1565) QueryTimeOut and LockTimeOut 
exceptions are not raised correctly







    [ 
https://issues.apache.org/jira/browse/OPENJPA-1565?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12845979#action_12845979

] 

Donald Woods edited comment on OPENJPA-1565 at 3/16/10 4:35 PM:
----------------------------------------------------------------

Looks like this is causing new junit test failures on any DB besides 
Derby.

MySQL 2 tests -
1) 
TestTimeoutException.testQueryTimeOutExceptionWhileQueryingWithLocksOnAlreadyLockedEntities

   (org.apache.openjpa.persistence.query)
junit.framework.AssertionFailedError: junit.framework.AssertionFailedError 
was raised but expected javax.persistence.QueryTimeoutException
at 
org.apache.openjpa.persistence.query.TestTimeoutException.assertError(TestTimeoutException.java:141)
at 
org.apache.openjpa.persistence.query.TestTimeoutException.testQueryTimeOutExceptionWhileQueryingWithLocksOnAlreadyLockedEntities(TestTimeoutException.java:63)
2) 
TestTimeoutException.testLockTimeOutExceptionWhileLockingAlreadyLockedEntities 
    (org.apache.openjpa.persistence.query)
junit.framework.AssertionFailedError: junit.framework.AssertionFailedError 
was raised but expected javax.persistence.LockTimeoutException
at 
org.apache.openjpa.persistence.query.TestTimeoutException.assertError(TestTimeoutException.java:141)
at 
org.apache.openjpa.persistence.query.TestTimeoutException.testLockTimeOutExceptionWhileLockingAlreadyLockedEntities(TestTimeoutException.java:93)

Microsoft SQL 2008 - 1 test -
TestTimeoutException.testLockTimeOutExceptionWhileLockingAlreadyLockedEntities 
    (org.apache.openjpa.persistence.query)
junit.framework.AssertionFailedError: junit.framework.AssertionFailedError 
was raised but expected javax.persistence.LockTimeoutException
at 
org.apache.openjpa.persistence.query.TestTimeoutException.assertError(TestTimeoutException.java:141)
at 
org.apache.openjpa.persistence.query.TestTimeoutException.testLockTimeOutExceptionWhileLockingAlreadyLockedEntities(TestTimeoutException.java:93)


DB2 - 2 tests -
1) 
TestTimeoutException.testQueryTimeOutExceptionWhileQueryingWithLocksOnAlreadyLockedEntities

   (org.apache.openjpa.persistence.query)
junit.framework.AssertionFailedError: junit.framework.AssertionFailedError 
was raised but expected javax.persistence.QueryTimeoutException
at 
org.apache.openjpa.persistence.query.TestTimeoutException.assertError(TestTimeoutException.java:141)
at 
org.apache.openjpa.persistence.query.TestTimeoutException.testQueryTimeOutExceptionWhileQueryingWithLocksOnAlreadyLockedEntities(TestTimeoutException.java:63)
2) 
TestTimeoutException.testLockTimeOutExceptionWhileLockingAlreadyLockedEntities 
    (org.apache.openjpa.persistence.query)
junit.framework.AssertionFailedError: junit.framework.AssertionFailedError 
was raised but expected javax.persistence.LockTimeoutException
at 
org.apache.openjpa.persistence.query.TestTimeoutException.assertError(TestTimeoutException.java:141)
at 
org.apache.openjpa.persistence.query.TestTimeoutException.testLockTimeOutExceptionWhileLockingAlreadyLockedEntities(TestTimeoutException.java:93)


      was (Author: drwoods):
    Looks like this is causing new junit test failures on any DB besides 
Derby.

MySQL 2 tests -
1) 
TestTimeoutException.testQueryTimeOutExceptionWhileQueryingWithLocksOnAlreadyLockedEntities

   (org.apache.openjpa.persistence.query)
junit.framework.AssertionFailedError: junit.framework.AssertionFailedError 
was raised but expected javax.persistence.QueryTimeoutException
at 
org.apache.openjpa.persistence.query.TestTimeoutException.assertError(TestTimeoutException.java:141)
at 
org.apache.openjpa.persistence.query.TestTimeoutException.testQueryTimeOutExceptionWhileQueryingWithLocksOnAlreadyLockedEntities(TestTimeoutException.java:63)
2) 
TestTimeoutException.testLockTimeOutExceptionWhileLockingAlreadyLockedEntities 
    (org.apache.openjpa.persistence.query)
junit.framework.AssertionFailedError: junit.framework.AssertionFailedError 
was raised but expected javax.persistence.LockTimeoutException
at 
org.apache.openjpa.persistence.query.TestTimeoutException.assertError(TestTimeoutException.java:141)
at 
org.apache.openjpa.persistence.query.TestTimeoutException.testLockTimeOutExceptionWhileLockingAlreadyLockedEntities(TestTimeoutException.java:93)

Microsoft SQL 2008 - 1 test -
TestException.testThrowsEntityExistsException 
(org.apache.openjpa.persistence.exception)
junit.framework.AssertionFailedError: <openjpa-2.0.0-SNAPSHOT-runknown 
fatal store error> org.apache.openjpa.persistence.RollbackException: The 
transaction has been rolled back. See the nested exceptions for details on 
the errors that occurred. or its cause is not instanceof class 
javax.persistence.EntityExistsException
at junit.framework.Assert.fail(Assert.java:47)
at 
org.apache.openjpa.persistence.exception.TestException.assertException(TestException.java:207)

DB2 - 2 tests -
1) 
TestTimeoutException.testQueryTimeOutExceptionWhileQueryingWithLocksOnAlreadyLockedEntities

   (org.apache.openjpa.persistence.query)
junit.framework.AssertionFailedError: junit.framework.AssertionFailedError 
was raised but expected javax.persistence.QueryTimeoutException
at 
org.apache.openjpa.persistence.query.TestTimeoutException.assertError(TestTimeoutException.java:141)
at 
org.apache.openjpa.persistence.query.TestTimeoutException.testQueryTimeOutExceptionWhileQueryingWithLocksOnAlreadyLockedEntities(TestTimeoutException.java:63)
2) 
TestTimeoutException.testLockTimeOutExceptionWhileLockingAlreadyLockedEntities 
    (org.apache.openjpa.persistence.query)
junit.framework.AssertionFailedError: junit.framework.AssertionFailedError 
was raised but expected javax.persistence.LockTimeoutException
at 
org.apache.openjpa.persistence.query.TestTimeoutException.assertError(TestTimeoutException.java:141)
at 
org.apache.openjpa.persistence.query.TestTimeoutException.testLockTimeOutExceptionWhileLockingAlreadyLockedEntities(TestTimeoutException.java:93)

 
2.0.0-beta2
query or referential integrity violation does not distinguish correctly 
whether a query or lock request has timed out. 
QueryTimeOut and LockTimeOut exceptions are not supposed to cause rollback 
as per the spe (Section 3.9).

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




> QueryTimeOut and LockTimeOut exceptions are not raised correctly
> ----------------------------------------------------------------
>
>                 Key: OPENJPA-1565
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-1565
>             Project: OpenJPA
>          Issue Type: Bug
>          Components: jdbc, jpa, kernel, query, sql
>    Affects Versions: 2.0.0-M1, 2.0.0-M2, 2.0.0-M3, 2.0.0-beta, 2.0.0-beta2
>            Reporter: Pinaki Poddar
>            Assignee: Pinaki Poddar
>             Fix For: 2.0.0
>
>
> Narrowing SQL Exception to a more specific exception such as lock or query or referential
integrity violation does not distinguish correctly whether a query or lock request has timed
out. 
> This distinction is critical for JPA 2.0 spec compliance because QueryTimeOut and LockTimeOut
exceptions are not supposed to cause rollback as per the spe (Section 3.9).

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


Mime
View raw message