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

type 4 driver with oracle 9i

 
ajit chaudhary
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


For the above code we set classpath for oracle as
set classpath="%classpath%";F:\oracle\ora92\jdbc\lib\classes.zip;.;

after compilation then we run & get the following Exception:


F:\lily>javac Prog6.java

F:\lily>java Prog6
Exception in thread "main" java.lang.ClassNotFoundException: oracle.jdbc.driver.
OracleDriver
at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:268)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:164)
at Prog6.main(Prog6.java:8)

F:\lily>
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Any reason you want to use such an old driver? With Oracle I'd always grab the latest version I can.

I can't remember there ever being a classes.zip. classes12.zip and classes 13.zip yes, but classes.zip, no. Mind you its been eight years since I used that version of the driver so I might just be remembering wrong.

The oracle.jdbc.driver package was deprecated even back in 9i's day. Have a read of this for better alternatives (and example programs).
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic