org.springframework.web.util.NestedServletException

Request processing failed; nested exception is java.lang.IllegalStateException: getOutputStream() has already been called for this response

Samebug tips0

We couldn't find tips for this exception.

Don't give up yet. Paste your full stack trace to get a solution.

Solutions on the web331

  • via GitHub by akistanov
    ,
  • via Unknown by Saar Picker,
  • Stack trace

    • org.springframework.web.util.NestedServletException: Request processing failed; nested exception is java.lang.IllegalStateException: getOutputStream() has already been called for this response at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:979)[spring-webmvc-4.1.7.RELEASE.jar:4.1.7.RELEASE] at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:858)[spring-webmvc-4.1.7.RELEASE.jar:4.1.7.RELEASE] at javax.servlet.http.HttpServlet.service(HttpServlet.java:622)[tomcat-embed-core-8.0.23.jar:8.0.23] at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:843)[spring-webmvc-4.1.7.RELEASE.jar:4.1.7.RELEASE] at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)[tomcat-embed-core-8.0.23.jar:8.0.23] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:291)[tomcat-embed-core-8.0.23.jar:8.0.23] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)[tomcat-embed-core-8.0.23.jar:8.0.23] at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:101)[spring-web-4.1.7.RELEASE.jar:4.1.7.RELEASE] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)[tomcat-embed-core-8.0.23.jar:8.0.23] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)[tomcat-embed-core-8.0.23.jar:8.0.23] at grails.plugin.cache.web.filter.PageFragmentCachingFilter.doFilter(PageFragmentCachingFilter.java:190)[cache-3.0.1.jar:na] at grails.plugin.cache.web.filter.AbstractFilter.doFilter(AbstractFilter.java:63)[cache-3.0.1.jar:na] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)[tomcat-embed-core-8.0.23.jar:8.0.23] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)[tomcat-embed-core-8.0.23.jar:8.0.23] at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:101)[spring-web-4.1.7.RELEASE.jar:4.1.7.RELEASE] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)[tomcat-embed-core-8.0.23.jar:8.0.23] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)[tomcat-embed-core-8.0.23.jar:8.0.23] at org.grails.web.servlet.mvc.GrailsWebRequestFilter.doFilterInternal(GrailsWebRequestFilter.java:73)[grails-web-mvc-3.0.3.jar:3.0.3] at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)[spring-web-4.1.7.RELEASE.jar:4.1.7.RELEASE] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)[tomcat-embed-core-8.0.23.jar:8.0.23] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)[tomcat-embed-core-8.0.23.jar:8.0.23] at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:101)[spring-web-4.1.7.RELEASE.jar:4.1.7.RELEASE] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)[tomcat-embed-core-8.0.23.jar:8.0.23] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)[tomcat-embed-core-8.0.23.jar:8.0.23] at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:101)[spring-web-4.1.7.RELEASE.jar:4.1.7.RELEASE] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)[tomcat-embed-core-8.0.23.jar:8.0.23] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)[tomcat-embed-core-8.0.23.jar:8.0.23] at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:101)[spring-web-4.1.7.RELEASE.jar:4.1.7.RELEASE] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)[tomcat-embed-core-8.0.23.jar:8.0.23] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)[tomcat-embed-core-8.0.23.jar:8.0.23] at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:721)[tomcat-embed-core-8.0.23.jar:8.0.23] at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:584)[tomcat-embed-core-8.0.23.jar:8.0.23] at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:523)[tomcat-embed-core-8.0.23.jar:8.0.23] at org.apache.catalina.core.StandardHostValve.custom(StandardHostValve.java:433)[tomcat-embed-core-8.0.23.jar:8.0.23] at org.apache.catalina.core.StandardHostValve.status(StandardHostValve.java:305)[tomcat-embed-core-8.0.23.jar:8.0.23] at org.apache.catalina.core.StandardHostValve.throwable(StandardHostValve.java:399)[tomcat-embed-core-8.0.23.jar:8.0.23] at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)[tomcat-embed-core-8.0.23.jar:8.0.23] at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)[tomcat-embed-core-8.0.23.jar:8.0.23] at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)[tomcat-embed-core-8.0.23.jar:8.0.23] at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:518)[tomcat-embed-core-8.0.23.jar:8.0.23] at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1091)[tomcat-embed-core-8.0.23.jar:8.0.23] at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:668)[tomcat-embed-core-8.0.23.jar:8.0.23] at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1521)[tomcat-embed-core-8.0.23.jar:8.0.23] at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1478)[tomcat-embed-core-8.0.23.jar:8.0.23] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)[na:1.8.0_45] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)[na:1.8.0_45] at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)[tomcat-embed-core-8.0.23.jar:8.0.23] at java.lang.Thread.run(Thread.java:745)[na:1.8.0_45] Caused by: java.lang.IllegalStateException: getOutputStream() has already been called for this response at org.apache.catalina.connector.Response.getWriter(Response.java:578)[tomcat-embed-core-8.0.23.jar:8.0.23] at org.apache.catalina.connector.ResponseFacade.getWriter(ResponseFacade.java:212)[tomcat-embed-core-8.0.23.jar:8.0.23] at javax.servlet.ServletResponseWrapper.getWriter(ServletResponseWrapper.java:109)[tomcat-embed-core-8.0.23.jar:8.0.23] at org.springframework.boot.autoconfigure.web.ErrorMvcAutoConfiguration$SpelView.render(ErrorMvcAutoConfiguration.java:196)[spring-boot-autoconfigure-1.2.5.RELEASE.jar:1.2.5.RELEASE] at org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1244)[spring-webmvc-4.1.7.RELEASE.jar:4.1.7.RELEASE] at org.springframework.web.servlet.DispatcherServlet.processDispatchResult(DispatcherServlet.java:1027)[spring-webmvc-4.1.7.RELEASE.jar:4.1.7.RELEASE] at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:971)[spring-webmvc-4.1.7.RELEASE.jar:4.1.7.RELEASE] at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:893)[spring-webmvc-4.1.7.RELEASE.jar:4.1.7.RELEASE] at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:967)[spring-webmvc-4.1.7.RELEASE.jar:4.1.7.RELEASE] ... 47 more

    Write tip

    You have a different solution? A short tip here would help you and many other users who saw this issue last week.

    Users with the same issue

    Unknown visitor
    Unknown visitorOnce,
    BuggerBugger
    Once,
    MattyMatty
    4 times, last one
    Unknown visitor
    Unknown visitorOnce,
    Unknown visitor
    Unknown visitorOnce,
    42 more bugmates