Return-Path: X-Original-To: apmail-db-derby-user-archive@www.apache.org Delivered-To: apmail-db-derby-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 6942D76C6 for ; Thu, 20 Oct 2011 15:26:07 +0000 (UTC) Received: (qmail 57446 invoked by uid 500); 20 Oct 2011 15:26:07 -0000 Delivered-To: apmail-db-derby-user-archive@db.apache.org Received: (qmail 57353 invoked by uid 500); 20 Oct 2011 15:26:07 -0000 Mailing-List: contact derby-user-help@db.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: List-Id: Reply-To: "Derby Discussion" Delivered-To: mailing list derby-user@db.apache.org Received: (qmail 57346 invoked by uid 99); 20 Oct 2011 15:26:07 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 20 Oct 2011 15:26:07 +0000 X-ASF-Spam-Status: No, hits=-2.3 required=5.0 tests=RCVD_IN_DNSWL_MED,SPF_PASS,UNPARSEABLE_RELAY X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [148.87.113.117] (HELO rcsinet15.oracle.com) (148.87.113.117) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 20 Oct 2011 15:25:59 +0000 Received: from acsinet21.oracle.com (acsinet21.oracle.com [141.146.126.237]) by rcsinet15.oracle.com (Switch-3.4.4/Switch-3.4.4) with ESMTP id p9KFPZdl007596 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 20 Oct 2011 15:25:37 GMT Received: from acsmt356.oracle.com (acsmt356.oracle.com [141.146.40.156]) by acsinet21.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id p9KFPZfY020568 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 20 Oct 2011 15:25:35 GMT Received: from abhmt101.oracle.com (abhmt101.oracle.com [141.146.116.53]) by acsmt356.oracle.com (8.12.11.20060308/8.12.11) with ESMTP id p9KFPTQ0010138; Thu, 20 Oct 2011 10:25:29 -0500 Received: from localhost (/10.175.29.227) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Thu, 20 Oct 2011 08:25:28 -0700 From: Knut Anders Hatlen To: "Derby Discussion" Cc: philb@tower.ie Subject: Re: Force condition: ERROR 08000: Connection closed by unknown interrupt References: <1319111986.483.140660988171393@webmail.messagingengine.com> <4EA0140B.6070503@oracle.com> <1319118590.1287.140660988209881@webmail.messagingengine.com> Date: Thu, 20 Oct 2011 17:25:26 +0200 In-Reply-To: <1319118590.1287.140660988209881@webmail.messagingengine.com> (Phil Bradley's message of "Thu, 20 Oct 2011 14:49:50 +0100") Message-ID: User-Agent: Gnus/5.110018 (No Gnus v0.18) Emacs/24.0.50 (usg-unix-v) MIME-Version: 1.0 Content-Type: text/plain X-Source-IP: acsinet21.oracle.com [141.146.126.237] X-Auth-Type: Internal IP X-CT-RefId: str=0001.0A090202.4EA03D72.0032:SCFMA922111,ss=1,re=-4.000,fgs=0 "Phil Bradley" writes: >> >> Please bear with me, I do not understand the following paragraph: >> > At the moment, this doesn't address the problem. Specifically, even >> > after taking these steps, the exception gets thrown after every database >> > operation. >> When I read that sentence, I get the impression that the 08000 exception >> is being thrown on every JDBC call. Is that right? > > Yes, that's correct. The issue is that I cannot force the 08000 > condition but once it occurs, every JDBC call subsequent to that fails > until the application is restarted. Note that I've never experienced any > data corruption due to this, just problems with the connection; > restarting the application has always resolved it. Maybe the thread's interrupt flag is still on? Derby doesn't clear the flag when it detects that it has been interrupted, so if you retry database operations in the same thread after receiving this exception, I think you'll continue to see that the operations are being interrupted until you clear the flag, for example by calling Thread.interrupted(). > There's every possibility that there is a problem with the application > code; it's certainly a little more convoluted that it should be and I'm > trying to reduce the complexity bit by bit. For the moment though, my > issue is not with the 08000 error per se, it's that I have no way to > verify that the error handling that is invoked in response to the 08000 > actually works. Maybe you can get it to fail by manually interrupting the thread before doing some db operations. The following code fails with a 08000 error on the rs.next() call in my environment: Thread.currentThread().interrupt(); Connection c = DriverManager.getConnection("jdbc:derby:memory:db;create=true"); Statement s = c.createStatement(); ResultSet rs = s.executeQuery("select * from sysibm.sysdummy1"); rs.next(); -- Knut Anders