title: IO Error: The Network Adapter could not establish the connection while trying to make JDBC connection to Oracle DB
body: <p>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"</p>