[ 
https://issues.apache.org/jira/browse/DERBY-5158?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13012130#comment-13012130
 ] 

Dag H. Wanvik commented on DERBY-5158:
--------------------------------------

In contrast, if we attempt to execute a query (taher than a rollback), we see 
the more understandable error stack trace whose ultimate cause is given as "No 
current connection":

1) 
testShutdown(org.apache.derbyTesting.functionTests.tests.store.Foo)java.sql.SQLNonTransientConnectionException:
 A network protocol error was encountered and the connection has been 
terminated: the requested command encountered an unarchitected and 
implementation-specific condition for which there was no architected message 
(additional information may be available in the derby.log file on the server)
        at 
org.apache.derby.client.am.SQLExceptionFactory40.getSQLException(SQLExceptionFactory40.java:71)
        at 
org.apache.derby.client.am.SqlException.getSQLException(SqlException.java:358)
        at org.apache.derby.client.am.Statement.executeQuery(Statement.java:486)
        at 
org.apache.derbyTesting.functionTests.tests.store.Foo.testShutdown(Foo.java:102)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at 
org.apache.derbyTesting.junit.BaseTestCase.runBare(BaseTestCase.java:112)
        at junit.extensions.TestDecorator.basicRun(TestDecorator.java:24)
        at junit.extensions.TestSetup$1.protect(TestSetup.java:21)
        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.extensions.TestSetup.run(TestSetup.java:25)
Caused by: org.apache.derby.client.am.DisconnectException: A network protocol 
error was encountered and the connection has been terminated: the requested 
command encountered an unarchitected and implementation-specific condition for 
which there was no architected message (additional information may be available 
in the derby.log file on the server)
        at 
org.apache.derby.client.net.NetConnectionReply.parseCMDCHKRM(NetConnectionReply.java:882)
        at 
org.apache.derby.client.net.NetStatementReply.parsePrepareError(NetStatementReply.java:550)
        at 
org.apache.derby.client.net.NetStatementReply.parsePRPSQLSTTreply(NetStatementReply.java:144)
        at 
org.apache.derby.client.net.NetStatementReply.readPrepareDescribeOutput(NetStatementReply.java:53)
        at 
org.apache.derby.client.net.StatementReply.readPrepareDescribeOutput(StatementReply.java:40)
        at 
org.apache.derby.client.net.NetStatement.readPrepareDescribeOutput_(NetStatement.java:138)
        at 
org.apache.derby.client.am.Statement.readPrepareDescribeOutput(Statement.java:1443)
        at org.apache.derby.client.am.Statement.flowExecute(Statement.java:2117)
        at 
org.apache.derby.client.am.Statement.executeQueryX(Statement.java:492)
        at org.apache.derby.client.am.Statement.executeQuery(Statement.java:477)
        ... 28 more
Caused by: java.lang.Exception: No current connection.

> Incomprehensible error message on client if attempting rollback after 
> database has been shut down.
> --------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-5158
>                 URL: https://issues.apache.org/jira/browse/DERBY-5158
>             Project: Derby
>          Issue Type: Bug
>            Reporter: Dag H. Wanvik
>            Priority: Minor
>
> Cf the attached repro: when performing the rollback after the database has 
> been shutdown, we see this error:
> There was 1 error:
> 1) 
> testShutdown(org.apache.derbyTesting.functionTests.tests.store.Foo)java.sql.SQLNonTransientConnectionException:
>  Network protocol exception: actual code point, 4,692, does not match 
> expected code point, 9,224.  The connection has been terminated.
>       at 
> org.apache.derby.client.am.SQLExceptionFactory40.getSQLException(SQLExceptionFactory40.java:71)
>       at 
> org.apache.derby.client.am.SqlException.getSQLException(SqlException.java:358)
>       at org.apache.derby.client.am.Connection.rollback(Connection.java:659)
>       at 
> org.apache.derbyTesting.junit.BaseJDBCTestCase.rollback(BaseJDBCTestCase.java:387)
>       at 
> org.apache.derbyTesting.functionTests.tests.store.Foo.testShutdown(Foo.java:100)
>       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>       at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>       at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>       at 
> org.apache.derbyTesting.junit.BaseTestCase.runBare(BaseTestCase.java:112)
>       at junit.extensions.TestDecorator.basicRun(TestDecorator.java:24)
>       at junit.extensions.TestSetup$1.protect(TestSetup.java:21)
>       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.extensions.TestSetup.run(TestSetup.java:25)
> Caused by: org.apache.derby.client.am.DisconnectException: Network protocol 
> exception: actual code point, 4,692, does not match expected code point, 
> 9,224.  The connection has been terminated.
>       at 
> org.apache.derby.client.net.Reply.parseLengthAndMatchCodePoint(Reply.java:1075)
>       at 
> org.apache.derby.client.net.NetConnectionReply.parseSQLCARD(NetConnectionReply.java:2572)
>       at 
> org.apache.derby.client.net.NetConnectionReply.parseRDBRLLBCKreply(NetConnectionReply.java:219)
>       at 
> org.apache.derby.client.net.NetConnectionReply.readLocalRollback(NetConnectionReply.java:141)
>       at 
> org.apache.derby.client.net.ConnectionReply.readLocalRollback(ConnectionReply.java:48)
>       at 
> org.apache.derby.client.net.NetConnection.readLocalRollback_(NetConnection.java:1515)
>       at 
> org.apache.derby.client.am.Connection.readRollback(Connection.java:707)
>       at 
> org.apache.derby.client.am.Connection.flowRollback(Connection.java:690)
>       at org.apache.derby.client.am.Connection.rollback(Connection.java:655)
>       ... 29 more

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to