db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Raymond Kroeker" <raym...@raykroeker.com>
Date Thu, 10 May 2007 21:42:44 GMT
Hi Dan,
    It looks like the url you're using from the client isn't quite right.
For a client/server url you want the logical database name in the url after
the port and not the path to the database.

    So a single server can support multilple databases.  What you'll want to
try is something like


    instead of


    This too will create the db for you if it does not already exist.

On 5/10/07, Petrula, Dan <DPetrula@thezenith.com> wrote:
>  I have a linux server running Redhat ES4 and have Derby I can access
the database at the server using the ij tool.
> The server is on a lan with an ip address of I can start the
> Derby server using either the ip address and port 1527 or using
> and port 1527 and successfully ping it using the Derby tool on the
> linux machine.
> However, I can't reach the linux server from a Windows XP machine on the
> lan running  the ClientDriver. I can reach the Apache web server on the
> linux machine and ping the linux server from the Windows computer so I
> know the connection is there.
> The Derby database on the linux server is installed at
> /usr/local/derby/database/apolloDB.  My code on the Windows client machine
> is as follows:
> String driver = "org.apache.derby.jdbc.ClientDriver";
> String dbURL =
> "jdbc:derby://";
> java.util.Properties prop = new java.util.Properties();
> prop.setProperty("derby.system.home","/usr/local/derby/database");
> prop.setProperty("user","dan");
> prop.setProperty("password","starman");
> Class.forName(driver).newInstance();
> conn=DriverManager.getConnection(dbURL,prop);
> My derby.properties file is in directory on the server
> /usr/local/derby/database
> derby.connection.requiredAuthentication=true
> derby.authentication.provider=BUILTIN
> derby.user.dan=starman
> I get the message  at the client machine
> 'SQLException java.net.NoRouteToHostException: Error connection to server
> on port 1527 with message No route to host:connect.'
> At the Windows client machine I used a windows utility to ping both the
> host and the port. I could successfully ping the Apache Webserver getting
> port 80, but
> not the Derby server. Maybe because the Derby server requires a password
> when connecting from an external source, I don't know.
> Anyone have any suggestions? I have run out of ideas..
> **********************************************************************
> This e-mail, including attachments, contains information that may be
> confidential, protected by the attorney/client or other privileges, or
> exempt from disclosure under applicable law. Further, this e-mail may
> contain information that is proprietary and/or constitutes a trade secret.
> This e-mail, including attachments, constitutes non-public information
> intended to be conveyed only to the designated recipient(s). If you are not
> an intended recipient of this communication, please be advised that any
> disclosure, dissemination, distribution, copying, or other use of this
> communication or any attached document is strictly prohibited.  If you have
> received this communication in error, please notify the sender immediately
> by reply e-mail and promptly destroy all electronic and printed copies of
> this communication and any attached documents.
> **********************************************************************

Raymond Kroeker

View raw message