Return-Path: Delivered-To: apmail-db-derby-user-archive@www.apache.org Received: (qmail 33978 invoked from network); 4 Jun 2010 16:51:38 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 4 Jun 2010 16:51:38 -0000 Received: (qmail 55585 invoked by uid 500); 4 Jun 2010 16:51:37 -0000 Delivered-To: apmail-db-derby-user-archive@db.apache.org Received: (qmail 55542 invoked by uid 500); 4 Jun 2010 16:51:37 -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 55535 invoked by uid 99); 4 Jun 2010 16:51:36 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 04 Jun 2010 16:51:36 +0000 X-ASF-Spam-Status: No, hits=1.0 required=10.0 tests=FORGED_YAHOO_RCVD,FREEMAIL_FROM,SPF_HELO_PASS,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of lists@nabble.com designates 216.139.236.158 as permitted sender) Received: from [216.139.236.158] (HELO kuber.nabble.com) (216.139.236.158) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 04 Jun 2010 16:51:31 +0000 Received: from isper.nabble.com ([192.168.236.156]) by kuber.nabble.com with esmtp (Exim 4.63) (envelope-from ) id 1OKa6w-0004gd-VU for derby-user@db.apache.org; Fri, 04 Jun 2010 09:51:10 -0700 Message-ID: <28782490.post@talk.nabble.com> Date: Fri, 4 Jun 2010 09:51:10 -0700 (PDT) From: oldmhe To: derby-user@db.apache.org Subject: can't delete my DB directory MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Nabble-From: mhe1943-oldnabble@yahoo.com Prior to exiting, my Java program issues a shutdown, and then tries to delete the DB directory (recursively), but is not able to completely delete the directory. Here's the code: try { DriverManager.getConnection("jdbc:derby:;shutdown=true"); } catch (SQLException eSQLException) { if ( eSQLException.getErrorCode() == 50000 && "XJ015".equals(eSQLException.getSQLState()) ) { // successful shutdown } else printSQLException(eSQLException); } removeDir(new File(dbnmString)); // remove DB directory (removeDir is my own function) If removeDir() is called before connecting to the DB, it works fine. But the above call to removeDir() only deletes some of the files and directories within dbnmString -- as if Derby is still accessing them (or has not closed them). I also tried dropping the DB just before the shutdown code, with the same results. Any ideas would be appreciated. -- View this message in context: http://old.nabble.com/can%27t-delete-my-DB-directory-tp28782490p28782490.html Sent from the Apache Derby Users mailing list archive at Nabble.com.