facebook

Derby Embedded DB and DB Explorer? Need Best Practice help

  1. MyEclipse IDE
  2.  > 
  3. Comments
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #216429 Reply

    joche
    Member

    I have, by recomendation from support-jeff (see this thread, switched from HSQLDB to Apache Derby.

    It’s up and it’s running, very smooth. However, my only reason for switching RDBMS was to be able to try out the DB Explorer (DBE).

    If I connect the DBE to my embedded database via an connection string like this:

    jdbc:derby:directory:/c:/eclipse3/workspace/AK/AKDerby

    I can access the DB, see all meta data and everything. However, if I run my java tests I get the Failed to start database ‘AKderby’, see the next exception for details. Another instance of Derby may have already booted the database

    And if I close down the DBE connection the .lck file is still there and I can’t access the data via my test scripts anymore.

    I don’t really know what I want, but I would like an embedded DB (atleast in production) which I can access and edit both via my application and via DBE, if this means I should run the NetServer during development and embedded during production I’m find with that, but what is best practice, how is everyone else doing this?

    I’m aware that this probably is more of a Derby than an MyEclipse question, but nevertheless, this is where the competence and quick answers recides.

    #216447 Reply

    Riyad Kalla
    Member

    Moving to Rnadom Thoughts for community help.

    #228507 Reply

    @jd@dagerot.nu wrote:

    I can access the DB, see all meta data and everything. However, if I run my java tests I get the Failed to start database ‘AKderby’, see the next exception for details. Another instance of Derby may have already booted the database

    Have you looked at http://incubator.apache.org/derby/manuals/develop/develop12.html#HDRSII-DEVELOP-20349 ?

    #263836 Reply

    cjlyth
    Member

    I have essentially the same *.lck problem. I am running an embeded database in tomcat. When i connect to the database with the DB explorer everything works like it should. When i close the connection though, it doesn’t remove the lock.

    Is there a way to get a hook into the shutdown process in the DB explorer to run something like this before the connection is closed.

    
     DriverManager.getConnection("jdbc:derby:cs;shutdown=true");
    

    Not sure if this would solve the problem since this is what Derby is supposed to do during shutdown.

    I can manually delete the lck file so the db seems to be shutting down normally.

    If anyone has any ideas I’d appreciate it.

    I really dont want to run this with the net client, that would force me to change my context xml file every time i deploy to test.

Viewing 4 posts - 1 through 4 (of 4 total)
Reply To: Derby Embedded DB and DB Explorer? Need Best Practice help

You must be logged in to post in the forum log in