For one of the Web services we were developing we used Oracle DB as the source. We kept getting the error “java.sql.SQLException: The Network Adapter could not establish the connection”. After checking the network adapter, the DB server , there was no use at all. Everything was working well. I thought if I can check the validity of the URL formed. On checking it I found the problem. The URL I formed was having unnecessarily¬† \es between URL part. I was using \ between and port and oracle-sid.

The format of the URL should be as follows:

jdbc:oracle:thin:@hostname:port:oracle-sid

Another format to use along with  credentials is:(I have not tested this in the App)

jdbc:oracle:thin:username/password@hostname:port:oracle-sid

 

Thanks to jguru:

http://www.jguru.com/faq/view.jsp?EID=444466