问题描述
十二月16,201411:01:58下午org.apache.catalina.core.StandardWrapperValveinvoke严重:Servlet.service()forservlet[UserServlet]incontextwithpath[/goods]threwexceptionjava.lang.RuntimeException:java.lang.reflect.InvocationTargetExceptionatcn.itcast.servlet.BaseServlet.service(BaseServlet.java:60)atjavax.servlet.http.HttpServlet.service(HttpServlet.java:727)atorg.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)atorg.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)atorg.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)atorg.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)atorg.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)atcn.itcast.filter.EncodingFilter.doFilter(EncodingFilter.java:30)atorg.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)atorg.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)atorg.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)atorg.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)atorg.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:501)atorg.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)atorg.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)atorg.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:950)atorg.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)atorg.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)atorg.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1070)atorg.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:611)atorg.apache.tomcat.util.net.AprEndpoint$SocketProcessor.doRun(AprEndpoint.java:2440)atorg.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:2429)atjava.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)atjava.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)atorg.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)atjava.lang.Thread.run(Thread.java:745)Causedby:java.lang.reflect.InvocationTargetExceptionatsun.reflect.NativeMethodAccessorImpl.invoke0(NativeMethod)atsun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)atsun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)atjava.lang.reflect.Method.invoke(Method.java:606)atcn.itcast.servlet.BaseServlet.service(BaseServlet.java:44)...25moreCausedby:java.lang.RuntimeException:javax.mail.AuthenticationFailedException:failedtoconnectatcn.itcast.goods.user.service.UserService.regist(UserService.java:107)atcn.itcast.goods.user.web.servlet.UserServlet.regist(UserServlet.java:133)...30moreCausedby:javax.mail.AuthenticationFailedException:failedtoconnectatjavax.mail.Service.connect(Service.java:322)atjavax.mail.Service.connect(Service.java:172)atjavax.mail.Service.connect(Service.java:121)atjavax.mail.Transport.send0(Transport.java:190)atjavax.mail.Transport.send(Transport.java:120)atcn.itcast.mail.MailUtils.send(MailUtils.java:91)atcn.itcast.goods.user.service.UserService.regist(UserService.java:105)...31more
解决方案
解决方案二:
用户名、密码对吗???楼主连的什么邮箱?
解决方案三:
用的事163邮箱
解决方案四:
引用2楼King_xiaoya的回复:
用的事163邮箱
如果用户名密码没有错误的话!就换个邮箱吧qq、新浪试试!我以前也是就用163不行!换新浪就可以!
解决方案五:
你要看看你的邮箱是否开启了smtp服务
解决方案六:
“Causedby:java.lang.RuntimeException:javax.mail.AuthenticationFailedException:failedtoconnect”---报的是连不上邮箱服务器,先确保你的网络能成功连上POP3/SMTP邮箱服务器