db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From John Kline <John.Kl...@Sun.COM>
Subject Re: Unable to create database on Mac OS X (FileNotFoundException)
Date Fri, 21 Jan 2005 21:34:05 GMT
Hi Bruce,

> 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've tried this same exact operation on Linux and it succeeds without
> issue. I really need this to succeed on Mac OS X. Am I possibly doing
> something wrong here?

To get it to work on OS X, create a derby.properties file with the  
following line in it:

derby.storage.fileSyncTransactionLog=true

The file should be in derby home.  You can set the home by passing the  
following on the command line:

-Dderby.system.home=<whatever>

This works around a bug in Apple's VM.  I reported it to Apple (others  
reported it too).  I've been told by Apple that it is fixed in Tiger  
(10.4) due  out in Q2.  I have Tiger builds, but I haven't yet verified  
it is fixed.

- John

On Jan 13, 2005, at 9:03 AM, Bruce Snyder 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've tried this same exact operation on Linux and it succeeds without
> issue. I really need this to succeed on Mac OS X. Am I possibly doing
> something wrong here?
>
> Below is my sysinfo output:
>
> --------- Cloudscape Network Server Information --------
> Version: CSS10000/10.0.2.0  Build: 30301  DRDA Product Id: CSS10000
> -- listing properties --
> derby.drda.host=localhost
> derby.drda.portNumber=1527
> derby.drda.startNetworkServer=false
> derby.drda.minThreads=0
> derby.drda.traceAll=false
> derby.drda.logConnections=false
> derby.drda.maxThreads=0
> derby.drda.timeSlice=0
> ------------------ Java Information ------------------
> Java Version:    1.4.2_05
> Java Vendor:     Apple Computer, Inc.
> Java home:        
> /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home
> Java classpath:
> /Applications/IBM/Cloudscape_10.0/lib/derby.jar:/Applications/IBM/ 
> Cloudscape_10.0/lib/derbytools.jar:/Applications/IBM/Cloudscape_10.0/ 
> lib/derbynet.jar:
> OS name:         Mac OS X
> OS architecture: ppc
> OS version:      10.3.7
> Java user name:  bsnyder
> Java user home:  /Users/bsnyder
> Java user dir:   /Users/bsnyder/
> --------- Derby Information --------
> [/Applications/IBM/Cloudscape_10.0/lib/derby.jar] 10.0.2.0 - (30301)
> [/Applications/IBM/Cloudscape_10.0/lib/derbytools.jar] 10.0.2.0 -  
> (30301)
> [/Applications/IBM/Cloudscape_10.0/lib/derbynet.jar] 10.0.2.0 - (30301)
> ------------------------------------------------------
> ----------------- Locale Information -----------------
> ------------------------------------------------------
>
> 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