Return-Path: Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: (qmail 60514 invoked from network); 7 Nov 2007 19:46:15 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 7 Nov 2007 19:46:15 -0000 Received: (qmail 52063 invoked by uid 500); 7 Nov 2007 19:46:02 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 52038 invoked by uid 500); 7 Nov 2007 19:46:02 -0000 Mailing-List: contact derby-dev-help@db.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: Delivered-To: mailing list derby-dev@db.apache.org Received: (qmail 52024 invoked by uid 99); 7 Nov 2007 19:46:02 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 07 Nov 2007 11:46:02 -0800 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO brutus.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 07 Nov 2007 19:46:46 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 507A171423E for ; Wed, 7 Nov 2007 11:45:51 -0800 (PST) Message-ID: <31425203.1194464751326.JavaMail.jira@brutus> Date: Wed, 7 Nov 2007 11:45:51 -0800 (PST) From: "Mamta A. Satoor (JIRA)" To: derby-dev@db.apache.org Subject: [jira] Assigned: (DERBY-3172) ConnectionEventListener.connectionErrorOccurred not being executed when SQLState 08006 Error is thrown In-Reply-To: <20584897.1193966810651.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/DERBY-3172?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Mamta A. Satoor reassigned DERBY-3172: -------------------------------------- Assignee: Mamta A. Satoor > ConnectionEventListener.connectionErrorOccurred not being executed when SQLState 08006 Error is thrown > ------------------------------------------------------------------------------------------------------ > > Key: DERBY-3172 > URL: https://issues.apache.org/jira/browse/DERBY-3172 > Project: Derby > Issue Type: Bug > Components: JDBC > Affects Versions: 10.3.1.4 > Reporter: Stan Bradbury > Assignee: Mamta A. Satoor > Attachments: DerbyNotification2.java > > > The attached program demonstrates the problem. Using the ClientConnectionPoolDataSource40 with a connectionEventListener the defined method connectionErrorOccurred is not executed after the Network Server is shutdown and activity is performed on a previously established pooled connection. > Program also demonstrates that the connectionClosed method is executed when the connection is closed. > To run the reproduction: > 1) start network server (listening on default host/port and -noSecurityManager specified) > 2) run the program > Output is: > > java DerbyNotification2 > 10.3.1.5 - (579866) > Apache Derby > .got connection...check if connectionClosed method is called > EVENT CALLED: Connection closed happened > . . . > . . .Get connection and issue test SQL statement > . . .AS EXPECTED: no table exists > . SHUTDOWN Network server and check if connectionErrorOccurred is called > now try to use the connection after the NS is STOPPED > SQLState is: 08006 > Error is: -4499 > Message is: Insufficient data while reading from the network - expected a minimum of 6 bytes and received only -1 bytes. The connection has been terminated. > Exception in thread "main" java.sql.SQLNonTransientConnectionException: Insufficient data while reading from the network - expected a minimum of 6 bytes and received only -1 bytes. The connection has > been terminated. > at org.apache.derby.client.am.SQLExceptionFactory40.getSQLException(Unknown Source) > at org.apache.derby.client.am.SqlException.getSQLException(Unknown Source) > at org.apache.derby.client.am.Connection.prepareStatement(Unknown Source) > at org.apache.derby.client.am.LogicalConnection.prepareStatement(Unknown Source) > at DerbyNotification2.runTest(DerbyNotification2.java:64) > at DerbyNotification2.main(DerbyNotification2.java:87) > Caused by: org.apache.derby.client.am.DisconnectException: Insufficient data while reading from the network - expected a minimum of 6 bytes and received only -1 bytes. The connection has been termina > ted. > at org.apache.derby.client.net.Reply.fill(Unknown Source) > at org.apache.derby.client.net.Reply.ensureALayerDataInBuffer(Unknown Source) > at org.apache.derby.client.net.Reply.readDssHeader(Unknown Source) > at org.apache.derby.client.net.Reply.startSameIdChainParse(Unknown Source) > at org.apache.derby.client.net.NetStatementReply.readPrepareDescribeOutput(Unknown Source) > at org.apache.derby.client.net.StatementReply.readPrepareDescribeOutput(Unknown Source) > at org.apache.derby.client.net.NetStatement.readPrepareDescribeOutput_(Unknown Source) > at org.apache.derby.client.am.Statement.readPrepareDescribeOutput(Unknown Source) > at org.apache.derby.client.am.PreparedStatement.readPrepareDescribeInputOutput(Unknown Source) > at org.apache.derby.client.am.PreparedStatement.flowPrepareDescribeInputOutput(Unknown Source) > at org.apache.derby.client.am.PreparedStatement.prepare(Unknown Source) > at org.apache.derby.client.am.Connection.prepareStatementX(Unknown Source) > ... 4 more -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.