java.sql.SQLException: Io exception: The Network Adapter

Posted by Steve Racanovic | Posted in | Posted on 11:50 AM

1

When using JDBC 10.2.0.3 to connect from java standalone client to the database I get the following error:

D:\Oracle\jdev\10134-prod\jdk\bin\javaw.exe -client -classpath "D:\Oracle\jdev\10134-prod\jdev\mywork\MyApplications\JDBC-SSL2\classes;D:\My Contents\My Software\Oracle\JDBC Drivers\10.2.0.3\ojdbc14_g.jar;D:\Oracle\jdev\10134-prod\jlib\oraclepki.jar" jdbcssl2.SSLEncryptionAuthenication
Exception in thread "main" java.sql.SQLException: Io exception: The Network Adapter could not establish the connection
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:145)
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:190)
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:363)
at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:401)
at oracle.jdbc.driver.PhysicalConnection.(PhysicalConnection.java:466)
at oracle.jdbc.driver.T4CConnection.(T4CConnection.java:165)
at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:35)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:839)
at java.sql.DriverManager.getConnection(DriverManager.java:525)
at java.sql.DriverManager.getConnection(DriverManager.java:140)
at jdbcssl2.SSLEncryptionAuthenication.getConnection(SSLEncryptionAuthenication.java:57)
at jdbcssl2.SSLEncryptionAuthenication.run(SSLEncryptionAuthenication.java:39)
at jdbcssl2.SSLEncryptionAuthenication.main(SSLEncryptionAuthenication.java:62)
Process exited with exit code 1.

The "java.sql.SQLException: Io exception: The Network Adapter could not establish the connection" is very generic and can mean a number of different issue. Also the stack error is not very detailed.

Try using JDBC 11.1.0.7 and enable "-Djavax.net.debug=ssl" java property when you run your client to allow for a detailed stack error to help you find the problem.

Comments (1)

Hi

I am facing the same problem, were you able to solve this issue?