openjpa-dev mailing list archives

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

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

Donald Woods reopened OPENJPA-1565:
-----------------------------------


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)


> 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