{"action":"created","issue":{"url":"https://api.github.com/repos/primefaces/primefaces/issues/1566","repository_url":"https://api.github.com/repos/primefaces/primefaces","labels_url":"https://api.github.com/repos/primefaces/primefaces/issues/1566/labels{/name}","comments_url":"https://api.github.com/repos/primefaces/primefaces/issues/1566/comments","events_url":"https://api.github.com/repos/primefaces/primefaces/issues/1566/events","html_url":"https://github.com/primefaces/primefaces/issues/1566","id":163202969,"number":1566,"title":"Cannot call reset() after response has been committed","user":{"login":"andrei-ivanov","id":6377070,"avatar_url":"https://avatars.githubusercontent.com/u/6377070?v=3","gravatar_id":"","url":"https://api.github.com/users/andrei-ivanov","html_url":"https://github.com/andrei-ivanov","followers_url":"https://api.github.com/users/andrei-ivanov/followers","following_url":"https://api.github.com/users/andrei-ivanov/following{/other_user}","gists_url":"https://api.github.com/users/andrei-ivanov/gists{/gist_id}","starred_url":"https://api.github.com/users/andrei-ivanov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andrei-ivanov/subscriptions","organizations_url":"https://api.github.com/users/andrei-ivanov/orgs","repos_url":"https://api.github.com/users/andrei-ivanov/repos","events_url":"https://api.github.com/users/andrei-ivanov/events{/privacy}","received_events_url":"https://api.github.com/users/andrei-ivanov/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/primefaces/primefaces/labels/defect","name":"defect","color":"fc2929"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/primefaces/primefaces/milestones/4","html_url":"https://github.com/primefaces/primefaces/milestones/6.1","labels_url":"https://api.github.com/repos/primefaces/primefaces/milestones/4/labels","id":1812677,"number":4,"title":"6.1","description":"","creator":{"login":"cagataycivici","id":686247,"avatar_url":"https://avatars.githubusercontent.com/u/686247?v=3","gravatar_id":"","url":"https://api.github.com/users/cagataycivici","html_url":"https://github.com/cagataycivici","followers_url":"https://api.github.com/users/cagataycivici/followers","following_url":"https://api.github.com/users/cagataycivici/following{/other_user}","gists_url":"https://api.github.com/users/cagataycivici/gists{/gist_id}","starred_url":"https://api.github.com/users/cagataycivici/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cagataycivici/subscriptions","organizations_url":"https://api.github.com/users/cagataycivici/orgs","repos_url":"https://api.github.com/users/cagataycivici/repos","events_url":"https://api.github.com/users/cagataycivici/events{/privacy}","received_events_url":"https://api.github.com/users/cagataycivici/received_events","type":"User","site_admin":false},"open_issues":6,"closed_issues":98,"state":"open","created_at":"2016-06-07T06:20:05Z","updated_at":"2016-09-13T07:58:36Z","due_on":null,"closed_at":null},"comments":40,"created_at":"2016-06-30T16:03:31Z","updated_at":"2016-09-14T13:06:30Z","closed_at":null,"body":"Hi,\r\nI'm seeing a worrying number of exceptions regarding ``PrimeExceptionHandler`` trying to reset the response after it was commited when handling Ajax exceptions.\r\n\r\nAs far as I see, it checks if the response is committed (at https://github.com/primefaces/primefaces/blob/da76a548b3ab8747f8d560d6459fc7a059920055/src/main/java/org/primefaces/application/exceptionhandler/PrimeExceptionHandler.java#L147), but I'm wondering if the Mojarra workaround that follows triggers the commit of the response, calling the ``writer`` methods (including ``endDocument()``, which seems to flush the response writer).\r\n\r\nUsing PF 6.0 with Mojarra 2.2.13 on Tomcat 8.0.36\r\n\r\n```\r\n30-Jun-2016 14:44:05.532 SEVERE [http-apr-443-exec-70] org.primefaces.application.exceptionhandler.PrimeExceptionHandler.handle Could not handle exception!\r\n java.lang.IllegalStateException: Cannot call reset() after response has been committed\r\n\tat org.apache.catalina.connector.ResponseFacade.reset(ResponseFacade.java:353)\r\n\tat javax.servlet.ServletResponseWrapper.reset(ServletResponseWrapper.java:194)\r\n\tat javax.servlet.ServletResponseWrapper.reset(ServletResponseWrapper.java:194)\r\n\tat javax.servlet.ServletResponseWrapper.reset(ServletResponseWrapper.java:194)\r\n\tat com.sun.faces.context.ExternalContextImpl.responseReset(ExternalContextImpl.java:949)\r\n\tat org.primefaces.application.exceptionhandler.PrimeExceptionHandler.handleAjaxException(PrimeExceptionHandler.java:156)\r\n\tat org.primefaces.application.exceptionhandler.PrimeExceptionHandler.handle(PrimeExceptionHandler.java:98)\r\n\tat com.sun.faces.lifecycle.Phase.doPhase(Phase.java:119)\r\n\tat com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:219)\r\n\tat javax.faces.webapp.FacesServlet.service(FacesServlet.java:659)\r\n\tat org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:292)\r\n\tat org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)\r\n\tat org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)\r\n\tat org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)\r\n\tat org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)\r\n\tat org.springframework.orm.jpa.support.OpenEntityManagerInViewFilter.doFilterInternal(OpenEntityManagerInViewFilter.java:178)\r\n\tat org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)\r\n\tat org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)\r\n\tat org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)\r\n\tat com.ericsson.gscro.common.security.web.filter.SecurityMdcFilter.doFilter(SecurityMdcFilter.java:60)\r\n\tat org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)\r\n\tat org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)\r\n\tat org.springframework.orm.jpa.support.OpenEntityManagerInViewFilter.doFilterInternal(OpenEntityManagerInViewFilter.java:178)\r\n\tat org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)\r\n\tat org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)\r\n\tat org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)\r\n\tat org.springframework.orm.jpa.support.OpenEntityManagerInViewFilter.doFilterInternal(OpenEntityManagerInViewFilter.java:178)\r\n\tat org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)\r\n\tat org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)\r\n\tat org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)\r\n\tat org.springframework.orm.jpa.support.OpenEntityManagerInViewFilter.doFilterInternal(OpenEntityManagerInViewFilter.java:178)\r\n\tat org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)\r\n\tat org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)\r\n\tat org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)\r\n\tat org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:317)\r\n\tat org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:127)\r\n\tat org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:91)\r\n\tat org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)\r\n\tat org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:115)\r\n\tat org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)\r\n\tat org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:137)\r\n\tat org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)\r\n\tat org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:112)\r\n\tat org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)\r\n\tat org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:169)\r\n\tat org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)\r\n\tat org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:63)\r\n\tat org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)\r\n\tat org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:206)\r\n\tat org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)\r\n\tat org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:121)\r\n\tat org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)\r\n\tat org.springframework.security.web.header.HeaderWriterFilter.doFilterInternal(HeaderWriterFilter.java:66)\r\n\tat org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)\r\n\tat org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)\r\n\tat org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:56)\r\n\tat org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)\r\n\tat org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)\r\n\tat org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:106)\r\n\tat org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)\r\n\tat org.springframework.security.web.access.channel.ChannelProcessingFilter.doFilter(ChannelProcessingFilter.java:157)\r\n\tat org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)\r\n\tat org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:214)\r\n\tat org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:177)\r\n\tat org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346)\r\n\tat org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:262)\r\n\tat org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)\r\n\tat org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)\r\n\tat org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:212)\r\n\tat org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106)\r\n\tat org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)\r\n\tat org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:141)\r\n\tat org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)\r\n\tat org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:616)\r\n\tat org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)\r\n\tat org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:528)\r\n\tat org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1099)\r\n\tat org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:670)\r\n\tat org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.doRun(AprEndpoint.java:2508)\r\n\tat org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:2497)\r\n\tat java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)\r\n\tat java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)\r\n\tat org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)\r\n\tat java.lang.Thread.run(Thread.java:745)\r\n```"},"comment":{"url":"https://api.github.com/repos/primefaces/primefaces/issues/comments/247006471","html_url":"https://github.com/primefaces/primefaces/issues/1566#issuecomment-247006471","issue_url":"https://api.github.com/repos/primefaces/primefaces/issues/1566","id":247006471,"user":{"login":"andrei-ivanov","id":6377070,"avatar_url":"https://avatars.githubusercontent.com/u/6377070?v=3","gravatar_id":"","url":"https://api.github.com/users/andrei-ivanov","html_url":"https://github.com/andrei-ivanov","followers_url":"https://api.github.com/users/andrei-ivanov/followers","following_url":"https://api.github.com/users/andrei-ivanov/following{/other_user}","gists_url":"https://api.github.com/users/andrei-ivanov/gists{/gist_id}","starred_url":"https://api.github.com/users/andrei-ivanov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andrei-ivanov/subscriptions","organizations_url":"https://api.github.com/users/andrei-ivanov/orgs","repos_url":"https://api.github.com/users/andrei-ivanov/repos","events_url":"https://api.github.com/users/andrei-ivanov/events{/privacy}","received_events_url":"https://api.github.com/users/andrei-ivanov/received_events","type":"User","site_admin":false},"created_at":"2016-09-14T13:06:30Z","updated_at":"2016-09-14T13:06:30Z","body":"So, can this issue be closed? :-)\r\nWho should I ask for it to be merged for 6.0.5?"}}
{"actor":{"display_login":"andrei-ivanov"}}