Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » DTP » Ping Failed Derby Connection
Ping Failed Derby Connection [message #39927] Sat, 15 December 2007 19:53 Go to next message
Danny Gaethofs is currently offline Danny GaethofsFriend
Messages: 14
Registered: July 2009
Junior Member
Dear all,

I have a problem with getting the Apache Derby example up and running.
I installed Apache Derby, I am not sure what I should do with the
classpath. I created the DERBY_INSTALL environment variable.

I followed these steps:
- created the driver definition: it is a bit strange but the driver for
the latest version of derby is not available, selected the available one.

I used the embedded JDBC driver

- I assigned the location where the derby.jar of my apache derby
installation is located and the location where I am going to store my
databases

- Then I created a connection profile. When I press the button test
connection I get a message Ping failed

Here are the details:

java.sql.SQLException: Failed to create database
'C:\DataFiles\DerbyDatabases', see the next exception for details.
at
org.apache.derby.impl.jdbc.SQLExceptionFactory40.getSQLExcep tion(Unknown
Source)
at org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Unknown Source)
at org.apache.derby.impl.jdbc.Util.seeNextException(Unknown Source)
at org.apache.derby.impl.jdbc.EmbedConnection.createDatabase(Un known
Source)
at org.apache.derby.impl.jdbc.EmbedConnection.<init>(Unknown Source)
at org.apache.derby.impl.jdbc.EmbedConnection30.<init>(Unknown Source)
at org.apache.derby.impl.jdbc.EmbedConnection40.<init>(Unknown Source)
at org.apache.derby.jdbc.Driver40.getNewEmbedConnection(Unknown Source)
at org.apache.derby.jdbc.InternalDriver.connect(Unknown Source)
at org.apache.derby.jdbc.EmbeddedDriver.connect(Unknown Source)
at
org.eclipse.datatools.connectivity.db.generic.JDBCConnection .createConnection(JDBCConnection.java:87)
at
org.eclipse.datatools.connectivity.db.derby.DerbyEmbeddedJDB CConnection.createConnection(DerbyEmbeddedJDBCConnection.jav a:136)
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.db.derby.DerbyJDBCConnect ionFactory.createConnection(DerbyJDBCConnectionFactory.java: 32)
at
org.eclipse.datatools.connectivity.internal.ConnectionFactor yProvider.createConnection(ConnectionFactoryProvider.java:77 )
at
org.eclipse.datatools.connectivity.internal.ConnectionProfil e.createConnection(ConnectionProfile.java:354)
at org.eclipse.datatools.connectivity.ui.PingJob.run(PingJob.ja va:57)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
Caused by: java.sql.SQLException: Failed to create database
'C:\DataFiles\DerbyDatabases', see the next exception for details.
at org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLExcepti on(Unknown
Source)
at
org.apache.derby.impl.jdbc.SQLExceptionFactory40.wrapArgsFor TransportAcrossDRDA(Unknown
Source)
... 19 more
Caused by: java.sql.SQLException: Directory C:\DataFiles\DerbyDatabases
already exists.
at org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLExcepti on(Unknown
Source)
at
org.apache.derby.impl.jdbc.SQLExceptionFactory40.wrapArgsFor TransportAcrossDRDA(Unknown
Source)
at
org.apache.derby.impl.jdbc.SQLExceptionFactory40.getSQLExcep tion(Unknown
Source)
at org.apache.derby.impl.jdbc.Util.generateCsSQLException(Unkno wn Source)
at
org.apache.derby.impl.jdbc.TransactionResourceImpl.wrapInSQL Exception(Unknown
Source)
at
org.apache.derby.impl.jdbc.TransactionResourceImpl.handleExc eption(Unknown
Source)
at org.apache.derby.impl.jdbc.EmbedConnection.handleException(U nknown
Source)
... 16 more
Caused by: ERROR XBM0J: Directory C:\DataFiles\DerbyDatabases already
exists.
at org.apache.derby.iapi.error.StandardException.newException(U nknown
Source)
at
org.apache.derby.impl.services.monitor.StorageFactoryService $9.run(Unknown
Source)
at java.security.AccessController.doPrivileged(Native Method)
at
org.apache.derby.impl.services.monitor.StorageFactoryService .createServiceRoot(Unknown
Source)
at org.apache.derby.impl.services.monitor.BaseMonitor.bootServi ce(Unknown
Source)
at
org.apache.derby.impl.services.monitor.BaseMonitor.createPer sistentService(Unknown
Source)
at
org.apache.derby.iapi.services.monitor.Monitor.createPersist entService(Unknown
Source)
... 16 more

Can somebody explain me what is wrong ?

kind regards,
Danny
Re: Ping Failed Derby Connection [message #39959 is a reply to message #39927] Sat, 15 December 2007 21:36 Go to previous message
Danny Gaethofs is currently offline Danny GaethofsFriend
Messages: 14
Registered: July 2009
Junior Member
All,

I figured it out. It has all to do with the driver definition . If one
does not specify the location and databasename in the URL field it will
not work. The field database in the driver definition made me think
specifying the name in the URL was not necessary.

Thanks anyhow.

regards,
Danny
Re: Ping Failed Derby Connection [message #589372 is a reply to message #39927] Sat, 15 December 2007 21:36 Go to previous message
Danny Gaethofs is currently offline Danny GaethofsFriend
Messages: 14
Registered: July 2009
Junior Member
All,

I figured it out. It has all to do with the driver definition . If one
does not specify the location and databasename in the URL field it will
not work. The field database in the driver definition made me think
specifying the name in the URL was not necessary.

Thanks anyhow.

regards,
Danny
Previous Topic:Ping Failed Derby Connection
Next Topic:Reusing / extending the DTP SQL parser
Goto Forum:
  


Current Time: Thu Nov 26 08:21:55 GMT 2020

Powered by FUDForum. Page generated in 0.07421 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top