You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-dev@db.apache.org by "Dag H. Wanvik (JIRA)" <ji...@apache.org> on 2011/03/28 18:43:05 UTC

[jira] [Created] (DERBY-5158) Incomprehensible error message on client if attempting rollback after database has been shut down.

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

[jira] [Updated] (DERBY-5158) Incomprehensible error message on client if attempting rollback after database has been shut down.

Posted by "Dag H. Wanvik (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-5158?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Dag H. Wanvik updated DERBY-5158:
---------------------------------

      Issue & fix info: [Patch Available]
    Bug behavior facts: [Embedded/Client difference]

> 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
>            Assignee: Dag H. Wanvik
>            Priority: Minor
>         Attachments: DERBY-5158a.diff, DERBY-5158a.stat, Derby5158Repro.java
>
>
> 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

[jira] [Commented] (DERBY-5158) Incomprehensible error message on client if attempting rollback after database has been shut down.

Posted by "Dag H. Wanvik (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-5158?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13012144#comment-13012144 ] 

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

A commit in the same location as the rollback, does not throw.


> 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
>         Attachments: Derby5158Repro.java
>
>
> 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

[jira] [Commented] (DERBY-5158) Incomprehensible error message on client if attempting rollback after database has been shut down.

Posted by "Dag H. Wanvik (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-5158?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13012138#comment-13012138 ] 

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

The problem seems to be the following:

In DRDAConnThread#processCommands we have this code for rollback:

     case CodePoint.RDBCMM:
             try {..}
             catch (SQLException e)
             {
                     writer.clearDSSesBackToMark(writerMark);
                     // Even in case of error, we have to write the ENDUOWRM.
                     writeENDUOWRM(COMMIT);
                     writeSQLCARDs(e, 0);
                     errorInChain(e);
             }

i.e. we send an ENDUOWRM, then the writeSQLCARDs will send a CMDCHKRM (severe error), then
the SQLCARD.

However, on the client side, we see this code to handle reply for rollback:

    private void parseRDBRLLBCKreply(ConnectionCallbackInterface connection) 
        throws DisconnectException {
        int peekCP = parseTypdefsOrMgrlvlovrs();
        if (peekCP != CodePoint.ENDUOWRM) {  <---------------- Note!
            parseRollbackError();
            return;
        }

        parseENDUOWRM(connection);
        peekCP = parseTypdefsOrMgrlvlovrs();

        NetSqlca netSqlca = parseSQLCARD(null);
        connection.completeSqlca(netSqlca);
    }

that is, parseRollbackError is only executed iff ENDUOWRM is not
returned. But we just saw that the server side sent a ENDUOWRM even
under an error condition. So, the client will happily
parseENDUOWRM and then expect SQLCARD when there is actually a CMDCHKRM
waiting. hence the code point error. I am not sure which side is
correct here, but maybe you DRDA experts can help out ;-)


> 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
>         Attachments: Derby5158Repro.java
>
>
> 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

[jira] [Commented] (DERBY-5158) Incomprehensible error message on client if attempting rollback after database has been shut down.

Posted by "Dag H. Wanvik (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-5158?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13012139#comment-13012139 ] 

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

Btw, code point 4692 (0x1254) is CMDCHKRM,  9224 (0x2408) is SQLCARD.

> 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
>         Attachments: Derby5158Repro.java
>
>
> 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

[jira] [Commented] (DERBY-5158) Incomprehensible error message on client if attempting rollback after database has been shut down.

Posted by "Dag H. Wanvik (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-5158?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13012745#comment-13012745 ] 

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

The reason the commit does not throw is that the repro did not switch off autocommit, so the commit is never sent to the server (DERBY-4653 optimization).

> 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
>         Attachments: Derby5158Repro.java
>
>
> 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

[jira] [Updated] (DERBY-5158) Incomprehensible error message on client if attempting rollback after database has been shut down.

Posted by "Dag H. Wanvik (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-5158?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Dag H. Wanvik updated DERBY-5158:
---------------------------------

    Attachment: Derby5158Repro.java

> 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
>         Attachments: Derby5158Repro.java
>
>
> 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

[jira] [Updated] (DERBY-5158) Incomprehensible error message on client if attempting rollback after database has been shut down.

Posted by "Dag H. Wanvik (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-5158?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Dag H. Wanvik updated DERBY-5158:
---------------------------------

    Issue & fix info: [Patch Available, Repro attached]  (was: [Patch Available])

> 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
>            Assignee: Dag H. Wanvik
>            Priority: Minor
>         Attachments: DERBY-5158a.diff, DERBY-5158a.stat, Derby5158Repro.java
>
>
> 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

[jira] [Issue Comment Edited] (DERBY-5158) Incomprehensible error message on client if attempting rollback after database has been shut down.

Posted by "Dag H. Wanvik (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-5158?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13012130#comment-13012130 ] 

Dag H. Wanvik edited comment on DERBY-5158 at 3/28/11 4:49 PM:
---------------------------------------------------------------

In contrast, if we attempt to execute a query (rather 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.

      was (Author: dagw):
    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

[jira] [Commented] (DERBY-5158) Incomprehensible error message on client if attempting rollback after database has been shut down.

Posted by "Dag H. Wanvik (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-5158?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13016787#comment-13016787 ] 

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

Re-ran suites.All ok with version "b", modulo a new instance of DERBY-5003.

> 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
>            Assignee: Dag H. Wanvik
>            Priority: Minor
>         Attachments: DERBY-5158a.diff, DERBY-5158a.stat, DERBY-5158b.diff, DERBY-5158b.stat, Derby5158Repro.java
>
>
> 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

[jira] [Updated] (DERBY-5158) Incomprehensible error message on client if attempting rollback after database has been shut down.

Posted by "Dag H. Wanvik (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-5158?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Dag H. Wanvik updated DERBY-5158:
---------------------------------

    Attachment: DERBY-5158a.stat
                DERBY-5158a.diff

Attaching a patch, DERBY-5158a, which corrects the protocol code on the client side to cater for ENDUOWRM even in the error case (as sent by the server). Looking at the DRDA standard, I didn't quite manage to satisfy myself that this is the correct behavior, but almost: section 7.5 Commit/Rollback processing, where CR2 says:

"Application servers using remote unit of work protocols and application servers using distributed unit of work but not protected by a sync point manager must inform the application requester when the current unit of work at the application server ends as a result of a commit or rollback request by an application or application requester request. This information is returned in the RPYDSS, containing the ENDUOWRM reply message."

So, does the above apply when an error happens (the database has already been shut down, so no connection can be established)? In a way, the "remote unit of work" is definitely ended, so...

Note that the (new) error stack trace is still different than with the embedded driver, since there the 08003 will be directly reported as the error (not wrapped in 06006 as shown below for the client side). 

I added a new test, Derby5158Test, not being sure where to put this new test case (I didn't find any specific tests for commit/rollback), if you know a better placement for it, let me know! I could always put it in ShutdownDatabaseTest, I guess..

Running regressions.

With this new code, the following error stack dump can be seen on the client side, which shows that the underlyinc cause of the error is 08003. "No current connection".

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.Connection.rollback(Connection.java:659)
	at org.apache.derbyTesting.functionTests.tests.jdbcapi.Derby5158Test.testShutdown(Derby5158Test.java:71)
	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:880)
	at org.apache.derby.client.net.NetConnectionReply.parseRollbackError(NetConnectionReply.java:359)
	at org.apache.derby.client.net.NetConnectionReply.parseRDBRLLBCKreply(NetConnectionReply.java:216)
	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)
	... 28 more
Caused by: org.apache.derby.client.am.SqlException: DERBY SQL error: SQLCODE: -1, SQLSTATE: 08003, SQLERRMC: No current connection.
	... 37 more


> 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
>         Attachments: DERBY-5158a.diff, DERBY-5158a.stat, Derby5158Repro.java
>
>
> 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

[jira] [Commented] (DERBY-5158) Incomprehensible error message on client if attempting rollback after database has been shut down.

Posted by "Bryan Pendleton (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-5158?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13015723#comment-13015723 ] 

Bryan Pendleton commented on DERBY-5158:
----------------------------------------

I find your reading of the documents reasonable, and the behavior of the system with
your change is clearly superior to the prior behavior. Having "No current connection"
appear in the stack trace (which your change does) should provide adequate information
for a motivated developer to figure out that they've attempted a rollback but are
not currently connected to the database, which seems like the basic goal of your fix.

So, +1 from me!


> 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
>            Assignee: Dag H. Wanvik
>            Priority: Minor
>         Attachments: DERBY-5158a.diff, DERBY-5158a.stat, Derby5158Repro.java
>
>
> 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

[jira] [Commented] (DERBY-5158) Incomprehensible error message on client if attempting rollback after database has been shut down.

Posted by "Dag H. Wanvik (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-5158?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13016790#comment-13016790 ] 

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

Committed as svn 1089795, resolving.

> 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
>            Assignee: Dag H. Wanvik
>            Priority: Minor
>         Attachments: DERBY-5158a.diff, DERBY-5158a.stat, DERBY-5158b.diff, DERBY-5158b.stat, Derby5158Repro.java
>
>
> 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

[jira] [Updated] (DERBY-5158) Incomprehensible error message on client if attempting rollback after database has been shut down.

Posted by "Kathey Marsden (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-5158?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kathey Marsden updated DERBY-5158:
----------------------------------

    Fix Version/s: 10.9.0.0

Should we consider this for backport?

> 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
>            Assignee: Dag H. Wanvik
>            Priority: Minor
>             Fix For: 10.9.0.0
>
>         Attachments: DERBY-5158a.diff, DERBY-5158a.stat, DERBY-5158b.diff, DERBY-5158b.stat, Derby5158Repro.java
>
>
> 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

        

[jira] [Commented] (DERBY-5158) Incomprehensible error message on client if attempting rollback after database has been shut down.

Posted by "Dag H. Wanvik (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-5158?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13012751#comment-13012751 ] 

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

By adding setAUtoCommit(false) in Derby5158Repro#setUp, we see the issue also for commit.


> 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
>         Attachments: Derby5158Repro.java
>
>
> 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

[jira] [Commented] (DERBY-5158) Incomprehensible error message on client if attempting rollback after database has been shut down.

Posted by "Dag H. Wanvik (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-5158?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13015899#comment-13015899 ] 

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

Thanks, Bryan! Yes, that was my goal indeed. Regressions ran ok.


> 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
>            Assignee: Dag H. Wanvik
>            Priority: Minor
>         Attachments: DERBY-5158a.diff, DERBY-5158a.stat, Derby5158Repro.java
>
>
> 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

[jira] [Commented] (DERBY-5158) Incomprehensible error message on client if attempting rollback after database has been shut down.

Posted by "Dag H. Wanvik (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-5158?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13086683#comment-13086683 ] 

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

I think it would be fine if you think it is important enough.

> 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
>            Assignee: Dag H. Wanvik
>            Priority: Minor
>             Fix For: 10.9.0.0
>
>         Attachments: DERBY-5158a.diff, DERBY-5158a.stat, DERBY-5158b.diff, DERBY-5158b.stat, Derby5158Repro.java
>
>
> 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

        

[jira] [Assigned] (DERBY-5158) Incomprehensible error message on client if attempting rollback after database has been shut down.

Posted by "Dag H. Wanvik (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-5158?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Dag H. Wanvik reassigned DERBY-5158:
------------------------------------

    Assignee: Dag H. Wanvik

> 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
>            Assignee: Dag H. Wanvik
>            Priority: Minor
>         Attachments: DERBY-5158a.diff, DERBY-5158a.stat, Derby5158Repro.java
>
>
> 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

[jira] [Closed] (DERBY-5158) Incomprehensible error message on client if attempting rollback after database has been shut down.

Posted by "Myrna van Lunteren (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-5158?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Myrna van Lunteren closed DERBY-5158.
-------------------------------------

       Resolution: Fixed
    Fix Version/s: 10.8.1.6

backported the fix to 10.8 with revision 1160516.

> 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
>            Assignee: Dag H. Wanvik
>            Priority: Minor
>             Fix For: 10.8.1.6, 10.9.0.0
>
>         Attachments: DERBY-5158a.diff, DERBY-5158a.stat, DERBY-5158b.diff, DERBY-5158b.stat, Derby5158Repro.java
>
>
> 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

        

[jira] [Resolved] (DERBY-5158) Incomprehensible error message on client if attempting rollback after database has been shut down.

Posted by "Dag H. Wanvik (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-5158?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Dag H. Wanvik resolved DERBY-5158.
----------------------------------

          Resolution: Fixed
    Issue & fix info: [Repro attached]  (was: [Repro attached, Patch Available])

> 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
>            Assignee: Dag H. Wanvik
>            Priority: Minor
>         Attachments: DERBY-5158a.diff, DERBY-5158a.stat, DERBY-5158b.diff, DERBY-5158b.stat, Derby5158Repro.java
>
>
> 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

[jira] [Commented] (DERBY-5158) Incomprehensible error message on client if attempting rollback after database has been shut down.

Posted by "Dag H. Wanvik (JIRA)" <ji...@apache.org>.
    [ 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

[jira] [Issue Comment Edited] (DERBY-5158) Incomprehensible error message on client if attempting rollback after database has been shut down.

Posted by "Dag H. Wanvik (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-5158?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13012745#comment-13012745 ] 

Dag H. Wanvik edited comment on DERBY-5158 at 3/29/11 10:30 PM:
----------------------------------------------------------------

The reason the commit does not throw is that the repro did not switch off autocommit, so the commit is never sent to the server (DERBY-4653 optimization). The rollback is still flowed, cf. DERBY-4687.

      was (Author: dagw):
    The reason the commit does not throw is that the repro did not switch off autocommit, so the commit is never sent to the server (DERBY-4653 optimization).
  
> 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
>         Attachments: Derby5158Repro.java
>
>
> 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

[jira] [Updated] (DERBY-5158) Incomprehensible error message on client if attempting rollback after database has been shut down.

Posted by "Dag H. Wanvik (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-5158?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Dag H. Wanvik updated DERBY-5158:
---------------------------------

    Attachment: DERBY-5158b.stat
                DERBY-5158b.diff

Uploading a new version of the patch, which improves the test a bit: we now make sure to do some work before closing down the database, since otherwise the client short circuits the commit (if it knows nothing happened yet on this connection). Rollback does not do this, cf. DERBY-4653.(I did not notice this optimization in the first version, but saw it when instrumenting it for verification.)

I did not move the test into ShutdownDatabaseTest, because that test does not yet run with client/server due to DERBY-2477. Linked this issue to that also.


> 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
>            Assignee: Dag H. Wanvik
>            Priority: Minor
>         Attachments: DERBY-5158a.diff, DERBY-5158a.stat, DERBY-5158b.diff, DERBY-5158b.stat, Derby5158Repro.java
>
>
> 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

[jira] [Reopened] (DERBY-5158) Incomprehensible error message on client if attempting rollback after database has been shut down.

Posted by "Myrna van Lunteren (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-5158?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Myrna van Lunteren reopened DERBY-5158:
---------------------------------------


Reopen for backport to 10.8

> 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
>            Assignee: Dag H. Wanvik
>            Priority: Minor
>             Fix For: 10.9.0.0
>
>         Attachments: DERBY-5158a.diff, DERBY-5158a.stat, DERBY-5158b.diff, DERBY-5158b.stat, Derby5158Repro.java
>
>
> 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