Home » Developer & Programmer » JDeveloper, Java & XML » java.lang.NoClassDefFoundError
java.lang.NoClassDefFoundError [message #90875] Fri, 02 November 2001 04:50 Go to next message
mei li
Messages: 1
Registered: November 2001
Junior Member
Hello,

I set the classpath to point to classes12.zip, j2ee.jar, servlet.jar.

I compiled my servlet fine without error but when i tried to view it on browser, i get the error message below :

Line38 : DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());

500 Internal Server Error
/cs432/servlet/testing:

oracle/jdbc/driver/OracleDriver
java.lang.NoClassDefFoundError: oracle/jdbc/driver/OracleDriver
at testing.doGet(testing.java:38)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at allaire.jrun.servlet.JRunSE.service(../servlet/JRunSE.java:1416)
at allaire.jrun.session.JRunSessionService.service(../session/JRunSessionService.java:1082)
at allaire.jrun.servlet.JRunSE.runServlet(../servlet/JRunSE.java:1270)
at allaire.jrun.servlet.JRunNamedDispatcher.forward(../servlet/JRunNamedDispatcher.java:39)
at allaire.jrun.servlet.Invoker.service(../servlet/Invoker.java:84)
at allaire.jrun.servlet.JRunSE.service(../servlet/JRunSE.java:1416)
at allaire.jrun.session.JRunSessionService.service(../session/JRunSessionService.java:1082)
at allaire.jrun.servlet.JRunSE.runServlet(../servlet/JRunSE.java:1270)
at allaire.jrun.servlet.JRunRequestDispatcher.forward(../servlet/JRunRequestDispatcher.java:89)
at allaire.jrun.servlet.JRunSE.service(../servlet/JRunSE.java:1552)
at allaire.jrun.servlet.JRunSE.service(../servlet/JRunSE.java:1542)
at allaire.jrun.servlet.JvmContext.dispatch(../servlet/JvmContext.java:364)
at allaire.jrun.http.WebEndpoint.run(../http/WebEndpoint.java:115)
at allaire.jrun.ThreadPool.run(../ThreadPool.java:272)
at allaire.jrun.WorkerThread.run(../WorkerThread.java:75)

I can run the plain Java code testing the Oracle connection with no error but when i changed the code to servlet style, i get the above error.

Please help and I would appreciate that. Thank you very much !

Mei-Li

----------------------------------------------------------------------
Re: java.lang.NoClassDefFoundError [message #90910 is a reply to message #90875] Sun, 02 December 2001 12:18 Go to previous messageGo to next message
Cindy
Messages: 88
Registered: November 1999
Member
I had a similar problem. To fix it for me I put the following lines in my .cshrc file. See if that helps you.

setenv LD_LIBRARY_PATH /system/oracle/lib
setenv CLASSPATH /system/oracle/jdbc/lib/classes111.zip

----------------------------------------------------------------------
Re: java.lang.NoClassDefFoundError [message #90951 is a reply to message #90875] Sat, 05 January 2002 00:30 Go to previous message
shreyansh
Messages: 1
Registered: January 2002
Junior Member
public class NoClassDefFoundError
extends LinkageError
Thrown if the Java Virtual Machine or a classloader tries to load in the definition of a class (as part of a normal method call or as part of creating a new instance using the new expression) and no definition of the class could be found.
The searched-for class definition existed when the currently executing class was compiled, but the definition can no longer be found.

Most likely your runtime CLASSPATH isn't properly set
Previous Topic: Re: How to store xml file into database using BLOB
Next Topic: Re: JDBC driver for Oracle
Goto Forum:
  


Current Time: Tue Jul 27 11:09:53 CDT 2021