DisplayTag
  1. DisplayTag
  2. DISPL-621

getOutputStream() has already been called for this response

    Details

    • Type: Bug Bug
    • Status: Resolved Resolved
    • Priority: Major Major
    • Resolution: Cannot Reproduce
    • Affects Version/s: 1.1.1
    • Fix Version/s: 2.0
    • Component/s: Export
    • Labels:
      None
    • Application server:
      Tomcat 6.0

      Description

      Hi All,

      Even if I new to display-tag , I have successfully explored all its features. Thanks for every thing u have given in it.

      But one of the features of exporting PDF is not working when something round 3000 plus records contains in a jsp showing reports. I am getting following exception when trying to export to PDF (For CSV, Excel and XML I m not getting any error):-


      HTTP Status 500 -

      --------------------------------------------------------------------------------

      type Exception report

      message

      description The server encountered an internal error () that prevented it from fulfilling this request.

      exception

      org.apache.jasper.JasperException: java.lang.IllegalStateException: getOutputStream() has already been called for this response
      org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:522)
      org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:410)
      org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
      org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
      org.apache.jasper.runtime.PageContextImpl.doForward(PageContextImpl.java:696)
      org.apache.jasper.runtime.PageContextImpl.forward(PageContextImpl.java:667)
      org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:808)
      org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:781)
      org.apache.jsp.ShowReport_jsp._jspService(ShowReport_jsp.java:354)
      org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
      org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:374)
      org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
      org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:717)


      root cause

      java.lang.IllegalStateException: getOutputStream() has already been called for this response
      org.apache.catalina.connector.Response.getWriter(Response.java:610)
      org.apache.catalina.connector.ResponseFacade.getWriter(ResponseFacade.java:198)
      org.apache.jasper.runtime.JspWriterImpl.initOut(JspWriterImpl.java:125)
      org.apache.jasper.runtime.JspWriterImpl.flushBuffer(JspWriterImpl.java:118)
      org.apache.jasper.runtime.PageContextImpl.release(PageContextImpl.java:188)
      org.apache.jasper.runtime.JspFactoryImpl.internalReleasePageContext(JspFactoryImpl.java:118)
      org.apache.jasper.runtime.JspFactoryImpl.releasePageContext(JspFactoryImpl.java:77)
      org.apache.jsp.error_jsp._jspService(error_jsp.java:146)
      org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
      org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:374)
      org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
      org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
      org.apache.jasper.runtime.PageContextImpl.doForward(PageContextImpl.java:696)
      org.apache.jasper.runtime.PageContextImpl.forward(PageContextImpl.java:667)
      org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:808)
      org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:781)
      org.apache.jsp.ShowReport_jsp._jspService(ShowReport_jsp.java:354)
      org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
      org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:374)
      org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
      org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:717)


      note The full stack trace of the root cause is available in the Apache Tomcat/6.0.18 logs.


      I will appreciate any help to resolve this issue.

        Activity

        Hide
        Michael Osipov added a comment -
        It could have 2 reasons:

        1. The buffer of the JSP has already been flushed. 64 KiB are not enough for 3000 records.
        2. You did not use the ResponseOverrideFilter.

        Evaluate them.
        Show
        Michael Osipov added a comment - It could have 2 reasons: 1. The buffer of the JSP has already been flushed. 64 KiB are not enough for 3000 records. 2. You did not use the ResponseOverrideFilter. Evaluate them.
        Hide
        fabrizio giustina added a comment -
        Cannot reproduce. See explanation by Michael
        Show
        fabrizio giustina added a comment - Cannot reproduce. See explanation by Michael

          People

          • Reporter:
            Ranjit H. Dhongade
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Time Tracking

              Estimated:
              Original Estimate - 1 day
              1d
              Remaining:
              Remaining Estimate - 1 day
              1d
              Logged:
              Time Spent - Not Specified
              Not Specified