You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cactus-dev@jakarta.apache.org by "Lee Burch (JIRA)" <ca...@jakarta.apache.org> on 2007/09/24 23:22:50 UTC

[jira] Created: (CACTUS-251) W org.apache.jasper.runtime.PageContextImpl release failed to flush response buffer during PageContext.release() warning on conclusion of execution of test

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

                 Key: CACTUS-251
                 URL: https://issues.apache.org/jira/browse/CACTUS-251
             Project: Cactus
          Issue Type: Bug
          Components: Framework
    Affects Versions: 1.7.2
         Environment: WebSphere Application Server 6.1 FP2
            Reporter: Lee Burch


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?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: cactus-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: cactus-dev-help@jakarta.apache.org