connection refused to Derby Client JDBC Driver [message #47377] |
Sun, 20 July 2008 22:33 |
Eclipse User |
|
|
|
Originally posted by: cuco2772.gmail.com
Hi everybody,
I was wondering if anybody could give me some advice on what could be
causing this:
ava.sql.SQLTransientConnectionException: java.net.ConnectException : Error
connecting to server localhost on port 1527 with message Connection
refused.
at
org.apache.derby.client.am.SQLExceptionFactory40.getSQLExcep tion(Unknown
Source)
at org.apache.derby.client.am.SqlException.getSQLException(Unkn own Source)
at org.apache.derby.jdbc.ClientDriver.connect(Unknown Source)
at
org.eclipse.datatools.connectivity.drivers.jdbc.JDBCConnecti on.createConnection(JDBCConnection.java:89)
at
org.eclipse.datatools.connectivity.apache.internal.derby.con nection.DerbyEmbeddedJDBCConnection.createConnection(DerbyEm beddedJDBCConnection.java:137)
at
org.eclipse.datatools.connectivity.DriverConnectionBase.inte rnalCreateConnection(DriverConnectionBase.java:104)
at
org.eclipse.datatools.connectivity.DriverConnectionBase.open (DriverConnectionBase.java:53)
at
org.eclipse.datatools.connectivity.apache.internal.derby.con nection.DerbyJDBCConnectionFactory.createConnection(DerbyJDB CConnectionFactory.java:32)
at
org.eclipse.datatools.connectivity.internal.ConnectionFactor yProvider.createConnection(ConnectionFactoryProvider.java:83 )
at
org.eclipse.datatools.connectivity.internal.ConnectionProfil e.createConnection(ConnectionProfile.java:355)
at
org.eclipse.datatools.connectivity.ui.PingJob.createTestConn ection(PingJob.java:76)
at org.eclipse.datatools.connectivity.ui.PingJob.run(PingJob.ja va:59)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
Caused by: org.apache.derby.client.am.DisconnectException:
java.net.ConnectException : Error connecting to server localhost on port
1527 with message Connection refused.
at org.apache.derby.client.net.NetAgent.<init>(Unknown Source)
at org.apache.derby.client.net.NetConnection.newAgent_(Unknown Source)
at org.apache.derby.client.am.Connection.<init>(Unknown Source)
at org.apache.derby.client.net.NetConnection.<init>(Unknown Source)
at org.apache.derby.client.net.NetConnection40.<init>(Unknown Source)
at
org.apache.derby.client.net.ClientJDBCObjectFactoryImpl40.ne wNetConnection(Unknown
Source)
... 11 more
Caused by: java.net.ConnectException: Connection refused
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.ja va:195)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
at java.net.Socket.connect(Socket.java:519)
at java.net.Socket.connect(Socket.java:469)
at java.net.Socket.<init>(Socket.java:366)
at java.net.Socket.<init>(Socket.java:180)
at org.apache.derby.client.net.OpenSocketAction.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
... 17 more
The connection URL is jdbc:derby://localhost:1527/trails;create=true
The exception seems to be implying that it's an unknown Data Source, but
the database is created and is located at
/home/cuco/workspace/DerbyDatabases/trails. Maybe the wrong URL ?
My derbyclient.jar is located at /usr/lib/javadb/lib.
I tried running derby from the terminal, ie doing a chmod +x on my
/usr/lib/javadb/bin/startNetworkServer and then doing a
/startNetworkServer
but got an error DERBY_HOME not set. I thought I would try this to see if
this could be an eclipse issue. Any help would be appreciated, thanks.
|
|
|
Re: connection refused to Derby Client JDBC Driver [message #47409 is a reply to message #47377] |
Sun, 20 July 2008 22:41 |
Eclipse User |
|
|
|
Originally posted by: cuco2772.gmail.com
I thought I would add that I also have an embedded jdbc driver instance
for the same database where the ping succeeds. I have other issues with
that,
but it does connect. Its the same location but the complete path is listed
as the database URL.
|
|
|
|
Powered by
FUDForum. Page generated in 0.03366 seconds