db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From theuns <theunsheydenr...@gmail.com>
Subject Re: Unable to connect. Cannot establish connection to <derby databas url>
Date Sat, 06 Feb 2010 08:20:53 GMT
Thanks for the answer Brian, much appreciated.

When changing the database name (folder name), the schema was back with
the tables and data?
The application that uses the data was not even present on the machine.
And i just copied the "corrupt" database from the machine, on to my
machine, and tried to open it in NetBeans, where it always defaulted to
the "APP" schema, only after the rename of the folder, did it default to
the original schema with the tables and data.

Our theory in the group is that, when derby starts that database, it
looks for some settings in the database (directories and files) and it
did not match with the folder name, and derby fixed it automatically
somehow?

Best Regards
Theuns Heydenrych

On Fri, 2010-02-05 at 07:08 -0800, Bryan Pendleton wrote:
> > But all of a sudden the table disappeared from the list, i decided then
> > to close everything and try to connect again, where i get the following
> > message:
> > 
> > "Unable to connect. Cannot establish a connection to <derbydb url> using
> 
> One possibility is that when you closed your previous application, you
> didn't fully terminate it, and the underlying JVM was still running and
> Derby still had the database booted. Derby won't let you open the database
> a second time from a second JVM until the first JVM fully terminates.
> 
> > I then renamed the database folder, of the database, set a new
> > jdbc:derby connection up to the database and all of a sudden my schema
> > is available, and everything is back to normal again.
> > 
> > What happened?
> 
> If your connection URL says "create=true", Derby will automatically create
> a fresh new database if the database doesn't exist when you ask to open it.
> 
> Derby will also auto-create a schema with a name which matches your user
> name, so I'm guessing that your schema is the same name as your Derby user name.
> 
> You didn't say much about your application, but I'm guessing that it
> automatically creates your database tables if they don't exist? Many
> applications are coded in such an automatic fashion.
> 
> It's easy to get confused when you're first starting to learn a complex
> piece of system software. Take your time, learn to read the Derby logs
> and operating system process viewing tools, and things will start to
> make more sense, I believe.
> 
> thanks,
> 
> bryan
> 
> 


Mime
View raw message