java.lang.ClassNotFoundException: oracle.jdbc.driver.OracleDriver
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at bpos.Db.Conectar(Db.java:20)
at bpos.Process.main(Process.java:19)

Can anybody help me about this? It will appreciate.

Leo

08-03-2007, 06:04 PM

netrista

Hello Leo,

Try putting the full path to the Oracle classes12.zip file at the front of the CLASSPATH. Also remove the extra space between the \ and classes12.zip.

Before you test with an app, ensure the driver returns version information by running this command on the command line:

java oracle.jdbc.driver.OracleDriver

If that command does not work, you still have environment problems and need to revisit before you test with the app.

Hi Netrista.. thank you for your help.. I checked my enviroment variables and i didn't find problems. I think that was copy paste mistake. I put first the oracle driver library reference into the classpath enviroment variable

2. Insure no permissions issues exist on that file or directory structure, which is unlikely since it is Windows.

3. Run this command to get your java version:

java -version

4. Insure that the java version of the JVM/JDK that you have installed on Windows is compatible with the requirements of the driver.

Can you state whether or not you can use the other JDBC drivers to get a connection using the application, even though they error on the commandline with DOS. I've seen that before, so it's important to ascertain whether the app connectivity issue is specific to Oracle or generalized to all JDBC connections.

The classpath was correct. I proved on command line and it worked correctly. So i have to change my approach looking for into my IDE project definition parameters. I' m using Eclipse and i found that i have to define a classpath for the project.

Ups! I'm new in Eclipse too.. and i forgot mention it. Your description of the solution helped me to find the final solution. Thank you!

Leo

03-03-2009, 06:12 PM

adkan11

Quote:

Originally Posted by netrista

Hello Leo,

Try putting the full path to the Oracle classes12.zip file at the front of the CLASSPATH. Also remove the extra space between the \ and classes12.zip.

Before you test with an app, ensure the driver returns version information by running this command on the command line:

java oracle.jdbc.driver.OracleDriver

If that command does not work, you still have environment problems and need to revisit before you test with the app.

I'm using oracle 10g express edition. And using myeclipse 7.0
Right now the same error is being thrown here. Can you tel somthng abt it.??? I mean What should i do abt it..???

Waiting for reply... Will be appreciable...
Thnx.

02-19-2010, 02:57 PM

j2me64

Quote:

Originally Posted by adkan11

Waiting for reply... Will be appreciable...
Thnx.

I had the same problem in eclipse with mysql-driver. But then I tried this: right-click the project that need the db-driver and select "Run As" then "Run Configuration". in the classpath-tab select "Add External JARs" and then navigate to the folder where the db-jar file is and select it. compile and let me know ... good luck.