db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "KARR, DAVID (ATTCINW)" <dk0...@att.com>
Subject RE: Just starting with Derby: Getting "Another instance of Derby may have already booted the database" with embedded db
Date Wed, 16 Dec 2009 23:54:36 GMT
> -----Original Message-----
> From: Bryan Pendleton [mailto:bpendleton@amberpoint.com]
> Sent: Wednesday, December 16, 2009 3:42 PM
> To: Derby Discussion
> Subject: Re: Just starting with Derby: Getting "Another instance of
> Derby may have already booted the database" with embedded db
> 
> > first runs some sql through the "sql" task, then runs JUnit to run
my
> > test class?
> 
> If you take out the "sql" task invocation, does your script run
> correctly?
> 
> If so, then I'd think this might be a bug in the SQL task, that it
> isn't closing down the connection properly at the completion of its
> work.
> 
> But if you still get the problem with the "sql" task removed, then it
> may be that you somehow have some other process which still has the
> database open.

Well, without the "sql" task invocation, we'd have to carefully define
what "correctly" means.  When I did this, I didn't get the "another
instance of derby" error, but I did get errors about missing tables
(what the "sql" task is doing).

I'll ask on the Ant list about the "sql" task possibly not closing its
connection.

If I can't get that resolved, I guess my only options are to execute the
table creation DDL in my test code itself, or to use the network server.
My first attempt to use the network server presented a problem in that
when I start the server from Ant, it blocks the execution, even if I did
"fork=true" in the "java" execution.


Mime
View raw message