Skip to content

Cannot call sendError() after the response has been committed #322

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

Closed
selvakumarEsra opened this issue Nov 8, 2016 · 3 comments
Closed

Comments

@selvakumarEsra
Copy link

Hi,

i am using spring-boot-admin version 1.4.2 and when i registering client using eureka. After registering i am getting lot or errors in the log. unable to goto the bottom of this issue. please help

2016-11-08 20:44:22.149 WARN 12120 --- [nio-9090-exec-5] .w.s.m.s.DefaultHandlerExceptionResolver : Handling of [org.springframework.web.context.request.async.AsyncRequestTimeoutException] resulted in Exception

java.lang.IllegalStateException: Cannot call sendError() after the response has been committed
at org.apache.catalina.connector.ResponseFacade.sendError(ResponseFacade.java:472) ~[tomcat-embed-core-8.5.5.jar:8.5.5]
at org.springframework.web.servlet.mvc.support.DefaultHandlerExceptionResolver.handleAsyncRequestTimeoutException(DefaultHandlerExceptionResolver.java:501) ~[spring-webmvc-4.3.3.RELEASE.jar:4.3.3.RELEASE]
at org.springframework.web.servlet.mvc.support.DefaultHandlerExceptionResolver.doResolveException(DefaultHandlerExceptionResolver.java:164) ~[spring-webmvc-4.3.3.RELEASE.jar:4.3.3.RELEASE]
at org.springframework.web.servlet.handler.AbstractHandlerExceptionResolver.resolveException(AbstractHandlerExceptionResolver.java:136) [spring-webmvc-4.3.3.RELEASE.jar:4.3.3.RELEASE]
at org.springframework.web.servlet.handler.HandlerExceptionResolverComposite.resolveException(HandlerExceptionResolverComposite.java:74) [spring-webmvc-4.3.3.RELEASE.jar:4.3.3.RELEASE]
at org.springframework.web.servlet.DispatcherServlet.processHandlerException(DispatcherServlet.java:1193) [spring-webmvc-4.3.3.RELEASE.jar:4.3.3.RELEASE]
at org.springframework.web.servlet.DispatcherServlet.processDispatchResult(DispatcherServlet.java:1030) [spring-webmvc-4.3.3.RELEASE.jar:4.3.3.RELEASE]
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:980) [spring-webmvc-4.3.3.RELEASE.jar:4.3.3.RELEASE]
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:897) [spring-webmvc-4.3.3.RELEASE.jar:4.3.3.RELEASE]
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:970) [spring-webmvc-4.3.3.RELEASE.jar:4.3.3.RELEASE]
at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:861) [spring-webmvc-4.3.3.RELEASE.jar:4.3.3.RELEASE]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:622) [tomcat-embed-core-8.5.5.jar:8.5.5]
at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:846) [spring-webmvc-4.3.3.RELEASE.jar:4.3.3.RELEASE]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:729) [tomcat-embed-core-8.5.5.jar:8.5.5]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:230) [tomcat-embed-core-8.5.5.jar:8.5.5]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165) [tomcat-embed-core-8.5.5.jar:8.5.5]
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:101) [spring-web-4.3.3.RELEASE.jar:4.3.3.RELEASE]
at org

@joshiste
Copy link
Collaborator

joshiste commented Nov 8, 2016

This is a duplicate of #317 and has been fixed with https://jira.spring.io/browse/SPR-14444
You should upgrade to spring 4.3.2 / boot 1.4.1.
Please note that you'll get another exception in the logs which is described here: #286 and handeld by https://jira.spring.io/browse/SPR-14739 and will be fixed in spring 4.3.4 / boot 1.4.2

@joshiste joshiste closed this as completed Nov 8, 2016
@selvakumarEsra
Copy link
Author

Thanks Josh for the update

@Vikas068
Copy link

Vikas068 commented Oct 8, 2023

Sometimes this might come when doing deserialization, Use @JSON ignore where were the @onetomany or vice versa used. It resolve this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants