Hi Bobo:

I had a similar problem, where my servlet would compile fine (so obviously it
found the class ok you would imagine), but at run-time the dreaded
"NoClassDefFoundError" would occur. (Note that is different from the
ClassNotFound error!). After searching a lot on Google, the general Java
archives,etc., I read accounts where other people had this same error. Some
people even said Tomcat doesnt pay any attention to what you say your classpath
is. (I don't know how much truth there is in this claim, nor why this should be
so..) However, in desperation I finally placed my jar file in
/usr/local/jakarta-tomcat/lib, restarted the tomcat engine, and my servlet ran
fine then. You may try something like this at the appropriate place in your set
up.. Sorry I don't have a more intellegent response, but maybe this will help.

Good luck!
Geeta

Mamadou Bobo Sylla wrote:

> I have my classpath set to mail.jar but I am still getting this error
> message when I run my servlet:
>
> java.lang.NoClassDefFoundError: javax/mail/Session
>  at com.ewarna.MailHtml_nv.sendHtmlMsg(MailHtml_nv.java:41)
>  at NewMail.addValidEntries(NewMail.java:146)
>  at NewMail.doPost(NewMail.java:52)
>  at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
>  at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>  at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404)
>  at org.apache.tomcat.core.Handler.service(Handler.java:286)
>  at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
>  at
> org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:79
> 7)
>  at org.apache.tomcat.core.ContextManager.service(ContextManager.java:743)
>  at
> org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpC
> onnectionHandler.java:210)
>  at
> org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
>  at
> org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:498)
>  at java.lang.Thread.run(Thread.java:484)
>
> Please help.
> Bobo
>
> ___________________________________________________________________________
> To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
> of the message "signoff SERVLET-INTEREST".
>
> Archives: http://archives.java.sun.com/archives/servlet-interest.html
> Resources: http://java.sun.com/products/servlet/external-resources.html
> LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to