Tester
Tester

Reputation: 1

IO Error: The Network Adapter could not establish the connection while trying to make JDBC connection to Oracle DB

Im trying to make a JDBC connection to my Oracle DB. It works fine through TOAD but when im trying to establish the connection through JDBC it gives me the below error "IO Error: The Network Adapter could not establish the connection" The syntax of the url and details provided in the url is correctly picked up from TNS file. when I ping the hostname it connects but with telnet it gives me error "Could not open connection to the host,on port 1521:Connect failed"

Upvotes: 0

Views: 7990

Answers (1)

Nirmala
Nirmala

Reputation: 1338

Possible issues will be.

(a) Check if the database is up. Most of the times, database will not be up causing this issue. (b) Check if you are able to connect using sqlplus

Upvotes: 1

Related Questions