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 / December 2004

Tip: Looking for answers? Try searching our database.

Newbie question: Problem with loading jdbc driver

Thread view: 
Sanjay Kumar - 28 Dec 2004 14:01 GMT
Hi Friends,
I am trying to access Oracle database using java. But I am unable to
load the JDBC driver. The statement:

String sDriver = "oracle.jdbc.driver.OracleDriver";
try
{
 Class.forName( sDriver ).newInstance();
}
catch( Exception e )
{
...
}

the above statement is throwing exception and I am not sure whether
any settings need to be done (any path settings ? ). I am using
Oracle9i. All help appreciated.

thanks in advance,
Sanjay.
Michael Rauscher - 28 Dec 2004 14:36 GMT
[...]
> the above statement is throwing exception and I am not sure whether
> any settings need to be done (any path settings ? ). I am using
> Oracle9i. All help appreciated.

I assume it's an ClassNotFoundException. In that case, most probably you
didn't include the driver in the classpath.

I don't know the filename for Oracle 9i but for Oracle 8i the file was
called classes12.zip. Given that, the java command line should look
something like

java -cp /path/to/driver/classes12.zip ...

Bye
Michael


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.