Win a copy of Learn Spring Security (video course) this week in the Spring forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

jdbc with oracle database

 
Michelle Lee
Ranch Hand
Posts: 42
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I tried to use jdbc in my servlet without luck.
I installed oracle 8i
and set my classpath to c:\Oracle\Ora81\jdbc\lib;c:\Oracle\Ora81\jdbc\lib\classes21.zip;
My programm I tested successed when using access database and odbc diver.
when I used used driver: oracle.jdbc.driver.OracleDriver
with url: jdbc racle:thin:@homeking:1521 ra8",
"scott","tiger";(homeking is my machine's name);
the program compiled well, but gave exception:
Exception! java.lang.ClassNotFoundException: oracle.jdbc.driver.OracleDriver at ... when running.
Any help very appreciated!
 
Col Bell
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The jar file containing the Oracle JDBC driver is normally classes12.zip, not classes21.zip. Probably a typo.
Col
 
Graham Thorpe
Ranch Hand
Posts: 265
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Absolutely its a classes12.zip but not
classes21.zip.
You may probably find another classes like
classes111.zip etc , and they must be choosen
according to ur jdk versions.
if urs is jdk1.1.x then use classes111.zip;
if urs is jdk1.2.x or higher then use classes12.zip;
venugopal
 
ersin eser
Ranch Hand
Posts: 1072
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
glkrrr ! ( 2nd reminder)
Please read the Javaranch Naming Policy and change your publicly displayed name to comply with our unique rule. Thank you for your cooperation.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic