java.lang.reflect.InvocationTargetException异常 15
在注册用户的时候出现,看不懂,猜测是数据连接问题,求解惑····怎么解决?用户更改密码是也会抛出异常。Servlet.service()forservlet[UserSe...
在注册用户的时候出现,看不懂,猜测是数据连接问题,求解惑····怎么解决?用户更改密码是也会抛出异常。Servlet.service() for servlet [UserServlet] in context with path [/goods] threw exception
java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
at cn.itcast.servlet.BaseServlet.service(BaseServlet.java:60)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at cn.itcast.filter.EncodingFilter.doFilter(EncodingFilter.java:30)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:929)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1002)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:585)
at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:1813)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
at java.lang.Thread.run(Thread.java:662)
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at cn.itcast.servlet.BaseServlet.service(BaseServlet.java:44)
Caused by: java.lang.RuntimeException: javax.mail.AuthenticationFailedException: failed to connect
at cn.itcast.bookstore.user.service.UserService.regist(UserService.java:85)
at cn.itcast.bookstore.user.web.servlet.UserServlet.regist(UserServlet.java:136)
... 25 more
Caused by: javax.mail.AuthenticationFailedException: failed to connect
at javax.mail.Service.connect(Service.java:322)
at javax.mail.Service.connect(Service.java:172) 展开
java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
at cn.itcast.servlet.BaseServlet.service(BaseServlet.java:60)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at cn.itcast.filter.EncodingFilter.doFilter(EncodingFilter.java:30)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:929)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1002)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:585)
at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:1813)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
at java.lang.Thread.run(Thread.java:662)
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at cn.itcast.servlet.BaseServlet.service(BaseServlet.java:44)
Caused by: java.lang.RuntimeException: javax.mail.AuthenticationFailedException: failed to connect
at cn.itcast.bookstore.user.service.UserService.regist(UserService.java:85)
at cn.itcast.bookstore.user.web.servlet.UserServlet.regist(UserServlet.java:136)
... 25 more
Caused by: javax.mail.AuthenticationFailedException: failed to connect
at javax.mail.Service.connect(Service.java:322)
at javax.mail.Service.connect(Service.java:172) 展开
6个回答
展开全部
把你这个配置文件里面的email_template.properties参数项改一下试试···
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
2014-04-06
展开全部
Caused by: java.lang.RuntimeException: javax.mail.AuthenticationFailedException: failed to connect
at cn.itcast.bookstore.user.service.UserService.regist(UserService.java:85)
at cn.itcast.bookstore.user.web.servlet.UserServlet.regist(UserServlet.java:136)
... 25 more
Caused by: javax.mail.AuthenticationFailedException: failed to connect
at javax.mail.Service.connect(Service.java:322)
at javax.mail.Service.connect(Service.java:172)
提示的是注册时连接邮件认证失败,是物理连接问题。
at cn.itcast.bookstore.user.service.UserService.regist(UserService.java:85)
at cn.itcast.bookstore.user.web.servlet.UserServlet.regist(UserServlet.java:136)
... 25 more
Caused by: javax.mail.AuthenticationFailedException: failed to connect
at javax.mail.Service.connect(Service.java:322)
at javax.mail.Service.connect(Service.java:172)
提示的是注册时连接邮件认证失败,是物理连接问题。
追问
可以说具体一点吗?工程里面有一个邮件模板email_template.properties,不明白properties的用法。
追答
这个就需要慢慢调试了,可能性太多,不是在这里能解决的。
properties是配置文件,看是不是有些服务器地址什么的设置需要调整。
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
smtp.163.com 在email.properties配置文件中 的password是在163邮箱开通smtp服务中的授权码而不是邮箱密码
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
服务器出错了,看一下servers
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
题主这个问题解决了吗?我也遇到这个问题了,希望题主看到能解答一下,感激不尽
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询