I understand that the org.apache.derby.jdbc.EmbeddedDriver does not support simultaneous connections to a Cloudscape database however it appears that even after the Java app that was using the database disconnects and quits. See "Interesting Experiment" in --- 3 --- below.

Problem Example ---------> For example, I can connect to the example "derbyDB" database from App1 and can connecto to the example "toursDB" from App2 but after disconnecting and quiting both App1 and App2.............App2 is never able to start by itself and connect to the "derbyDB" because "once upon a time" App1 had connected to it even though App1 is no longer running.

I'm doing this on MacOS X so there is a possibility that since they (I think) try to share the JavaVM over multiple apps it could be that the Apple JavaVM was still running.

Also note that I am not doing any of this connecting from the command line but always through one of 2 Java/GUI based apps with App1 being DbVisualizer Free 4.1.1. which is a free Java app you can download from http://www.dbvis.com/products/dbvis/index.html and App2 being Sun Java Studio Creator which is downloadable from Sun at http://wwws.sun.com/software/products/jscreator/

However, I did try the following following to make sure all databases and engines were shut down:

--- 1 --- Using DbVisualizer 4.1.1 made a connection (per the Apache/Derby doc) jdbc:derby:;shutdown=true and jdbc:derby:pathTo_toursDB;shutdown=true

--- 2 --- Re-booted MacOS X to make sure no Apple JavaVM was still running

---3 --- Interesting experiment.......using the command line ij tool (java org.apache.derby.tools.ij) I created a new testdb by doing ij> connect 'jdbc:derby:testdb;create=true';

I verified that Sun Java Studio Creator can connect just fine to this newly created Cloudscape database testdb (and it does just fine) - then I quit this application.

I then connected to testdb with DbVisualizer 4.1.1 and it connects to testdb just fine. I then click the DbVisualizer disconnect button and quit the app.

When I start Sun Java Studio again and try to connect to it again I get a "Can't start database" Error message even after doing all the reboot and jdbc:derby:;shutdown=true stuff above

***** the real interesting part ***** prior to connecting to testdb from ANY app if I save a copy of the testdb/log directory, I am able to get Sun Java Studio to connect to testdb if I swap back in the original testdb/log directory and take out the testdb/log directory that was present when the apps each connnected the first time.

I'm thinking there is some info stored in the testdb/log/log1.dat file that isn't getting cleaned up after disconnect somehow and this is making Sun Java Studio Creator think the testdb (or toursDB) is still open (some file is still open) or locked.

Reply via email to