You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-user@db.apache.org by Paul Taylor <pa...@fastmail.fm> on 2009/08/06 15:15:20 UTC

Cant restart database because of orphaned lock ?

I'm using Derby in embedded  mode from my application, when I exit my 
application I close connection, and get connection with option 
:shutdown=true to shut it down
But sometimes when I restart my application it fails, so I try and 
recreate the database but  then receives exception with error code 45000 
(Database Already Running) , and I have to delete the database folder to 
get my application to restart

Am I doing something wrong ?

thanks Paul


Re: Cant restart database because of orphaned lock ?

Posted by Francois Orsini <fr...@gmail.com>.
Hi Paul,

Make sure to set the URL property 'shutdown=true' with a semi-colon ';'

such as:

"jdbc:*derby*:MyDbTest;*shutdown*=*true*");

If it is called correctly, then maybe check if you do not have another
(orphaned) Java instance still accessing the database...

Cheers

--francois

On Thu, Aug 6, 2009 at 6:15 AM, Paul Taylor <pa...@fastmail.fm> wrote:

> I'm using Derby in embedded  mode from my application, when I exit my
> application I close connection, and get connection with option
> :shutdown=true to shut it down
> But sometimes when I restart my application it fails, so I try and recreate
> the database but  then receives exception with error code 45000 (Database
> Already Running) , and I have to delete the database folder to get my
> application to restart
>
> Am I doing something wrong ?
>
> thanks Paul
>
>