Forums Register Login

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

+Pie Number of slices to send: Send
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
+Pie Number of slices to send: Send
That looks like the URL specified is wrong or something.. Can you show us the code you are trying to coonect to DB?
+Pie Number of slices to send: Send
The error is simple. The DB host you mentioned does not exist. Try to ping it and double check the JDBC URL
There's a hole in the bucket, dear Liza, dear Liza, a hole in the bucket, dear liza, a tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 40904 times.
Similar Threads
java.sql.SQLException: Io exception: The Network Adapter could not establish the connection
connecting to oracle db problem
Connecting to an Oracle DB
Need JDBC driver for JDK 6 Oracle 10g (10.2.0.4)
java. lang. Class Not FoundException:
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 14:47:22.