db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kathey Marsden (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (DERBY-5919) Network Server connection gets destroyed after isValid(#) times out.
Date Wed, 03 Jul 2013 15:40:23 GMT

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

Kathey Marsden updated DERBY-5919:
----------------------------------

    Issue & fix info: High Value Fix,Newcomer,Repro attached  (was: Newcomer,Repro attached)
    
> Network Server connection gets destroyed after isValid(#) times out.
> --------------------------------------------------------------------
>
>                 Key: DERBY-5919
>                 URL: https://issues.apache.org/jira/browse/DERBY-5919
>             Project: Derby
>          Issue Type: Bug
>          Components: Network Server
>    Affects Versions: 10.9.1.0
>            Reporter: Myrna van Lunteren
>              Labels: derby_triage10_10
>
> When a call to Connection.isValid(timoutvalue) actually times out, the connection is
destroyed.
> For instance, the following test snippet:
>         // Test with a large timeout, see DERBY-5912.
>         boolean convalid=true;
>         Connection conn=getConnection();
>         
>         // with a longer time out, the isValid call should not
>         // time out when the sleep is shorter.
>         convalid=conn.isValid(200);
>         assertTrue(convalid);
>         
>         // setting the timeout to 1 should timeout if the sleep
>         // is 2 seconds.
>         convalid=conn.isValid(1);
>         assertFalse(convalid);
>         
>         conn.rollback();
> Results in an assertion on the rollback:
> java.sql.SQLNonTransientConnectionException: No current connection.
> 	at org.apache.derby.client.am.SQLExceptionFactory40.getSQLException(SQLExceptionFactory40.java:70)
> 	at org.apache.derby.client.am.SqlException.getSQLException(SqlException.java:364)
> 	at org.apache.derby.client.am.Connection.rollback(Connection.java:668)
> 	at org.apache.derbyTesting.functionTests.tests.jdbc4.ConnectionTest.testIsValidWithTimeout(ConnectionTest.java:214)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
> 	at java.lang.reflect.Method.invoke(Method.java:611)
> 	at junit.framework.TestCase.runTest(TestCase.java:164)
> 	at junit.framework.TestCase.runBare(TestCase.java:130)
> 	at org.apache.derbyTesting.junit.BaseTestCase.runBare(BaseTestCase.java:117)
> 	at org.apache.derbyTesting.junit.BaseJDBCTestCase.runBareOverridable(BaseJDBCTestCase.java:424)
> 	at org.apache.derbyTesting.junit.BaseJDBCTestCase.runBare(BaseJDBCTestCase.java:441)
> 	at junit.framework.TestResult$1.protect(TestResult.java:106)
> 	at junit.framework.TestResult.runProtected(TestResult.java:124)
> 	at junit.framework.TestResult.run(TestResult.java:109)
> 	at junit.framework.TestCase.run(TestCase.java:120)
> 	at junit.framework.TestSuite.runTest(TestSuite.java:230)
> 	at junit.framework.TestSuite.run(TestSuite.java:225)
> 	at junit.framework.TestSuite.runTest(TestSuite.java:230)
> 	at junit.framework.TestSuite.run(TestSuite.java:225)
> 	at junit.extensions.TestDecorator.basicRun(TestDecorator.java:24)
> 	at junit.extensions.TestSetup$1.protect(TestSetup.java:21)
> 	at junit.framework.TestResult.runProtected(TestResult.java:124)
> 	at junit.extensions.TestSetup.run(TestSetup.java:25)
> 	at org.apache.derbyTesting.junit.BaseTestSetup.run(BaseTestSetup.java:57)
> 	at junit.extensions.TestDecorator.basicRun(TestDecorator.java:24)
> 	at junit.extensions.TestSetup$1.protect(TestSetup.java:21)
> 	at junit.framework.TestResult.runProtected(TestResult.java:124)
> 	at junit.extensions.TestSetup.run(TestSetup.java:25)
> 	at junit.framework.TestSuite.runTest(TestSuite.java:230)
> 	at junit.framework.TestSuite.run(TestSuite.java:225)
> 	at junit.textui.TestRunner.doRun(TestRunner.java:121)
> 	at junit.textui.TestRunner.start(TestRunner.java:185)
> 	at junit.textui.TestRunner.main(TestRunner.java:143)
> Caused by: org.apache.derby.client.am.SqlException: No current connection.
> 	at org.apache.derby.client.am.Connection.checkForClosedConnection(Connection.java:2303)
> 	at org.apache.derby.client.am.Connection.rollback(Connection.java:661)
> 	... 32 more

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message