2

I am getting java.sql.SQLException: Invalid Oracle URL specified error when running my java application from eclipse. I am using Oracle version 10. classes12.jar is used for the oracle driver oracle.jdbc.OracleDriver Please help me resolving this issue

user1684535
  • 75
  • 1
  • 2
  • 8
  • 7
    You should give us some more information. How about the code that generates the exception? What URL are you using? – madth3 Feb 11 '13 at 19:05
  • Sorry for the close vote, but if it says you have an invalid URL, you should at least show us your URL; there's no way we can help you based on this. – John Humphreys Feb 11 '13 at 19:15
  • This similar question might help. http://stackoverflow.com/questions/1332869/invalid-oracle-url-specified-oracledatasource-makeurl. Other than that, please post the code you are trying to work with – Rajesh Chamarthi Feb 11 '13 at 19:48
  • Sorry for the inconvenience... the url is jdbc:oracle:oci8@cssm – user1684535 Feb 11 '13 at 20:06
  • Sorry for the inconvenience... the url is jdbc:oracle:oci8@cssm. The code is Class.forName ("oracle.jdbc.OracleDriver") DriverManager.getConnection(jdbc:oracle:oci8@XXXX, dbUSER_NAME, dbPASSWORD ) – user1684535 Feb 11 '13 at 20:12

1 Answers1

3

You appear to be missing a colon; as per the JDBC API reference and developer's guide, the syntax is:

jdbc:oracle:driver_type:[username/password]@database_specifier

So yours should be:

jdbc:oracle:oci8:@cssm
Alex Poole
  • 183,384
  • 11
  • 179
  • 318