Your counter-questions were enough to point me in the right direction.
Indeed, it wasn't clear to my in my first read that "ij" was itself acting as the application using Embedded-server, when the original DB URL didn't contain a hostname:port!
I had not really tweaked anything regarding the Security settings, just a quick find in the Ref.Man. took me to the section on security, when looking for examples of the hostname:port type of DB URL.
On 2/13/08, Kristian Waagan <Kristian.Waagan@sun.com> wrote:
Banibrata Dutta wrote:
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.