Cactus
  1. Cactus
  2. CACTUS-251

W org.apache.jasper.runtime.PageContextImpl release failed to flush response buffer during PageContext.release() warning on conclusion of execution of test

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 1.7.2
    • Fix Version/s: None
    • Component/s: Framework
    • Labels:
      None
    • Environment:
      WebSphere Application Server 6.1 FP2

      Description

      When you execute a tag or servlet test at the conclusion of the test (after successful execution) WAS reports the following

      [9/24/07 15:42:12:250 CDT] 00000021 jsp W org.apache.jasper.runtime.PageContextImpl release failed to flush response buffer during PageContext.release().
      java.io.IOException: Stream closed
      at org.apache.jasper.runtime.JspWriterImpl.flushBuffer(JspWriterImpl.java:169)
      at org.apache.jasper.runtime.PageContextImpl.release(PageContextImpl.java:225)
      at org.apache.jasper.runtime.JspFactoryImpl.internalReleasePageContext(JspFactoryImpl.java:170)
      at org.apache.jasper.runtime.JspFactoryImpl.releasePageContext(JspFactoryImpl.java:138)
      at com.ibm._jsp._jspRedirector._jspService(_jspRedirector.java:109)

      Now this is a warning but the stack trace that accompanies this is quite verbose and as it happens for each test method you can wind up with a very cluttered log (not to mention people being concerned about the messages coming out of their server)

      I did some looking and the issue seems very straight forward so I don't think I am missing something and think the cactus code may be at fault. In the AbstractWebTestCaller on line 192 there is a out.close() statement which closes the JspWriter created by the web container (obtained via the getResponseWriter()) on the ServletTestCaller). To my knowledge it is not a good idea to close the writers created by the web container, you can simply let the web container do the closing for you which also avoids the above warning.

      By commenting out the close the tests now run and run without error/warning. Is this change something that should be migrated into the cactus source?

        Activity

          People

          • Assignee:
            Unassigned
            Reporter:
            Lee Burch
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:

              Development