-
Notifications
You must be signed in to change notification settings - Fork 112
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Commited response and PartialResponseWriter #5189
Comments
I tried reproducing this but I was unable to find the proper configuration triggering this misbehavior. Can you perhaps provide a reproducer? cc: @melloware |
@unkle-jb you can use this little test project to create a simple reproducer: https://github.com/primefaces/primefaces-test/tree/jakarta We have a 4.0 Jakarta branch all set and ready. |
@BalusC, @melloware Thanks ! |
That went easier than expected. Try it with value 50 or 5000 for nbSentences in TestView. Behaviour is different, and for (I'd say) bad reason. |
Ok, reproduced and improved. |
Describe the bug
During the rendering of a (large) page, an error is thrown and a ExceptionHandler is triggered (Primefaces).
Unfortunately, the response buffer is already comitted.
Hence, no redirection towards the error page (through js scripts) can be done.
It was workign with Mojarra 2.2.X but not with Mojarra 4.0 which we just migrated to.
Our understanding of the current situation is that the BufferSize is set in the DelayedInitPartialResponseWriter initalisation (it is a lazy getter) triggering an IllegalStateException from the Underlying Response (Tomcat in our case, Jetty would behave similarly).
Is there a reason not to check the extCtx.isComitted() before setting the ReponseBufferSize ?
Expected behavior
Getting a PartialResponseWriter evevn if response is in the comitted state (which was doable in Mojarra 2.2.X, and working as far as we can tell).
Screenshots
If applicable, add screenshots to help explain your problem.
Additional context
Java 17
Mojarra 4.0
Primefaces 12
Tomcat 10
Commit (unfortunately, no more Jira...)
javaee/mojarra@a030c06
The text was updated successfully, but these errors were encountered: