wood burning stoves 2.0*
The moose likes JDBC and the fly likes java.sql.SQLException: Io exception: Unknown host specified Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "java.sql.SQLException: Io exception: Unknown host specified" Watch "java.sql.SQLException: Io exception: Unknown host specified" New topic

java.sql.SQLException: Io exception: Unknown host specified

Ajit Sawant
Ranch Hand

Joined: Nov 26, 2008
Posts: 33
I'm geting the following error message when trying to connect to Oracle database.

Exception in thread "main" java.sql.SQLException: Io exception: Unknown host specified
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:441)
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 java.sql.DriverManager.getConnection(DriverManager.java:582)
at java.sql.DriverManager.getConnection(DriverManager.java:185)
at testjdbc.main(testjdbc.java:22)
Vijitha Kumara

Joined: Mar 24, 2008
Posts: 3817

That looks like the URL specified is wrong or something.. Can you show us the code you are trying to coonect to DB?

[How to ask questions] [Twitter]
Deepak Bala

Joined: Feb 24, 2006
Posts: 6661

The error is simple. The DB host you mentioned does not exist. Try to ping it and double check the JDBC URL

SCJP 6 articles - SCJP 5/6 mock exams - More SCJP Mocks
I agree. Here's the link: http://aspose.com/file-tools
subject: java.sql.SQLException: Io exception: Unknown host specified
Similar Threads
Connecting to an Oracle DB
Need JDBC driver for JDK 6 Oracle 10g (
java.sql.SQLException: Io exception: The Network Adapter could not establish the connection
connecting to oracle db problem
java. lang. Class Not FoundException: