db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From derby-...@db.apache.org
Subject [jira] Commented: (DERBY-29) Can not start embedded on Mac OS X or FreeBSD
Date Sat, 02 Oct 2004 02:48:32 GMT
The following comment has been added to this issue:

     Author: Samuel Andrew McIntyre
    Created: Fri, 1 Oct 2004 7:47 PM
       Body:
This is a duplicate of DERBY-1.
---------------------------------------------------------------------
View this comment:
  http://issues.apache.org/jira/browse/DERBY-29?page=comments#action_53616

---------------------------------------------------------------------
View the issue:
  http://issues.apache.org/jira/browse/DERBY-29

Here is an overview of the issue:
---------------------------------------------------------------------
        Key: DERBY-29
    Summary: Can not start embedded on Mac OS X or FreeBSD
       Type: Bug

     Status: Unassigned
   Priority: Blocker

    Project: Derby
 Components: 
             Store
   Versions:
             10.0.2.0

   Assignee: 
   Reporter: Dain Sundstrom

    Created: Fri, 1 Oct 2004 6:30 PM
    Updated: Fri, 1 Oct 2004 7:47 PM
Environment: [06:03:30] dain$ uname -srv
Darwin 7.5.0 Darwin Kernel Version 7.5.0: Thu Aug  5 19:26:16 PDT 2004; root:xnu/xnu-517.7.21.obj~3/RELEASE_PPC


[06:04:08] dain$ java -version
java version "1.4.2_05"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141)
Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode)


Description:
The following works perfectly on Linux, but fails on Mac OS X and FreeBSD (for example minotaur.apache.org):

[06:25:51] dain$ cat Test.java 
import java.sql.*;

public class Test {
    public static void main(String[] args) throws Exception {
        // set up the system property for the database home
        System.setProperty("derby.system.home", ".");

        // load the Embedded driver to initialize the home
        new org.apache.derby.jdbc.EmbeddedDriver();

        try {
            Connection c = DriverManager.getConnection("jdbc:derby:testdb;create=true");
            c.close();
        } catch (SQLException e) {
            SQLException cause = e;
            while (cause.getNextException() != null) {
                cause = cause.getNextException();
            }
            throw cause;
        }
        try {
            DriverManager.getConnection("jdbc:derby:;shutdown=true", null, null);
        } catch (SQLException e) {
            // SQLException gets thrown on successful shutdown so ignore
        }
    }
}

[06:25:56] dain$ javac -classpath derby-47170.jar Test.java

[06:26:21] dain$ java -classpath derby-47170.jar:. Test     
Exception in thread "main" java.io.FileNotFoundException: /Users/dain/testdb/log/log1.dat
(File exists)
        at java.io.RandomAccessFile.open(Native Method)
        at java.io.RandomAccessFile.<init>(RandomAccessFile.java:204)
        at org.apache.derby.impl.io.DirRandomAccessFile.<init>(DirRandomAccessFile.java:50)
        at org.apache.derby.impl.io.DirRandomAccessFile4.<init>(DirRandomAccessFile4.java:50)
        at org.apache.derby.impl.io.DirFile4.getRandomAccessFile(DirFile4.java:244)
        at org.apache.derby.impl.store.raw.log.LogToFile.run(LogToFile.java:4999)
        at java.security.AccessController.doPrivileged(Native Method)
        at org.apache.derby.impl.store.raw.log.LogToFile.privRandomAccessFile(LogToFile.java:4889)
        at org.apache.derby.impl.store.raw.log.LogToFile.boot(LogToFile.java:3024)
        at org.apache.derby.impl.services.monitor.BaseMonitor.boot(BaseMonitor.java:1920)
        at org.apache.derby.impl.services.monitor.TopService.bootModule(TopService.java:278)
        at org.apache.derby.impl.services.monitor.BaseMonitor.startModule(BaseMonitor.java:530)
        at org.apache.derby.iapi.services.monitor.Monitor.bootServiceModule(Monitor.java:412)
        at org.apache.derby.impl.store.raw.data.BaseDataFileFactory.bootLogFactory(BaseDataFileFactory.java:1516)
        at org.apache.derby.impl.store.raw.data.BaseDataFileFactory.setRawStoreFactory(BaseDataFileFactory.java:1048)
        at org.apache.derby.impl.store.raw.RawStore.boot(RawStore.java:254)
        at org.apache.derby.impl.services.monitor.BaseMonitor.boot(BaseMonitor.java:1920)
        at org.apache.derby.impl.services.monitor.TopService.bootModule(TopService.java:278)
        at org.apache.derby.impl.services.monitor.BaseMonitor.startModule(BaseMonitor.java:530)
        at org.apache.derby.iapi.services.monitor.Monitor.bootServiceModule(Monitor.java:412)
        at org.apache.derby.impl.store.access.RAMAccessManager.boot(RAMAccessManager.java:993)
        at org.apache.derby.impl.services.monitor.BaseMonitor.boot(BaseMonitor.java:1920)
        at org.apache.derby.impl.services.monitor.TopService.bootModule(TopService.java:278)
        at org.apache.derby.impl.services.monitor.BaseMonitor.startModule(BaseMonitor.java:530)
        at org.apache.derby.iapi.services.monitor.Monitor.bootServiceModule(Monitor.java:412)
        at org.apache.derby.impl.db.BasicDatabase.bootStore(BasicDatabase.java:747)
        at org.apache.derby.impl.db.BasicDatabase.boot(BasicDatabase.java:168)
        at org.apache.derby.impl.services.monitor.BaseMonitor.boot(BaseMonitor.java:1920)
        at org.apache.derby.impl.services.monitor.TopService.bootModule(TopService.java:278)
        at org.apache.derby.impl.services.monitor.BaseMonitor.bootService(BaseMonitor.java:1767)
        at org.apache.derby.impl.services.monitor.BaseMonitor.createPersistentService(BaseMonitor.java:1009)
        at org.apache.derby.iapi.services.monitor.Monitor.createPersistentService(Monitor.java:573)
        at org.apache.derby.impl.jdbc.EmbedConnection.createDatabase(EmbedConnection.java:1486)
        at org.apache.derby.impl.jdbc.EmbedConnection.<init>(EmbedConnection.java:214)
        at org.apache.derby.impl.jdbc.EmbedConnection20.<init>(EmbedConnection20.java:49)
        at org.apache.derby.impl.jdbc.EmbedConnection30.<init>(EmbedConnection30.java:56)
        at org.apache.derby.jdbc.Driver30.getNewEmbedConnection(Driver30.java:68)
        at org.apache.derby.jdbc.Driver169.connect(Driver169.java:172)
        at java.sql.DriverManager.getConnection(DriverManager.java:512)
        at java.sql.DriverManager.getConnection(DriverManager.java:193)
        at Test.main(Test.java:12)



---------------------------------------------------------------------
JIRA INFORMATION:
This message is automatically generated by JIRA.

If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa

If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


Mime
View raw message