jdbc and tnsnames - is it possible?
834098Mar 21 2011 — edited Mar 23 2011Using Oracle Enterprise 11.0.1.7.0 on 64 bit RHEL, jdbc ojdbc6.jar
I have this jdbc thin connect string which works fine using the 'traditional' url:port:sid
String url = "jdbc:oracle:thin:@//ora-clu2b-vip:1541/TESTLIT"
with this I can connect and retrieve rows etc.
However I am trying to use the tnsnames.ora in the URL which I have read is possible to do after 10g, but if I alter the connection to this:
String url = "jdbc:oracle:thin:@littest"
it throws
java.sql.SQLException: Io exception: SO Exception was generated
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:158)
Am I making an obvious error which Iam failing to spot, or have other ppl had similar problems. I should also mention this is a RAC