struts+hibernate 和tomcat 出现http500 错误

问题描述

我用了struts+hibernate和tomcat运行的时候 开始还好.过段时间就会慢.然后就死掉了.页面打不开.报http500错误。重起下就好了部分错误日志如下:2010-5-130:20:58org.apache.catalina.core.StandardWrapperValveinvoke严重:Servlet.service()forservletactionthrewexceptionjava.lang.NullPointerExceptionatcom.talent.action.BbsAnswerFrontPageOperAction.execute(BbsAnswerFrontPageOperAction.java:45)2010-5-130:45:13org.apache.catalina.core.StandardWrapperValveinvoke严重:Servlet.service()forservletactionthrewexceptionjava.lang.NullPointerExceptionatcom.talent.action.PageOperFrontAction.execute(PageOperFrontAction.java:70)2010-5-130:53:15org.apache.catalina.core.StandardWrapperValveinvoke严重:Servlet.service()forservletactionthrewexceptionjava.lang.NullPointerExceptionatcom.talent.action.BbsAnswerFrontPageOperAction.execute(BbsAnswerFrontPageOperAction.java:45)2010-5-130:57:55org.apache.catalina.core.StandardWrapperValveinvoke严重:Servlet.service()forservletactionthrewexceptionjava.lang.NullPointerExceptionatcom.talent.action.BbsAnswerFrontPageOperAction.execute(BbsAnswerFrontPageOperAction.java:45)atcom.talent.common.SortSelect.Sort1id(SortSelect.java:22)atcom.talent.action.GGoodsFrontAction.execute(GGoodsFrontAction.java:76)atcom.talent.common.CharsetFiter.doFilter(CharsetFiter.java:24)atcom.talent.action.PageOperFrontAction.execute(PageOperFrontAction.java:91)atcom.talent.action.NewsPageOperAction.execute(NewsPageOperAction.java:51)atorg.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484)atorg.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)atorg.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)atorg.apache.struts.action.ActionServlet.doGet(ActionServlet.java:507)atjavax.servlet.http.HttpServlet.service(HttpServlet.java:690)atjavax.servlet.http.HttpServlet.service(HttpServlet.java:803)atorg.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)atorg.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)atcom.talent.common.CharsetFiter.doFilter(CharsetFiter.java:24)atorg.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)atorg.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)atorg.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)atorg.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)atorg.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)atorg.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)atorg.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)atorg.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:261)atorg.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)atorg.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:581)atorg.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)atjava.lang.Thread.run(UnknownSource)2010-5-134:25:54org.apache.catalina.core.ApplicationDispatcherinvoke严重:Servlet.service()forservletjspthrewexceptionjava.lang.NullPointerExceptionatorg.apache.jsp.FrontTcxb.yijilei_jsp._jspService(yijilei_jsp.java:777)atorg.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)atjavax.servlet.http.HttpServlet.service(HttpServlet.java:803)atorg.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:393)atorg.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)atorg.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)atjavax.servlet.http.HttpServlet.service(HttpServlet.java:803)atorg.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)atorg.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)atorg.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:654)atorg.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:445)atorg.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:379)atorg.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:292)atorg.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1069)atorg.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:455)atorg.apache.struts.action.RequestProcessor.process(RequestProcessor.java:279)atorg.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)atorg.apache.struts.action.ActionServlet.doGet(ActionServlet.java:507)atjavax.servlet.http.HttpServlet.service(HttpServlet.java:690)atjavax.servlet.http.HttpServlet.service(HttpServlet.java:803)atorg.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)atorg.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)atcom.talent.common.CharsetFiter.doFilter(CharsetFiter.java:24)atorg.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)atorg.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)atorg.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)atorg.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)atorg.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)atorg.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)atorg.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)atorg.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:261)atorg.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)atorg.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:581)atorg.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)atjava.lang.Thread.run(UnknownSource)2010-5-134:25:54org.apache.catalina.core.StandardWrapperValveinvoke严重:Servlet.service()forservletactionthrewexceptionjava.lang.NullPointerExceptionatorg.apache.jsp.FrontTcxb.yijilei_jsp._jspService(yijilei_jsp.java:777)atorg.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)atjavax.servlet.http.HttpServlet.service(HttpServlet.java:803)atorg.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:393)atorg.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)atorg.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)atjavax.servlet.http.HttpServlet.service(HttpServlet.java:803)atorg.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)atorg.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)atorg.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:654)atorg.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:445)atorg.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:379)atorg.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:292)atorg.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1069)atorg.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:455)atorg.apache.struts.action.RequestProcessor.process(RequestProcessor.java:279)atorg.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)atorg.apache.struts.action.ActionServlet.doGet(ActionServlet.java:507)atjavax.servlet.http.HttpServlet.service(HttpServlet.java:690)atjavax.servlet.http.HttpServlet.service(HttpServlet.java:803)atorg.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)atorg.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)atcom.talent.common.CharsetFiter.doFilter(CharsetFiter.java:24)atorg.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)atorg.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)atorg.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)atorg.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)atorg.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)atorg.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)atorg.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)atorg.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:261)atorg.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)atorg.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:581)atorg.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)atjava.lang.Thread.run(UnknownSource)2010-5-134:42:05org.apache.catalina.core.ApplicationDispatcherinvoke严重:Servlet.service()forservletjspthrewexception

解决方案

解决方案二:
atcom.talent.action.BbsAnswerFrontPageOperAction.execute(BbsAnswerFrontPageOperAction.java:45)atcom.talent.common.SortSelect.Sort1id(SortSelect.java:22)atcom.talent.action.GGoodsFrontAction.execute(GGoodsFrontAction.java:76)atcom.talent.common.CharsetFiter.doFilter(CharsetFiter.java:24)atcom.talent.action.PageOperFrontAction.execute(PageOperFrontAction.java:91)atcom.talent.action.NewsPageOperAction.execute(NewsPageOperAction.java:51)某些地方的连接没释放,导致取不到数据库连接了?这个Null怀疑是conn取不到,信息不够,不好判断。
解决方案三:
这问题我遇到过,我知道怎样解决.

时间: 2024-10-27 22:35:14

struts+hibernate 和tomcat 出现http500 错误的相关文章

ssh-SpringMVC+Spring+Hibernate 启动tomcat时出现这个错误怎么解决

问题描述 SpringMVC+Spring+Hibernate 启动tomcat时出现这个错误怎么解决 2012-10-24 11:45:22 org.apache.catalina.core.AprLifecycleListener init 信息: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the

MyEclipse+struts+Hibernate配置开发

说明: 这个手册只是为初学者制作的环境配置和快速开发的一些基本方法,为的是广大爱好者能快速上手,少走我走过的弯路,里面没有任何关于java模式和其他相关的说明.本人水平有限,也没有能力去讨论关于模式设计和开发细节的一些内容. 建议: 如果你还不清楚struts和hibernate的一些基本原理,希望能先去了解一下这方面的相关内容. 推荐: Hibernate中文手册>作者认为要学Hibernate看这个就足够了,里面几乎包括了所有的细节,不过可能不太适合快速入门. 地址:http://www.h

struts2 0-spring+struts+hibernate整合问题,请大神帮忙!

问题描述 spring+struts+hibernate整合问题,请大神帮忙! 求大神解答,兄弟初学ssh,今天整合他们三个.报错很多,但是最后竟然可以正确运行(我只实现了一个从数据库读用户名密码来登陆的功能.) 报错如下:(其中第一个错误就是Could not open ServletContext resource [/WEB-INF/applicationContext.xml],我在这个目录下有这个文件的. 而且我的web.xml里有这些内容. contextConfigLocation

用MyEclipse+struts+hibernate测试时遇到的问题

用MyEclipse+struts+hibernate测试时遇到的问题       由于工作原因,使用了MyEclipse+Struts1.2+Hibernate3.1+Spring2.0框架写程序,刚开始的时候在Tomcat6.0上写,后来上面的领导非要弄到Resin3.0上,具体原因不清楚,没办法,照办吧.       把MyEclipse下自动生成的SSH结构直接发布到Resin3.0上,结果痛苦便开始了,弹出错误说什么 21:13:32,500 ERROR Digester:686 - 

struts2-关于struts+hibernate实现登陆问题

问题描述 关于struts+hibernate实现登陆问题 代码如下 login.jsp <%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%> <%@ taglib prefix="s" uri="/struts-tags" %> <% String path = request.getCont

Struts+Hibernate结构中J2EE的数据表示

在 struts+hibernate 这种结构中,是不应该把Hibernate产生的PO直接传递给JSP的,不管他是Iterator,还是List,这是一个设计错误. 我来谈谈在J2EE架构中各层的数据表示方法: Web层的数据表示是FormBean,数据来源于HTML Form POST 业务层的数据表示是VO 持久层的数据表示是PO,其数据来源于数据库,持久层的数据表示例如CMP.在一个规范的J2EE架构中,不同层的数据表示应该被限制在层内,而不应该扩散到其它层,这样可以降低层间的耦合性,提

解释spring,struts,hibernate优缺点

解释spring,struts,hibernate优缺点 Struts优点:对视图层进行封装 更好的分离视图层和控制层 对数据进行封装 缺点: 1 .转到展示层时,需要配置forward,每一次转到展示层,相信大多数都是直接转到jsp,而涉及到转向,需要配置forward,如果有十个展示层的jsp,需要配置十次struts,而且还不包括有时候目录.文件变更,需要重新修改forward,注意,每次修改配置之后,要求重新部署整个项目,而tomcate这样的服务器,还必须重新启动服务器,如果业务变更复

struts-在Myeclipse配置Struts,用tomcat测试一个index.jsp时出现问题

问题描述 在Myeclipse配置Struts,用tomcat测试一个index.jsp时出现问题 本人新手,求助各位大牛~~~~~ HTTP Status 500 - cn.it.shop.action.CategoryAction.1() type Exception report message cn.it.shop.action.CategoryAction.1() description The server encountered an internal error that pre

hibernate-在myeclipse中启动tomcat怎么出现错误

问题描述 在myeclipse中启动tomcat怎么出现错误 50C Io 异常: The Network Adapter could not establish the connection我用的是hibernate,数据库为MYSQL 解决方案 在myeclipse中启动tomcat出现的一些问题详解Myeclipse 启动 Tomcat 出现 class file editorTomcat启动出现 JVM_Bind 错误 解决方案二: 数据库为MYSQL,但是你url中怎么写的是oracl