Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / Databases / May 2005

Tip: Looking for answers? Try searching our database.

jdbc driver not found in simple java program for personal Oracle

Thread view: 
ofilha - 04 May 2005 23:38 GMT
I am trying to write a small application to connect to an Oracle
database in Windows XP.
i try the following code:
Class d =
Class.forName("persoracle.jdbc.oracle.jdbc.driver.OracleDriver");
            System.out.println("Loaded " + d);
and i get the following error from my println:
java.lang.ClassNotFoundException:
persoracle.jdbc.oracle.jdbc.driver.OracleDriver
I am using personal oracle and i have tried
oracle.jdbc.driver.OracleDriver.I see the OracleDriver class in the
persoracle\jdbc\oracle\jdbc\driver folder.  I also see some zip and jar
files in persoracle\jdbc\lib folder. But i have no success with it. I
have placed the path to the driver in the classpath and the path.  But
nothing seems to work.  I have no problems with mysql.  Any ideas ?
HansF - 05 May 2005 06:43 GMT
...
> nothing seems to work.  I have no problems with mysql.  Any ideas ?

Assuming you actually have an installed Oracle JDBC driver (which could
also be downloaded separately from OTN) ...

You might want to review the steps outlined in Oracle's documentation.
Specifically, chapter 2 of the "JDBC Developer's Guide and Reference"
(found under the Oracle9i Database documentation) provides a comprehensive
set of info, including sample program and hints about setting up.  

To get to the docco, start either from http://otn.oracle.com >>
Documentaiton, or http://docs.oracle.com, select Oracle9i Database doc,
then View Library and finally List Books.

Oracle also has Oracle By Example (includes screen shots) and Sample code.
No real reason to fly in the dark ...

BTW - although Oracle's SQL is SQL is SQL is SQL, writing generic
database code usually does not take into account database engine
internals.  As a result scalability, performance, and even locking, can
radically differ between engines.  I strongly encourage reading Tom Kyte's
"Effective Oracle by Design" to understand apropriate coding techniques
so you can determine how they may differ from what you might use with
(name your favorite engine).

/Hans


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.