db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Samuel Andrew McIntyre <fuzzylo...@nonintuitive.com>
Subject Re: FAQ language (was: Unable to run 10.0.2 GA on Mac OS X 10.3.5/VM 1.4.2_05)
Date Sun, 10 Oct 2004 06:03:13 GMT
Hi Joseph,

Here is a copy of the bug report I filed with Apple:

java.io.RandomAccessFile in Java 1.4.2 Update 1 does not allow 
reopening files in "rws" mode if they have just been created. When a 
file is created with "rw" and then shortly thereafter a new 
RandomAccessFile object is instantiated for the same file in "rws" 
mode, the JVM throws a FileNotFoundException (File Exists). "rw" and 
"rwd" modes do not have this problem. This issue is hit when attempting 
to create or write to a database with IBM Cloudscape/Apache Derby 10.0.

Steps to reproduce:
A testcase which reproduces the problem is attached. I can provide jars 
for Cloudscape/Derby if desired.

Expected results:
When using Cloudscape/Derby, it is expected that the database will be 
created with no exceptions thrown. In general, it is expected that on 
the second instantiation of RandomAccessFile, the object will be 
created without an exception being thrown.

Actual Results:
When using Cloudscape/Derby, the database is not created, and 
Cloudscape shutdowns with an exception. With the provided testcase, the 
following exception is thrown:
Exception in thread "main" java.io.FileNotFoundException: log.dat (File 
       at java.io.RandomAccessFile.open(Native Method)
       at java.io.RandomAccessFile.<init>(RandomAccessFile.java:204)
       at TestWriteSync.main(TestWriteSync.java:24)

For Cloudscape/Derby, the workaround is to set our property 
derby.storage.fileSyncTransactionLog=true to avoid the code path which 
uses "rws" mode.

I am not currently able to test this on other setups.

The testcase referenced above is Suresh's TestWriteSync.java.


View raw message