db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Knut Anders Hatlen (JIRA)" <j...@apache.org>
Subject [jira] Updated: (DERBY-3076) Statement timeout should throw SQLTimeoutException
Date Fri, 14 Sep 2007 12:57:32 GMT

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

Knut Anders Hatlen updated DERBY-3076:
--------------------------------------

    Attachment: timeout.java

Attached is a repro. derbyTesting.jar must be in the classpath since the repro uses a user-defined
function from SetQueryTimeoutTest.

Exception in thread "main" java.sql.SQLException: The statement has been cancelled or timed
out.
        at org.apache.derby.impl.jdbc.SQLExceptionFactory40.getSQLException(Unknown Source)
        at org.apache.derby.impl.jdbc.Util.generateCsSQLException(Unknown Source)
        at org.apache.derby.impl.jdbc.TransactionResourceImpl.wrapInSQLException(Unknown Source)
        at org.apache.derby.impl.jdbc.TransactionResourceImpl.handleException(Unknown Source)
        at org.apache.derby.impl.jdbc.EmbedConnection.handleException(Unknown Source)
        at org.apache.derby.impl.jdbc.ConnectionChild.handleException(Unknown Source)
        at org.apache.derby.impl.jdbc.EmbedResultSet.closeOnTransactionError(Unknown Source)
        at org.apache.derby.impl.jdbc.EmbedResultSet.movePosition(Unknown Source)
        at org.apache.derby.impl.jdbc.EmbedResultSet.next(Unknown Source)
        at timeout.main(timeout.java:12)
Caused by: java.sql.SQLException: The statement has been cancelled or timed out.
        at org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(Unknown Source)
        at org.apache.derby.impl.jdbc.SQLExceptionFactory40.wrapArgsForTransportAcrossDRDA(Unknown
Source)
        ... 10 more
Caused by: ERROR XCL52: The statement has been cancelled or timed out.
        at org.apache.derby.iapi.error.StandardException.newException(Unknown Source)
        at org.apache.derby.impl.sql.execute.BasicNoPutResultSetImpl.checkCancellationFlag(Unknown
Source)
        at org.apache.derby.impl.sql.execute.BulkTableScanResultSet.getNextRowCore(Unknown
Source)
        at org.apache.derby.impl.sql.execute.ProjectRestrictResultSet.getNextRowCore(Unknown
Source)
        at org.apache.derby.impl.sql.execute.BasicNoPutResultSetImpl.getNextRow(Unknown Source)
        ... 3 more

> Statement timeout should throw SQLTimeoutException
> --------------------------------------------------
>
>                 Key: DERBY-3076
>                 URL: https://issues.apache.org/jira/browse/DERBY-3076
>             Project: Derby
>          Issue Type: Improvement
>          Components: JDBC
>    Affects Versions: 10.4.0.0
>         Environment: JDBC 4.0 driver
>            Reporter: Knut Anders Hatlen
>            Priority: Minor
>         Attachments: timeout.java
>
>
> When a query times out (because Statement.setQueryTimeout() has been called), a plain
SQLException is thrown. JDBC 4.0 defines a sub-class SQLTimeoutException for these errors.
Derby should throw SQLTimeoutException if such timeouts occur.
> From SQLTimeoutException's javadoc:
> > The subclass of SQLException thrown when the timeout specified by Statement  has
expired.
> >
> > This exception does not correspond to a standard SQLState.

-- 
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