File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

connecting with oracle

 
abhijeet srivastava
Greenhorn
Posts: 26
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all!

I am using jdk1.6 and oracle 9i. My jdbc driver is classes111.jar. Though this is getting loaded but i am not able to connect my application with database. Connection string is-

Connection conn = DriverManager.getConnection("jdbcracle:thin@localhost:1521:<SID name>","scott","tiger");

It is throwing SQLException.

Whats wrong??
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why are you using classes111.jar? That is the driver for 7i I think. Have a a look at their driver support page to get the correct one.


It is throwing SQLException.

What is the SQLException message?
 
Rahul Bhattacharjee
Ranch Hand
Posts: 2308
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can you give the full exception ? Any error code associated with the exception.
 
abhijeet srivastava
Greenhorn
Posts: 26
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
java.sql.SQLException: Invalid Oracle URL specified
 
Rahul Bhattacharjee
Ranch Hand
Posts: 2308
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by abhijeet srivastava:
java.sql.SQLException: Invalid Oracle URL specified


The URL seems to be fine.
 
abhijeet srivastava
Greenhorn
Posts: 26
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ya i Checked but still not working. I have doubt in SID and user password.How can i know what is SID value (where it get stored in oracle directory). is scott and tiger are correct?
 
Rahul Bhattacharjee
Ranch Hand
Posts: 2308
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can contact the database admin for this clarification.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic