Home » Developer & Programmer » JDeveloper, Java & XML » java.lang.NoClassDefFoundError: oracle/jdbc/driver/OracleDriver
java.lang.NoClassDefFoundError: oracle/jdbc/driver/OracleDriver [message #90967] Fri, 18 January 2002 01:07 Go to next message
Baris Aksu
Messages: 4
Registered: January 2002
Junior Member
I have a problem with Class.forName() or DriverManager.registerDriver() methods both of which tries to load the necessary jdbc driver in my simple servlet program . My configuration is Win98,tomcat 4.0.1 and jdk 1.3.1_0.2.
"classes12.zip" is in "C:orahome2jdbclib" in my computer, and here is my autoexec.bat to set classpath and path environment variables:
*****
SET classpath=.;C:orahome2jdbclibclasses12.zip;C:jakarta-tomcat-4.0.1commonlibservlet.jar;
*********
SET Path=C:jdk1.3.1_02bin;C:orahome2bin;"C:PROGRAM FÝLESORACLEJRE1.1.7BÝN";C:ORAHOME2LIB;C:ORAHOME2JDBCLIB;
**********

""The same program runs successfully as a standalone java program and after loading the driver retrieves some rows from oracle database. But when it is called simply from an HTML form, the suitable driver cannot be loaded.""

I went through related problems and answers here and they seem to stem from misconfigurations in classpath environment variable, so I suspect a problem with mine.

I need urgent help, thanks in advance...

Baris Aksu
Re: java.lang.NoClassDefFoundError: oracle/jdbc/driver/OracleDriver [message #91050 is a reply to message #90967] Mon, 11 March 2002 02:02 Go to previous messageGo to next message
Srinivas
Messages: 138
Registered: June 2000
Senior Member
I think your problem with webserver. PLease set properly or reinstall it.
Re: java.lang.NoClassDefFoundError: oracle/jdbc/driver/OracleDriver [message #91066 is a reply to message #90967] Mon, 18 March 2002 16:55 Go to previous messageGo to next message
Bogus
Messages: 1
Registered: March 2002
Junior Member
Srinivas!

Lots of people stating the obvious! Of course we checked the classpath? Looks good! (It has the zip file in it). Still doesn't work?

I advise setting the classpath on the command line with -cp OR -classpath ... OR if you are setting the CLASSPATH environment variable set it in an AUTOEXEC.BAT and not via Control Panel->System etc. I had mine set okay and it STILL did not pick it up until I put it in the AUTOEXEC.BAT

Hope it works for you too!
Re: java.lang.NoClassDefFoundError: oracle/jdbc/driver/OracleDriver [message #91078 is a reply to message #90967] Tue, 26 March 2002 21:07 Go to previous messageGo to next message
Mark
Messages: 284
Registered: July 1998
Senior Member
I had the same problem: Tomcat doesn't like .zip files. Rename the classes12.zip to classes12.jar and it should work fine.
I actually put the renamed file in my %CATALINA_HOME%commonlib directory just to be sure. Worked fine for me.
Re: java.lang.NoClassDefFoundError: oracle/jdbc/driver/OracleDriver [message #91087 is a reply to message #90967] Sat, 30 March 2002 21:56 Go to previous messageGo to next message
Charlie Kuharski
Messages: 1
Registered: March 2002
Junior Member
I'm having the same problem. I'm suspecting it is a problem using win98. I'm using FORTE and have no problems connecting remotely. The applet is just fine until I deploy it to Tomcat and try to run. It seems to never pick it up from my classpath. I've classes12.jar delcared several places and it still throws the exception.
I'm thinking of abondoning either win98 or Tomcat
Re: java.lang.NoClassDefFoundError: oracle/jdbc/driver/OracleDriver [message #91091 is a reply to message #91087] Mon, 01 April 2002 20:39 Go to previous messageGo to next message
battsogt
Messages: 1
Registered: April 2002
Junior Member
java.lang.NoClassDefFoundError:
hello?My name is battogt.I'm student.I'm learning programming language JAVA. I have problem JAVA .
When I run my program error occured "java.lang.NoClassDefFoundError". How
I repear this error?
Help me.
Re: java.lang.NoClassDefFoundError: oracle/jdbc/driver/OracleDriver [message #91115 is a reply to message #90967] Mon, 15 April 2002 07:23 Go to previous messageGo to next message
Rustem
Messages: 1
Registered: April 2002
Junior Member
I had the same problem. But comments of Bogus and Mark helped me. Tomcat and Oracle JDBC driver are working good for me now.
Thank so lot, guys!
Re: java.lang.NoClassDefFoundError: oracle/jdbc/driver/OracleDriver [message #91185 is a reply to message #90967] Sat, 18 May 2002 09:30 Go to previous messageGo to next message
Rodri
Messages: 1
Registered: May 2002
Junior Member
Thank you for all, it was really helpful ;)
Saludos, Rodri.
Re: java.lang.NoClassDefFoundError: oracle/jdbc/driver/OracleDriver [message #91189 is a reply to message #90967] Mon, 20 May 2002 21:41 Go to previous messageGo to next message
ying
Messages: 143
Registered: May 2002
Senior Member
I have same problem in Linux, the platform is Linux+tomcat+oracle, I have exported the classes12.jar in my lib directory,like:
export CLASSPATH=$CLASSPATH:~/lib/classes12.jar;
There is no problem when I compile the jdbc file which include"DriverManager.registerDriver (new oracle.jdbc.driver.OracleDriver());".
But when I run JSP or servlet, it still generate the "java.lang.NoClassDefFoundError: oracle/jdbc/driver/OracleDriver" error. Plz help me!
Re: java.lang.NoClassDefFoundError: oracle/jdbc/driver/OracleDriver [message #91199 is a reply to message #90967] Fri, 24 May 2002 02:35 Go to previous messageGo to next message
Tony
Messages: 190
Registered: June 2001
Senior Member
Thanks also guys, I put my class111.jar field in directory specified and it worked.
Cheers Tony
Re: java.lang.NoClassDefFoundError: oracle/jdbc/driver/OracleDriver [message #91218 is a reply to message #90967] Fri, 31 May 2002 09:38 Go to previous messageGo to next message
Vasilios Tzeremes
Messages: 1
Registered: May 2002
Junior Member
Thanks guys!!!! I had the same problem but now it is fixed.
Re: java.lang.NoClassDefFoundError: oracle/jdbc/driver/OracleDriver [message #91234 is a reply to message #90967] Mon, 10 June 2002 11:54 Go to previous messageGo to next message
Troy
Messages: 10
Registered: October 2000
Junior Member
THIS DID IT!!! THANK YOU VERY MUCH!
package oracle.jdbc.driver does not exist [message #91276 is a reply to message #90967] Thu, 27 June 2002 06:51 Go to previous messageGo to next message
Sushma
Messages: 6
Registered: May 2001
Junior Member
package oracle.jdbc.driver does not exist
DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
Re: package oracle.jdbc.driver does not exist [message #91282 is a reply to message #91276] Mon, 01 July 2002 05:24 Go to previous messageGo to next message
sailendra
Messages: 3
Registered: July 2002
Junior Member
put classes12.zip in your classpath.
problems with drivers oracle.jdbc.driver.OracleDriver [message #91302 is a reply to message #90967] Thu, 04 July 2002 08:26 Go to previous messageGo to next message
cristianch
Messages: 1
Registered: July 2002
Junior Member
i am working with tomcat & netbeans and i have problems with drivers oracle.jdbc.driver.OracleDriver

this is the error when i compile .java
examples/JdbcTest.java [[10:1]] cannot resolve symbol
symbol : class OracleDriver
location: package driver
DriverManager.registerDriver (new oracle.jdbc.driver.OracleDriver());
^
1 error
Errors compiling JdbcTest.

thanks to all
Cristian
error.... [message #91354 is a reply to message #90967] Fri, 26 July 2002 01:26 Go to previous messageGo to next message
Mayur Solanki
Messages: 2
Registered: July 2002
Junior Member
Hello,

Please help to solve first step of java.
My "j2sdk1.4.0_01" installation on linux platform is already done.
All paths are set ok.

Now what is problem, When we create one file suppose file1.java, its class file is also created regularly but when i am going to run by : "java file1" then error occured :
"Exception in thread "main" java.lang.NoClassDefFoundError: file1

Please give the way to solve it as far....

Mayur.
Re: error.... [message #91356 is a reply to message #91354] Fri, 26 July 2002 02:58 Go to previous messageGo to next message
Mayur Solanki
Messages: 2
Registered: July 2002
Junior Member
Hello,
Please set your path properly.
Then all will good.
Re: java.lang.NoClassDefFoundError: oracle/jdbc/driver/OracleDriver [message #91368 is a reply to message #90967] Mon, 29 July 2002 12:09 Go to previous messageGo to next message
Dan
Messages: 61
Registered: February 2000
Member
I must say thanks to Mark, as I had to rename to .jar
Re: java.lang.NoClassDefFoundError: oracle/jdbc/driver/OracleDriver [message #91427 is a reply to message #90967] Mon, 26 August 2002 10:37 Go to previous messageGo to next message
Raj
Messages: 411
Registered: November 1998
Senior Member
I have the same problem. Im using websphere studio application developer. Java program works just fine but jsps are failing.

Any suggestions would be greatly appreciated. I tried renaming classes12.zip to jar and adding it to classpath, but didn't work.

Thanks
Raj
Re: java.lang.NoClassDefFoundError: oracle/jdbc/driver/OracleDriver [message #91486 is a reply to message #90967] Mon, 07 October 2002 06:54 Go to previous messageGo to next message
juanlu
Messages: 1
Registered: October 2002
Junior Member
I´ve the same error.

How can i do that, using W2000, with out autoexec.bat?

Thanks.
Re: problems with drivers oracle.jdbc.driver.OracleDriver [message #91518 is a reply to message #90967] Wed, 16 October 2002 05:49 Go to previous messageGo to next message
Rainer Reitz
Messages: 2
Registered: October 2002
Junior Member
Hi,

I think you will have to download a JDBC driver first (www.oracle.com) --> Thin driver.

If you are using JDK2, the following class-library is fine: classes.zip

Put this file into: c:JAVA_HOMEjrelib

Define Environment:
PATH = c:j2sdk1.4.0_02bin (==> Java-Executables)
JAVA_HOME = c:j2sdk1.4.0_02 (==> Root-Verzeichnis der kompletten JDK-Installation)
CLASSPATH = c:j2sdk1.4.0_02libtools.jar; c:j2sdk1.4.0_02jrelibrt.jar; c:j2sdk1.4.0_02jrelibclasses12.zip; . (==> Oracle8i 8.1.7.1 JDBC Thin Driver for JDK 1.2)
Re: problems with drivers oracle.jdbc.driver.OracleDriver [message #91592 is a reply to message #90967] Mon, 02 December 2002 10:53 Go to previous messageGo to next message
velananda
Messages: 1
Registered: December 2002
Junior Member
Iam using jdk1.3
Re: java.lang.NoClassDefFoundError: oracle/jdbc/driver/OracleDriver [message #91744 is a reply to message #91066] Thu, 30 January 2003 06:22 Go to previous messageGo to next message
aschwin
Messages: 1
Registered: January 2003
Junior Member
Yes, that's great but HOW? did you fix it?

greetings Aschwin
Re: java.lang.NoClassDefFoundError: oracle/jdbc/driver/OracleDriver [message #91763 is a reply to message #90967] Fri, 07 February 2003 00:51 Go to previous messageGo to next message
Rahul
Messages: 94
Registered: December 1998
Member
java.lang.NoClassDefFoundError: oracle/jdbc/pool/OracleDataSource...Does anyone have an answer for this...
Details:

Hi, I'm Using Tomcat4.0.2 and trying to migrate an application already running on SandBox server.I am getting a runtime error as "java.lang.NoClassDefFoundError:oracle/jdbc/pool/OracleDataSource"/,though i've taken care of the classpath settings and included the classes12.zip in it,the problem still persists.As a clue i have a change to be made to the catalina.bat file and the varible to be added here as:-DDefaultConfig="%CATALINA_HOME%webappssctconfigadmin.cfg".I'm not able to make out that where should i put it and what is the role of this batch file in loading the JDBC files.Or else there is an alternate solution which is much simpler. Kindly help me out ASAP. Thanx
Re: java.lang.NoClassDefFoundError: oracle/jdbc/driver/OracleDriver [message #91778 is a reply to message #90967] Wed, 12 February 2003 18:01 Go to previous messageGo to next message
JSP Dummie
Messages: 2
Registered: February 2003
Junior Member
Hi guys, can anyone give me a clue on this one.

I've already checked the CLASSPATH and so on, I'm working on Linux -Tomcat 4.1 - Oracle 9.2.

Error in a JSP :

Oracle:java.lang.NoClassDefFoundError: java/sql/Savepoint

Thanks in adv.

Joe.
Re: package oracle.jdbc.driver does not exist [message #91806 is a reply to message #91276] Thu, 27 February 2003 12:17 Go to previous messageGo to next message
neil
Messages: 15
Registered: June 2001
Junior Member
I'm experiencing the same errors. I've already added it into the classpath but still I get the same error.

Any ideas please?

Thanks.

Neil
Re: java.lang.NoClassDefFoundError: oracle/jdbc/driver/OracleDriver [message #92298 is a reply to message #91778] Thu, 20 May 2004 22:25 Go to previous messageGo to next message
Praneet
Messages: 1
Registered: May 2004
Junior Member
First of all check if . is there in your classpath
Basically u need to tell the runtime env that ur class is residing in that particular location where the compiler has put it

The interpreter namely java has a bug on some plafs where it does n t look in the current dir

Certainly sun ppl are lookin into the matter

hope for best

cheers
Praneet
Re: problems with drivers oracle.jdbc.driver.OracleDriver [message #92560 is a reply to message #91518] Thu, 16 September 2004 21:23 Go to previous messageGo to next message
Bharati
Messages: 4
Registered: August 2002
Junior Member
Hello
Still the problem persist.
Solution to the problem is awaited...
Thanking you in anticipation...
Regards
Bharati
Re: package oracle.jdbc.driver does not exist [message #92695 is a reply to message #91806] Mon, 29 November 2004 10:00 Go to previous messageGo to next message
Lenore Snell
Messages: 1
Registered: November 2004
Junior Member
Hi -

I ran into the same problem and found the solution here (in case if this helps you or anyone following the path to your comment):

http://www.visualbuilder.com/forum/topic.asp?TOPIC_ID=2111&FORUM_ID=2&CAT_ID=2&Topic_Title=driver+desn+not+exist&Forum_Title=Java

Re: java.lang.NoClassDefFoundError: oracle/jdbc/driver/OracleDriver [message #194618 is a reply to message #90967] Sat, 23 September 2006 01:08 Go to previous messageGo to next message
Arkhel
Messages: 1
Registered: September 2006
Location: México
Junior Member

Ok, me tomó una extenuante media hora, pero ahi va.

Primero tenemos nuestra directorio de trabajo

C:\JAVA\Ejemplo

dentro de este esta la carpeta classes

C:\JAVA\Ejemplo\classes

la cual contiene la clase Ejemplo.class y Ejemplo.htm,
copiamos a esta carpeta (classes) el archivo que contiene el driver, que en mi caso es classes111.zip, y abrimos con el bloque de notas el archivo Ejemplo.htm y lo editamos.

Generalmente, en un ejemplo sencillo, aparecería:

<HTML>
<HEAD>
</HEAD>
<BODY BGCOLOR="000000">
<CENTER>
<APPLET
code = "Empleado.class"
width = "500"
height = "300"
>
</APPLET>
</CENTER>
</BODY>
</HTML>


solamente le agregamos la propiedad ARCHIVE, especificando el nombre del archivo, quedaría:

<HTML>
<HEAD>
</HEAD>
<BODY BGCOLOR="000000">
<CENTER>
<APPLET ARCHIVE="classes111.zip"
code = "Empleado.class"
width = "500"
height = "300"
>
</APPLET>
</CENTER>
</BODY>
</HTML>

Con esto ya queda, suponiendo que ya hayan puesto, desde el compilador que esten utilzando, el path del archivo, si no es solamente agregarlo a propiedades del proyecto (JCreator pro) en Project/Project Settings, seleccionan la pestaña Requiered Libraries, le dan New/Add Archive, y buscan en C:\JAVA\Ejemplo\classes\classes111.zip, lo agregan y de dan ok.

Mi código de java:

import java.sql.*;
import oracle.jdbc.driver.*;
import javax.swing.*;
import java.awt.*;
import java.applet.*;

public class Empleado extends Applet {

public static Connection conn;

//TextField TxtNombre, TxtEdad;
//Button ButAceptar


public void init() {
ConexionOracle();
}


public static void ConexionOracle()
{

try
{

DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
conn = DriverManager.getConnection("jdbc:oracle:thin:@Ratiugsoft:1521:JAVA","angel","angel");
}catch(Exception ex)
{

System.out.println("Error durante la conexión. " + ex);

}

}


}


-----------------
Fausto
No busco mi dicha en la indiferencia...
icon4.gif  Re: java.lang.NoClassDefFoundError: oracle/jdbc/driver/OracleDriver [message #495443 is a reply to message #90967] Sat, 19 February 2011 06:55 Go to previous message
Kirthana
Messages: 2
Registered: February 2011
Location: India
Junior Member
Hi Everyone,
I have installed Tomcat 5.5 and Oracle 9i and JDK 1.6 installed on my machine.
I'm just trying to test the connection by running a few sample programs from the oracle sample directory,But seeing the following problems..
Exception in thread "main" java.lang.NoClassDefFoundError: oracle/jdbc/pool/OracleDataSource
at DataSource.main(DataSource.java:20)
Caused by: java.lang.ClassNotFoundException: oracle.jdbc.pool.OracleDataSource
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)
... 1 more


System variables:
CLASS_PATH=.;C:\Program Files\Java\jdk1.6.0_13\lib;C:\Program Files\Apache Software Foundation\Tomcat 5.5\common\lib\servlet-api.jar;C:\Program Files\Apache Software Foundation\Tomcat 5.5\common\lib\jsp-api;C:\Program Files\Apache SoftwareFoundation\Tomcat 5.5\webapps\ROOT\WEB-INF\classes;F:\oracle\ora92\jdbc\lib\classes12.jar ;F:\oracle\ora92\jdbc\lib\classes111.jar;


Wt is going wrong here?

Thanks..
Previous Topic: transfer data via xml
Next Topic: missing expression and then group function not allowed error
Goto Forum:
  


Current Time: Tue Dec 06 08:47:15 CST 2016

Total time taken to generate the page: 0.08447 seconds