It's not a secret anymore!*
The moose likes JDBC and the fly likes Invalid Oracle URL specified Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Invalid Oracle URL specified" Watch "Invalid Oracle URL specified" New topic
Author

Invalid Oracle URL specified

Avadhut Joshi
Greenhorn

Joined: Apr 04, 2008
Posts: 2
Hi

I am using oci driver..and using the following code however getting the error as 'Invalid Oracle URL specified'. Please advice and guide.


Error:

java.sql.SQLException: Invalid Oracle URL specified
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:168)
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:210)
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:273)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:182)
at java.sql.DriverManager.getConnection(Unknown Source)
at java.sql.DriverManager.getConnection(Unknown Source)
at co.za.liberty.lajava.ChRates.Database.getConnection(Database.java:49)
at co.za.liberty.lajava.ChRates.Database.executeSelect(Database.java:162)
at co.za.liberty.lajava.ChRates.SAChoqRates.main(SAChoqRates.java:83)
Exception in thread "main"




Thanks,

Avadhut Joshi
Wendy Gibbons
Bartender

Joined: Oct 21, 2008
Posts: 1107

the first search I did "oracle url format oci", answered your question.
Please make some effort
Avadhut Joshi
Greenhorn

Joined: Apr 04, 2008
Posts: 2
Wendy Gibbons wrote:the first search I did "oracle url format oci", answered your question.
Please make some effort


appreciated however the same thing is not working so I put it here as my efforts were not getting required results.

anyways,

1. is it that I need to give the host and port as I have not been provided with it right now so may need to get it.
2. or anything else could be the reason.

Wendy Gibbons
Bartender

Joined: Oct 21, 2008
Posts: 1107

you have a variable called url, and a message telling you it is invalid.

Go and find out what the valid url is, and get the information it requires.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Invalid Oracle URL specified