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

Donald Woods commented on OPENJPA-964:
--------------------------------------

Example junit test output testing for the exception -
997  TRACE  [main] openjpa.Query - Executing query: [UPDATE QTimeout SET 
stringField = ? WHERE id = 1] with parameters: {1=updated}
997  TRACE  [main] openjpa.jdbc.SQL - <t 9517133, conn 15562893> executing 
prepstmnt 1183826 UPDATE QTimeout SET stringField = ? WHERE id = 1 
[params=(String) updated]
11144  TRACE  [main] openjpa.jdbc.SQL - <t 9517133, conn 15562893> [10147 ms] 
spent
13305  test  TRACE  [main] Tests - testQueryTimeout31c() - Caught expected 
Exception =
<openjpa-2.0.0-SNAPSHOT-r422266:764279M nonfatal store error> 
org.apache.openjpa.persistence.QueryTimeoutException: A query statement timeout 
has occurred.
        at 
org.apache.openjpa.jdbc.sql.DBDictionary.narrow(DBDictionary.java:4379)
...
Caused by: org.apache.openjpa.lib.jdbc.ReportingSQLException: ORA-01013: user 
requested cancel of current operation {prepstmnt 1183826 UPDATE QTimeout SET 
stringField = ? WHERE id = 1 [params=(String) updated]} [code=1013, state=72000]
        at 
org.apache.openjpa.lib.jdbc.LoggingConnectionDecorator.wrap(LoggingConnectionDecorator.java:236)
...
NestedThrowables:java.sql.SQLException: ORA-01013: user requested cancel of 
current operation
        at 
oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)


> Finish updating sql-error-state- codes.xml for query timeout support on other 
> DBs
> ---------------------------------------------------------------------------------
>
>                 Key: OPENJPA-964
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-964
>             Project: OpenJPA
>          Issue Type: Sub-task
>          Components: query
>    Affects Versions: 2.0.0
>            Reporter: Donald Woods
>            Assignee: Donald Woods
>             Fix For: 2.0.0
>
>         Attachments: OPENJPA-964-part1.patch, OPENJPA-964-part1.patch
>
>
> Need to add any SQLStatus codes for query timeouts to sql-error-state- 
> codes.xml and handle setting isRecoverable/isFatal in each DBDictionary 
> subclass for other supported DBs besides Derby and DB2.

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

Reply via email to