aspose file tools*
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
Author

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

Ajit Sawant
Ranch Hand

Joined: Nov 26, 2008
Posts: 33
Hello,
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)
--
Thanks,
Ajit
Vijitha Kumara
Bartender

Joined: Mar 24, 2008
Posts: 3829

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


SCJP 5 | SCWCD 5
[How to ask questions] [Twitter]
Deepak Bala
Bartender

Joined: Feb 24, 2006
Posts: 6661
    
    5

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