Servlet.service() for servlet ShowNews threw exception - Web 开发 / 其他
2011-9-6 20:26:52 org.apache.catalina.core.StandardWrapperValve invoke
严重: Servlet.service() for servlet ShowNews threw exception
java.lang.NullPointerException
at org.cs.trade.dao.impl.UserDaoImpl.findNews(UserDaoImpl.java:29)
at org.cs.trade.service.impl.UserService.findNews(UserService.java:17)
at org.cs.trade.control.ShowNews.service(ShowNews.java:27)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:263)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:584)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Unknown Source)
[解决办法]
应该是Hibernate,Spring等配置文件缺少注入的类导致的吧。
查看 UserDaoImpl.java:29行处的代码是什么
我的异常网推荐解决方案:Servlet.service() for servlet default threw exception,http://www.myexception.cn/eclipse/181756.html