I have a very weird situation im hoping to get some help with. As of last week everything was working as expected but suddenty it stopped working and now i get this error:
Error: The Network Adapter could not establish the connection
java.sql.SQLRecoverableException: IO Error: The Network Adapter could not establish the connection
Background: I am connecting to an oracle database 4 different times. Either inserting info or reading data from the table, when reading data everything is working good however inserting is failing although i have permissions. There is no firewall issue with with connection because i am already able to connect to the database earlier in my script and retrieve data
Error: The Network Adapter could not establish the connection
java.sql.SQLRecoverableException: IO Error: The Network Adapter could not establish the connection
Caused by: java.io.IOException: Connection timed out, socket connect lapse 127233 ms.
Caused by: java.net.ConnectException: Connection timed out
I have also tried inserting data into a table via datagrip and it worked perfectly
You should check the network issues(e.g: the firewall is blocking port 1521).
If the network is ok, then most probably you have the listener configured wrongly, the hostname you specify in the connection string must be the same as in the listener.
https://www.youtube.com/watch?v=pMQXVihgrrE&t=212s
https://adhoctuts.com/fix-oracle-io-error-the-network-adapter-could-not-establish-the-connection-err...