Return-Path: Delivered-To: apmail-db-derby-user-archive@www.apache.org Received: (qmail 80365 invoked from network); 16 Feb 2007 19:09:01 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 16 Feb 2007 19:09:01 -0000 Received: (qmail 38913 invoked by uid 500); 16 Feb 2007 19:09:07 -0000 Delivered-To: apmail-db-derby-user-archive@db.apache.org Received: (qmail 38885 invoked by uid 500); 16 Feb 2007 19:09: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 38874 invoked by uid 99); 16 Feb 2007 19:09:06 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 16 Feb 2007 11:09:06 -0800 X-ASF-Spam-Status: No, hits=1.4 required=10.0 tests=SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (herse.apache.org: 32.97.182.146 is neither permitted nor denied by domain of Stan.Bradbury@gmail.com) Received: from [32.97.182.146] (HELO e6.ny.us.ibm.com) (32.97.182.146) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 16 Feb 2007 11:08:54 -0800 Received: from d01relay04.pok.ibm.com (d01relay04.pok.ibm.com [9.56.227.236]) by e6.ny.us.ibm.com (8.13.8/8.13.8) with ESMTP id l1GJ9FFr029133 for ; Fri, 16 Feb 2007 14:09:15 -0500 Received: from d01av02.pok.ibm.com (d01av02.pok.ibm.com [9.56.224.216]) by d01relay04.pok.ibm.com (8.13.8/8.13.8/NCO v8.2) with ESMTP id l1GJ8TvN286036 for ; Fri, 16 Feb 2007 14:08:32 -0500 Received: from d01av02.pok.ibm.com (loopback [127.0.0.1]) by d01av02.pok.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id l1GJ8TiV027607 for ; Fri, 16 Feb 2007 14:08:29 -0500 Received: from [127.0.0.1] (sig-9-76-195-203.mts.ibm.com [9.76.195.203]) by d01av02.pok.ibm.com (8.12.11.20060308/8.12.11) with ESMTP id l1GJ8QMS027528 for ; Fri, 16 Feb 2007 14:08:28 -0500 Message-ID: <45D60129.1040503@gmail.com> Date: Fri, 16 Feb 2007 11:08:25 -0800 From: Stanley Bradbury User-Agent: Thunderbird 1.5.0.9 (Windows/20061207) MIME-Version: 1.0 To: Derby Discussion Subject: Re: "ERROR 40XD1: Container was opened in read-only mode" when performing SELECT DISTINCT on database in jar References: <903fbcd30702160309x592fcb9cwad3bc9fb7066a337@mail.gmail.com> In-Reply-To: <903fbcd30702160309x592fcb9cwad3bc9fb7066a337@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org Thomas Kelder wrote: > Hello, > > I'm using Derby in embedded mode, with my databases stored in jar > files. I've set the 'derby.storage.tempDirectory' and > 'derby.stream.error.file' properties to writable locations, as advised > in the help file. > > When I now perform a query like "SELECT DISTINCT FROM ..." on this > database, it produces the following exception: > > ERROR 40XD1: Container was opened in read-only mode. > > Whether this exception occurs seems to depend on the number of rows in > the database (e.g. on a small database with ~700 rows everything > worked fine, but on a database with the same schema and about 3000 > rows, the exception occured). > > I've reproduced it in a testcase: > http://ftp2.bigcat.unimaas.nl/~thomas.kelder/derbytest/DerbyTest.java > Using the following database file: > http://ftp2.bigcat.unimaas.nl/~thomas.kelder/derbytest/testdb.zip > > Does anyone have an idea about what causes this error? > Thanks in advance. > > Thomas > Hi Thomas - I looked into this further after I discovered inconsistencies in our documentation and it making the change I suggested will not correct your problem (though I still believe that Static properties need to be set prior to loading the driver). I am looking into this further but it looks like a bug so far. Thank you for reporting this and supplying the easy to use test case. I will let you know what I find. Stan