db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bruce Snyder <bruce.sny...@gmail.com>
Subject Re: Unable to create database on Mac OS X (FileNotFoundException)
Date Thu, 13 Jan 2005 22:39:03 GMT
On Thu, 13 Jan 2005 10:03:49 -0700, Bruce Snyder <bruce.snyder@gmail.com> wrote:
> I'm running Derby on Mac OS X (10.3.7) and experiencing the same
> *exact* trouble as noted in DERBY-1
> (http://issues.apache.org/jira/browse/DERBY-1). The only difference is
> that I'm using the Network Server.
> 
> I start up the Derby Network Server, connect with ij and everything is
> fine. I can even connect with DbVisualizer and all is well. However,
> upon trying to create a database like so from ij:
> 
> ij> connect 'jdbc:derby:net://127.0.0.1/castor_tests;create=true;user=bruce;password=bruce;retrieveMessagesFromServerOnGetMessage=true;';
> 
> I received the following error:
> 
> ERROR XJ041: DB2 SQL error: SQLCODE: -1, SQLSTATE: XJ041, SQLERRMC:
> castor_testsXJ041.CXBM01:XBM01.DXJ001:java.io.FileNotFoundException/Users/bsnyder/castor_tests/log/log1.dat
> (File exists)XJ001.UFailed to create database 'castor_tests', see the
> next exception for details.Startup failed due to an exception, see
> next exception for details.Java exception:
> '/Users/bsnyder/castor_tests/log/log1.dat (File exists):
> java.io.FileNotFoundException'.(server log:/Users/bsnyder/derby.log)
> 
> When, in fact, the file /Users/bsnyder/castor_tests/log/log1.dat does
> *not* exist.

I discovered that this error message has something to do with relying
upon the JVM to sync files to the filesystem vs. relying upon the
operating system to do it. To work around this issue simply use the
following property when starting the Derby server:

derby.storage.fileSyncTransactionLog=true

Bruce 
-- 
perl -e 'print unpack("u30","<0G)U8V4\@4VYY9&5R\"F9E<G)E=\$\!F<FEI+F-O;0\`\`");'

The Castor Project
http://www.castor.org/

Apache Geronimo
http://geronimo.apache.org/

Mime
View raw message