db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stanley Bradbury <Stan.Bradb...@gmail.com>
Subject Re: "ERROR 40XD1: Container was opened in read-only mode" when performing SELECT DISTINCT on database in jar
Date Fri, 16 Feb 2007 19:08:25 GMT
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.


View raw message