"java.sql.SQLException: IO Error: The Network Adapter could not establish the connection" - This error message is Oracle's way of saying either 'Connection refused' or 'Connection timeout' or 'no route to host' or 'unknown host'.
This is a very generic error that could occur due to various reasons. Below are the points that need to be checked to fix this problem:
- Wrong port number or IP address (or DNS host name) is used.
- Oracle listener is not configured properly or not available.
- Listener process (service) is not running. Restart it with the "lsnrctl start" command or on a Windows OS by starting the listener service.
- Ensure the correct hostname is specified in listner.ora.
- Add the hostname and IP address in the hosts file located under C:\Windows\System32\drivers\etc folder.
- This could be a problem with the Oracle SYS user password. Check with the Oracle DBA for the correct credentials.