xindongyinfu
2008-10-30 08:48
浏览 983
已采纳

关于结果集已耗尽的求教

我的应用为什么偶尔会出现 结果集已耗尽的异常,当我重新在提交一次请求它又会回复正常,不知道为什么。该如何修改避免这个问题
DEBUG----2008-10-30 08:44:59 com.baosight.dw.me.app.util.database.DimCodeDAO -FindMetaSTUR Sql:select distinct ITEM_CODE,ITEM_NAME from DIM_CODE where CODESET_CODE = 'META_STR' and ITEM_STATUS='Y' and ITEM_CODE <> 'TM'
DEBUG----2008-10-30 08:44:59 com.baosight.dw.me.app.util.database.DimCodeDAO -FindMetaSTUR Sql:select distinct ITEM_CODE,ITEM_NAME from DIM_CODE where CODESET_CODE = 'META_STR' and ITEM_STATUS='Y' and ITEM_CODE <> 'TM'
java.sql.SQLException: 结果集已耗尽
Find ALL Formulas SQL:select distinct t.rowid,t.* from DIM_CONVERT_FORMULA t where t.ALIVE_FLAG='Y' and (FMLY_CODE ^='SRM' or FMLY_CODE is null)
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:146)
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:208)
at oracle.jdbc.driver.ScrollableResultSet.getOracleObject(ScrollableResultSet.java:496)
at oracle.jdbc.driver.ScrollableResultSet.getString(ScrollableResultSet.java:515)
at oracle.jdbc.driver.OracleResultSet.getString(OracleResultSet.java:1515)
at org.apache.tomcat.dbcp.dbcp.DelegatingResultSet.getString(DelegatingResultSet.java:224)
at com.baosight.dw.me.app.util.database.DimCodeDAO.findMeta(DimCodeDAO.java:62)
at com.baosight.dw.me.app.quotiety.action.ConvertFormulaAction.init(ConvertFormulaAction.java:78)
at com.baosight.dw.me.app.quotiety.action.ConvertFormulaAction.execute(ConvertFormulaAction.java:88)
at com.baosight.dw.me.app.general.GeneralControl.doPost(GeneralControl.java:62)
at com.baosight.dw.me.app.general.GeneralControl.doGet(GeneralControl.java:32)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at com.baosight.dw.me.app.filter.ManageFilter.doFilter(ManageFilter.java:26)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
at java.lang.Thread.run(Thread.java:595)
Find ALL Formulas SQL:select distinct t.rowid,t.* from DIM_CONVERT_FORMULA t where t.ALIVE_FLAG='Y' and (FMLY_CODE ^='SRM' or FMLY_CODE is null)
INFO----2008-10-30 08:45:02 com.baosight.dw.me.app.general.GeneralControl -Request Path is Succeed!
2008-10-30 8:45:02 org.apache.catalina.core.ApplicationDispatcher invoke
严重: Servlet.service() for servlet jsp threw exception
java.lang.NullPointerException
at org.apache.jsp.convertquotiety.convertformulaother_jsp._jspService(convertformulaother_jsp.java:162)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:334)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:672)
at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:463)
at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:398)
at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:301)
at com.baosight.dw.me.app.quotiety.action.ConvertFormulaAction.execute(ConvertFormulaAction.java:144)
at com.baosight.dw.me.app.general.GeneralControl.doPost(GeneralControl.java:62)
at com.baosight.dw.me.app.general.GeneralControl.doGet(GeneralControl.java:32)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at com.baosight.dw.me.app.filter.ManageFilter.doFilter(ManageFilter.java:26)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
at java.lang.Thread.run(Thread.java:595)
2008-10-30 8:45:02 org.apache.catalina.core.StandardWrapperValve invoke
严重: Servlet.service() for servlet general threw exception
java.lang.NullPointerException
at org.apache.jsp.convertquotiety.convertformulaother_jsp._jspService(convertformulaother_jsp.java:162)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:334)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:672)
at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:463)
at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:398)
at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:301)
at com.baosight.dw.me.app.quotiety.action.ConvertFormulaAction.execute(ConvertFormulaAction.java:144)
at com.baosight.dw.me.app.general.GeneralControl.doPost(GeneralControl.java:62)
at com.baosight.dw.me.app.general.GeneralControl.doGet(GeneralControl.java:32)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at com.baosight.dw.me.app.filter.ManageFilter.doFilter(ManageFilter.java:26)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
at java.lang.Thread.run(Thread.java:595)

  • 写回答
  • 好问题 提建议
  • 追加酬金
  • 关注问题
  • 邀请回答

2条回答 默认 最新

  • iteye_1997 2008-10-30 11:03
    最佳回答

    在取ResultSet里面的东西.判断ResultSet.next().
    每次用完,Connection和ResultSet都要close.

    评论
    解决 无用
    打赏 举报
查看更多回答(1条)

相关推荐 更多相似问题