Details
-
Bug
-
Status: Open
-
Minor
-
Resolution: Unresolved
-
None
-
None
-
Normal
-
Repro attached
-
Embedded/Client difference
Description
This issue stemmed out of DERBY-256. The assertion failure in that issue does not reproduce, but the reproduction shows a client side protocol exception:
– Start network server and with
– java -Dij.protocol=jdbc:derby://localhost:1527/ org.apache.derby.tools.ij
connect 'wombat;create=true';
connect 'myDB;create=true';
– shutdown database wombat
– ERROR 08006 expected
connect 'wombat;shutdown=true';
show connections;
select * from sys.systables;
– shutdown database myDB
– ERROR 08006 expected
connect 'mydb;shutdown=true';
show connections;
select * from sys.systables;
Causes the following Exception in the client:
ERROR 08006: A network protocol error was encountered and the connection has been terminated: the requested command enco
untered an unarchitected and implementation-specific condition for which there was no architected message (additional in
formation may be available in the derby.log file on the server)
java.sql.SQLNonTransientConnectionException: A network protocol error was encountered and the connection has been termin
ated: the requested command encountered an unarchitected and implementation-specific condition for which there was no ar
chitected 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:364)
at org.apache.derby.client.am.Statement.execute(Statement.java:896)
at org.apache.derby.impl.tools.ij.ij.executeImmediate(ij.java:367)
at org.apache.derby.impl.tools.ij.utilMain.doCatch(utilMain.java:527)
at org.apache.derby.impl.tools.ij.utilMain.runScriptGuts(utilMain.java:372)
at org.apache.derby.impl.tools.ij.utilMain.go(utilMain.java:245)
at org.apache.derby.impl.tools.ij.Main.go(Main.java:229)
at org.apache.derby.impl.tools.ij.Main.mainCore(Main.java:184)
at org.apache.derby.impl.tools.ij.Main.main(Main.java:75)
at org.apache.derby.tools.ij.main(ij.java:59)
Caused by: org.apache.derby.client.am.DisconnectException: A network protocol error was encountered and the connection h
as been terminated: the requested command encountered an unarchitected and implementation-specific condition for which t
here 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.NetStatementReply.parsePrepareError(NetStatementReply.java:556)
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.executeX(Statement.java:901)
at org.apache.derby.client.am.Statement.execute(Statement.java:887)
... 8 more
Caused by: org.apache.derby.client.am.SqlException: DERBY SQL error: SQLCODE: -1, SQLSTATE: 08003, SQLERRMC: No current
connection.
... 18 more
ERROR 08003: DERBY SQL error: SQLCODE: -1, SQLSTATE: 08003, SQLERRMC: No current connection.
java.sql.SQLNonTransientConnectionException: DERBY SQL error: SQLCODE: -1, SQLSTATE: 08003, SQLERRMC: No current connect
ion.
at org.apache.derby.client.am.SQLExceptionFactory40.getSQLException(SQLExceptionFactory40.java:71)
at org.apache.derby.client.am.SqlException.getSQLException(SqlException.java:364)
at org.apache.derby.client.am.SqlException.getSQLException(SqlException.java:373)
at org.apache.derby.client.am.Statement.execute(Statement.java:896)
at org.apache.derby.impl.tools.ij.ij.executeImmediate(ij.java:367)
at org.apache.derby.impl.tools.ij.utilMain.doCatch(utilMain.java:527)
at org.apache.derby.impl.tools.ij.utilMain.runScriptGuts(utilMain.java:372)
at org.apache.derby.impl.tools.ij.utilMain.go(utilMain.java:245)
at org.apache.derby.impl.tools.ij.Main.go(Main.java:229)
at org.apache.derby.impl.tools.ij.Main.mainCore(Main.java:184)
at org.apache.derby.impl.tools.ij.Main.main(Main.java:75)
at org.apache.derby.tools.ij.main(ij.java:59)
Caused by: org.apache.derby.client.am.SqlException: DERBY SQL error: SQLCODE: -1, SQLSTATE: 08003, SQLERRMC: No current
connection.
at org.apache.derby.client.am.Connection.completeSqlca(Connection.java:2125)
at org.apache.derby.client.net.NetConnectionReply.parseCMDCHKRM(NetConnectionReply.java:878)
at org.apache.derby.client.net.NetStatementReply.parsePrepareError(NetStatementReply.java:556)
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.executeX(Statement.java:901)
at org.apache.derby.client.am.Statement.execute(Statement.java:887)
... 8 more
ij(CONNECTION1)>
There are actually several issues around shutting down the database in a network server environment. It might be good to link them all to a single tracking issue.