db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrew McIntyre <mcintyr...@gmail.com>
Subject Re: Derby with OS X Tiger (10.4) Java 1.5.0_02? Log problem?
Date Fri, 05 Aug 2005 01:46:04 GMT

On Aug 4, 2005, at 3:28 PM, Barnet Wagman wrote:

> Has anyone successfully used Derby with OS X 10.4 and Java  
> 1.5.0_02?  I'm getting the "Cannot log transaction changes ..."  
> problem (http://issues.apache.org/jira/browse/DERBY-1) even though  
> I've used the
>     derby.storage.fileSyncTransactionLog=true
> fix.
> I am able to create a database and put data into it.  But after  
> shutting down and starting  a new session, I get the "log  
> transaction ..." error when I try to add to it.

Hi Barnet,

When you shut down and start a new session, you need to set that  
system property in the new session as well. Because this is a general  
problem with the way the Apple JVM writes "rws" mode files, you need  
to force Derby to use "rw" mode each time you start up, or the same  
error will be hit when Derby attempts to write new data. As you have  
discovered, reading files works as expected, but the bug in the JVM  
is only hit if you attempt to write.

Try setting that system property each time you connect and you should  
be able to write new data to the database in each session, so long as  
that system property is set each and every time before you obtain a  
connection to the database.

The property can also be set in the derby.properties for that  
database. For more information on how to do that, please see the  
section "Changing the system-wide properties by using the  
derby.properties file" in the Derby Tuning Guide:


about half way down the page. Note that the file needs to be in the  
location specified by the derby.system.home property, and that there  
is only one derby.properties per system, not per database.

hope that helps,

View raw message