HTTP Status 500 弄邮件发送(javamail)发生的。以后的报错内容,求大神解疑。谢谢。

type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
javax.servlet.ServletException: Error instantiating servlet class com.piedra.register.RegisterServlet
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:849)
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:454)
java.lang.Thread.run(Unknown Source)

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.newInstance0(Unknown Source)
java.lang.Class.newInstance(Unknown Source)
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:849)
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:454)
java.lang.Thread.run(Unknown Source)

NoClassDefFoundError 类没找到只有两个原因:

1,你缺jar。找到相应的jar包,导入你的工程。
2,类冲突!在eclipse里面 ctrl+shift+t 输入该类,如果发现多个jar内均有该类,就是类冲突了。追问

请问一下,是哪一个类发生冲突了。

追答

java.lang.NoClassDefFoundError: javax/mail/MessagingException

温馨提示:答案为网友推荐,仅供参考
第1个回答  2014-03-28
缺少了Javax.mail.jar包
相似回答