File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Servlets and the fly likes Can anybody help? NoClassDefFoundException Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of Mongo DB Applied Patterns this week in the MongoDB forum
or a resume review from Five Year Itch in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Servlets
Reply Bookmark "Can anybody help? NoClassDefFoundException" Watch "Can anybody help? NoClassDefFoundException" New topic
Author

Can anybody help? NoClassDefFoundException

Ravi Mandalapu
Ranch Hand

Joined: Nov 01, 2000
Posts: 34
Hi,
I devoloped E-mail application.
I am running the application fine. But i am getting runtime exception as :

java.lang.NoClassDefFoundError: javax/mail/Message
<<no stack trace available>>
com.sssw.rt.util.AgoException:
java.lang.NoClassDefFoundError: javax/mail/Message
<<no stack trace available>>

Actually i checked my class path, there i added mail.jar,...

I don't know exactly what's wrong....
Surprisingly application is working.

If any reply, would be greatly appeciate.

Ravi
[ January 07, 2006: Message edited by: Bear Bibeault ]
Shreyas Joshi
Greenhorn

Joined: Jan 07, 2006
Posts: 1
You are getting an Error java.lang.NoClassDefFoundException

This means your OS (Operating System) is unable to find the class. You need to instruct a compiler to check the current directory where you have your generated class file.

For this, you can include . (dot) in your classpath like this.

Right click MyComputer Go to properties / Advance / In CLASSPATH include .;
(dot)

or
set classpath=.;C:\j2sdk\bin;

this dot will help compiler to check for the present directory for class.
try again java (your class) at command prompt.

You will get output now.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 56150
    
  13

Web containers pay no attention whatsoever to the classpath. You need to put the jar file somewhere where the container will add the file to its own classpath. Check the documentation for your container.


[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
 
I agree. Here's the link: http://jrebel.com/download
 
subject: Can anybody help? NoClassDefFoundException
 
Similar Threads
Error 500--Internal Server Error
Mails thru JSP
Error:javax/mail/Message(java.lang.NoClassFoundError)
javax/mail/Message error
Error 500--Internal Server Error