aspose file tools*
The moose likes Other JSE/JEE APIs and the fly likes Problem While using Java Mail API.... Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Other JSE/JEE APIs
Bookmark "Problem While using Java Mail API...." Watch "Problem While using Java Mail API...." New topic
Author

Problem While using Java Mail API....

Pandey Chaman
Greenhorn

Joined: Mar 05, 2008
Posts: 2
when i am trying to execute the java mail API application to compose and send a mail to a SMTP server there is an Exception as....



javax.servlet.ServletException: javax/mail/MessagingException
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:253)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)


root cause

java.lang.NoClassDefFoundError: javax/mail/MessagingException
java.lang.Class.getDeclaredConstructors0(Native Method)
java.lang.Class.privateGetDeclaredConstructors(Unknown Source)
java.lang.Class.getConstructor0(Unknown Source)
java.lang.Class.getConstructor(Unknown Source)
org.apache.jasper.compiler.Generator$GenerateVisitor.visit(Generator.java:1218)
org.apache.jasper.compiler.Node$UseBean.accept(Node.java:1116)
org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2163)
org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2213)
org.apache.jasper.compiler.Node$Visitor.visit(Node.java:2219)
org.apache.jasper.compiler.Node$Root.accept(Node.java:456)
org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2163)
org.apache.jasper.compiler.Generator.generate(Generator.java:3268)
org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:189)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:286)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:267)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:255)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:556)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:296)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:245)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)


Please Provide the solution for the above problem....Thanks.
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41815
    
  62
Welcome to JavaRanch.

Do you have the JavaMail jar file in your classpath? It sounds as if it's missing (or the file corrupted).


Ping & DNS - my free Android networking tools app
Chetan Parekh
Ranch Hand

Joined: Sep 16, 2004
Posts: 3636
Hi Pandey Chaman Welcome to JavaRanch!!

You are getting this error becuase some jar file(s) are not there in classpath.


My blood is tested +ve for Java.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Problem While using Java Mail API....