I get this sql error every time I try to connect to an Oracle instance using JDBC.
java.sql.SQLException: Io exception:
The Network Adapter could not establish connection
SQLException: SQLState (null) vendor code (17002)
What am I doing wrong?
Does it connect after the error ?. First try to connect from your client to Oracle server using SQL plus client.
Second - Do a tnsping <server name>
This will give you the correct Host name, SID and Port number.
Make sure that your JDBC connection parameters match with the actual connection from TNS output
462 views
Usually answered in minutes!
you are a problem in you client.
Your tnsnames.ora is misconfigured.
Your sqlnet.ora is misconfigured
your listener is misconfigured or not started
your connexion settings from java is misconfigured
×