db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kristian Waagan <Kristian.Waa...@Sun.COM>
Subject Re: Newbie question: "jdbc:/localhost/dbname" doesn't work
Date Wed, 13 Feb 2008 08:39:59 GMT
Banibrata Dutta wrote:
> Hi,


I'm trying to give some helpful information below.

> I am trying to use Derby (infact from the JavaDB package), on WinXP. I 
> have run the Network Server, using the script (batch file) in one 
> window. In another window, I am using "ij". While I can connect to the 
> server using following commands:-
> ij> CONNECT 'jdbc:derby:/firstdb';
> ij> CONNECT 'jdbc:derby:firstdb';

These are URLs for the embedded driver. You are not connecting to the 
server with these. You can verify this be observing that you can connect 
even if you shut down the network server.

> however, using the following set of commands, I cannot --
> ij> CONNECT 'jdbc:derby://localhost/firstdb';
> ij> CONNECT 'jdbc:derby://localhost:1527/firstdb';
> ij> CONNECT 'jdbc:derby://localhost:1527/firstdb;user=usr';

The URLs basically look correct (except for the , but you don't say 
which error message(s) you get when trying to connect with them.

Note that for the URLs to actually work, you would have to start the 
network server, or set derby.system.home, in/to the directory where you 
have created firstdb.

> For a DB, that has already been created earlier using --
> ij> CONNECT 'jdbc:derby:firstdb;create=true';
> Could someone please explain why, or point me to documentation on this. 
> In the reference-guide, I did see an example where the DB connection URI 
> is indeed of the form which doesn't work, however the example was not in 
> the context of the security settings !

Since you bring up security settings here, have you done anything to 
enable security features?

It would be easier to help if you told us which error messages you get 
when you try to connect.


> thanks,
> bdutta

View raw message