如果tomcat中 一直抛这样的异常 过一段时间会死掉吗??

目前碰到个问题 就是 tomcat 跑一段时间后就会死掉 进程没有死但是网页打不开

 

 

应用 apache2.2 + tomcat5.0

 

跑的是纯静态的页面  只有页面的底部的计数(ajax 请求)是用的jsp 访问数据库 目前由于

数据服务器停掉了所以一直报这样的错误 但是这样一段时间后tomcat 会死掉网站页面打不开了

不知道这是导致tomcat死掉的元凶吗????

2008-11-21 07:39:56 StandardWrapperValve[jsp]: Servlet.service() for servlet jsp threw exception
org.apache.commons.dbcp.DbcpException: java.sql.SQLException: ORA-01033: ORACLE initialization or shutdown in progress

 at org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:85)
 at org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:184)
 at org.apache.commons.pool.impl.GenericObjectPool.borrowObject(Unknown Source)
 at org.apache.commons.dbcp.AbandonedObjectPool.borrowObject(AbandonedObjectPool.java:117)
 at org.apache.commons.dbcp.PoolingDataSource.getConnection(PoolingDataSource.java:110)
 at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:312)
 at org.apache.jsp.readcount_jsp._jspService(readcount_jsp.java:59)
 at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:133)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
 at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:311)
 at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301)
 at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
 at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:284)
 at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:204)
 at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:256)
 at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151)
 at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:563)
 at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:245)
 at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:199)
 at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151)
 at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:563)
 at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:195)
 at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151)
 at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:164)
 at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:149)
 at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:563)
 at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:156)
 at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151)
 at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:563)
 at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:972)
 at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:209)
 at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:670)
 at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:517)
 at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:575)
 at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:666)
 at java.lang.Thread.run(Unknown Source)
Caused by: java.sql.SQLException: ORA-01033: ORACLE initialization or shutdown in progress

 at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)
 at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:331)
 at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:283)
 at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:278)
 at oracle.jdbc.driver.T4CTTIoauthenticate.receiveOsesskey(T4CTTIoauthenticate.java:294)
 at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:357)
 at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:439)
 at oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:165)
 at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:35)
 at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:801)
 at org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:83)
 ... 36 more


问题补充:

目前碰到个问题 就是 tomcat 跑一段时间后就会死掉 进程没有死但是网页打不开


?



?



应用 apache2.2 + tomcat5.0



?



跑的是纯静态的页面? 只有页面的底部的计数(ajax 请求)是用的jsp 访问数据库 目前由于



数据服务器停掉了所以一直报这样的错误 但是这样一段时间后tomcat 会死掉网站页面打不开了



不知道这是导致tomcat死掉的元凶吗????



2008-11-21 07:39:56 StandardWrapperValve[jsp]: Servlet.service() for servlet jsp threw exception
org.apache.commons.dbcp.DbcpException: java.sql.SQLException: ORA-01033: ORACLE initialization or shutdown in progress



?at org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:85)
?at org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:184)
?at org.apache.commons.pool.impl.GenericObjectPool.borrowObject(Unknown Source)
?at org.apache.commons.dbcp.AbandonedObjectPool.borrowObject(AbandonedObjectPool.java:117)
?at org.apache.commons.dbcp.PoolingDataSource.getConnection(PoolingDataSource.java:110)
?at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:312)
?at org.apache.jsp.readcount_jsp._jspService(readcount_jsp.java:59)
?at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:133)
?at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
?at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:311)
?at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301)
?at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248)
?at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
?at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:284)
?at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:204)
?at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:256)
?at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151)
?at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:563)
?at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:245)
?at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:199)
?at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151)
?at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:563)
?at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:195)
?at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151)
?at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:164)
?at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:149)
?at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:563)
?at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:156)
?at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151)
?at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:563)
?at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:972)
?at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:209)
?at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:670)
?at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:517)
?at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:575)
?at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:666)
?at java.lang.Thread.run(Unknown Source)
Caused by: java.sql.SQLException: ORA-01033: ORACLE initialization or shutdown in progress



?at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)
?at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:331)
?at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:283)
?at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:278)
?at oracle.jdbc.driver.T4CTTIoauthenticate.receiveOsesskey(T4CTTIoauthenticate.java:294)
?at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:357)
?at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:439)
?at oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:165)
?at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:35)
?at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:801)
?at org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:83)
?... 36 more









bohemia说

有异常; 还是查查程序问题吧;



我知道异常的是怎么出的 关键是 数据服务器停掉了所以报错,可为什么这样tomcat就会死掉吗????






问题补充:
在数据服务器停掉以前tomcat 是没有死掉过的

还有这些异常是再tomcat 的日志里 copy 的
问题补充:
汗~~~~~~ 关不了提问了

6个回答

这个问题,可以尝试从服务器的连接配置上查找原因,因为servlet 调用dbcp连接池,去打开oracle的connect,而在进行数据库的链接打开过程中,各个数据库会有很多的参数设置,去官方网站看看官方文档,默认和不默认的时候,有连接时间限制。
可以尝试设置一定时间内,没有打开,网络连接就自动关闭,这样就不容易造成tomcat的服务线程无法完成响应。一直等待下去

有异常; 还是查查程序问题吧;

[quote]数据服务器停掉了[/quote]

程序要做这方面的检测的;如果数据库停掉了.页面上要出异常; 后台也要捕获异常的;

但不一定是这个导致Tomcat Down掉;

最好应用本身控制异常; 不要扔给应用服务器; 这样容易导致问题;

这种问题我也碰过,时间长了还会溢出崩溃。问题还没解决

还要确认是tomcat的java进程死掉了,还是tomcat无法响应用户的request了。

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
立即提问