Java Forums

Main Menu
Home
Today's Posts
FAQ
Search
Contact Us

Java Network
Linux Archive
Java Tips
Java Tips Blog

Sponsored Links





Welcome to the Java Forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community, you will:

  • have access to post topics
  • communicate privately with other members (PM)
  • not see advertisements between posts
  • have the possibility to earn one of our surprises if you are an active member
  • access many other special features that will be introduced later.

Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 07-04-2007, 04:25 PM
Senior Member
 
Join Date: Jun 2007
Posts: 111
Eric is on a distinguished road
Oracle and JDBC
I'm trying to connect to an Oracle DB but have no idea where to start. I've been searching through multitudes of documentation without any luck.

Mainly it doesn't tell you what driver you need in specific, then it goes on about which jar you need but again, without being specific.

In fact, I haven't found any documents which give you a manual on how to do it properly, most of them just say "use the JDBC thin client" and they leave it at that.

I've got the thin client and included it in my project in Eclipse, I still can't get anything to work. Do I need to install the client tools?

Thanks
Eric
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 07-04-2007, 04:29 PM
Member
 
Join Date: Jun 2007
Posts: 92
Marcus is on a distinguished road
JDBC thin driver is the one I have used to connect to Oracle in the past.

Depending on your requirements, you can either
  • Add the JDBC Driver to your class path
  • Uncompress the contents of the jar file in your project

Personally, I think uncompressing the contents into your project is the way to go...as that will allow portability of your application as long as the Database is accessible from other machines.

If you are building a web app, you should include your jar file in WEB-INF/lib

If you want to configure eclipes to connect to your database, here is an example showing a connection to MySQL

Greetings
Marcus
Bookmark Post in Technorati
Reply With Quote
  #3 (permalink)  
Old 07-04-2007, 04:31 PM
Member
 
Join Date: Jun 2007
Posts: 92
Daniel is on a distinguished road
You have to use classes12.jar which is the jdbc driver.

Also you can use hibernate to connect to the Oracle database.

Greetings.
Daniel
Bookmark Post in Technorati
Reply With Quote
  #4 (permalink)  
Old 08-11-2007, 10:49 PM
Member
 
Join Date: Aug 2007
Posts: 3
javaneed is on a distinguished road
Thanx....it worked for me..........
Thanx a lot it worked for me.

i was also getting the oracle connection error, as i was trying to connect my oracle database thru ma jsp application.

i have kept the classses12.zip file in the web-inf/lib folder of ma web application.

and it worked fine.

Thanx n Regards
Sam
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
java.lang.ClassNotFoundException: oracle.jdbc.driver.OracleDriver haneeshrawther Advanced Java 0 03-21-2008 03:13 PM
failure at Class.forName("oracle.jdbc.driver.OracleDriver"); RonNYC Eclipse 1 03-14-2008 04:51 PM
Using JDBC to connect to ORACLE database Java Tip Java Tips 0 02-10-2008 01:27 PM
Jdbc Driver For Oracle Swamipsn New To Java 0 08-14-2007 06:31 AM
java.lang.ClassNotFoundException: oracle.jdbc.driver.OracleDriver ljustiniano New To Java 4 08-06-2007 07:30 PM


All times are GMT +3. The time now is 02:31 AM.


VBulletin, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2006 - 2007, www.java-forums.org