aspose file tools*
The moose likes JDBC and the fly likes Problems setting up oracle JDBC driver in Eclipse Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Problems setting up oracle JDBC driver in Eclipse" Watch "Problems setting up oracle JDBC driver in Eclipse" New topic
Author

Problems setting up oracle JDBC driver in Eclipse

Preeba Srikanna
Greenhorn

Joined: Jul 24, 2009
Posts: 2
Hello,

I am trying to set-up my jdbcdriver with connection URL - jdbcracle:thin:@server:1521:XE. When I test the connection, It fails with exception as:

java.sql.SQLException: Io exception: The Network Adapter could not establish the connection
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:146)
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:255)
at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:387)
at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:414)
at oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:165)
at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:35)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:801)
at org.eclipse.datatools.connectivity.drivers.jdbc.JDBCConnection.createConnection(JDBCConnection.java:206)
at org.eclipse.datatools.connectivity.DriverConnectionBase.internalCreateConnection(DriverConnectionBase.java:104)
at org.eclipse.datatools.connectivity.DriverConnectionBase.open(DriverConnectionBase.java:53)
at org.eclipse.datatools.connectivity.drivers.jdbc.JDBCConnection.open(JDBCConnection.java:72)
at org.eclipse.datatools.enablement.internal.oracle.JDBCOracleConnectionFactory.createConnection(JDBCOracleConnectionFactory.java:27)
at org.eclipse.datatools.connectivity.internal.ConnectionFactoryProvider.createConnection(ConnectionFactoryProvider.java:83)
at org.eclipse.datatools.connectivity.internal.ConnectionProfile.createConnection(ConnectionProfile.java:355)
at org.eclipse.datatools.connectivity.ui.PingJob.createTestConnection(PingJob.java:76)
at org.eclipse.datatools.connectivity.ui.PingJob.run(PingJob.java:59)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)



Has anyone come across this exception and know to to resolve it?

Your help is greatly appreciated.

Thanks!
Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336

This could be one of a number of things:
  • The JDBC URL you have used is wrong
  • The database is not running
  • The database listener is not running


  • JavaRanch FAQ HowToAskQuestionsOnJavaRanch
    Preeba Srikanna
    Greenhorn

    Joined: Jul 24, 2009
    Posts: 2
    Thanks for the reply. I figured the issue - the URL I was using was wrong...
     
    With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
     
    subject: Problems setting up oracle JDBC driver in Eclipse