java.lang.IllegalStateException: response.getWriter() called after response.getOutputStream()

Atlassian JIRA | Alex Fishlock | 8 years ago
  1. 0

    Clicking on any url in crowd id produces the following stack trace in the logs: Its normally due to the ordering of the filters for sitemesh being wrong. I havent checked though The app works properly.. but the logs are full of this 2008-08-14 01:10:06.046::WARN: /id/ java.lang.IllegalStateException: response.getWriter() called after response.getOutputStream() at com.opensymphony.module.sitemesh.filter.Buffer.getWriter(Buffer.java:52) at com.opensymphony.module.sitemesh.filter.PageResponseWrapper$3.activateDestination(PageResponseWrapper.java:82) at com.opensymphony.module.sitemesh.filter.RoutablePrintWriter.getDestination(RoutablePrintWriter.java:38) at com.opensymphony.module.sitemesh.filter.RoutablePrintWriter.write(RoutablePrintWriter.java:144) at org.apache.jasper.runtime.JspWriterImpl.flushBuffer(JspWriterImpl.java:165) at org.apache.jasper.runtime.PageContextImpl.release(PageContextImpl.java:221) at org.apache.jasper.runtime.JspFactoryImpl.internalReleasePageContext(JspFactoryImpl.java:157) at org.apache.jasper.runtime.JspFactoryImpl.releasePageContext(JspFactoryImpl.java:108) at org.apache.jsp.index_jsp._jspService(org.apache.jsp.index_jsp:57) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:93) at javax.servlet.http.HttpServlet.service(HttpServlet.java:820) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:373) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:470) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:364) at javax.servlet.http.HttpServlet.service(HttpServlet.java:820) at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1097) at com.opensymphony.webwork.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:189) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1088) at com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.java:39) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1088) at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:360) at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216) at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181) at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:729) at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405) at org.mortbay.jetty.servlet.Dispatcher.forward(Dispatcher.java:285) at org.mortbay.jetty.servlet.Dispatcher.forward(Dispatcher.java:126) at org.mortbay.jetty.servlet.DefaultServlet.doGet(DefaultServlet.java:463) at javax.servlet.http.HttpServlet.service(HttpServlet.java:707) at javax.servlet.http.HttpServlet.service(HttpServlet.java:820) at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1097) at com.opensymphony.webwork.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:189) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1088) at com.opensymphony.module.sitemesh.filter.PageFilter.parsePage(PageFilter.java:118) at com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.java:52) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1088) at org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:198) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:75) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1088) at com.opensymphony.webwork.dispatcher.ActionContextCleanUp.doFilter(ActionContextCleanUp.java:88) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1088) at org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:350) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1088) at com.atlassian.core.filters.AbstractEncodingFilter.doFilter(AbstractEncodingFilter.java:33) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1088) at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:360) at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216) at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181) at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:729) at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405) at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:206) at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114) at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152) at org.mortbay.jetty.Server.handle(Server.java:324) at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:505) at org.mortbay.jetty.ajp.Ajp13Connection.access$2700(Ajp13Connection.java:44) at org.mortbay.jetty.ajp.Ajp13Connection$RequestHandler.headerComplete(Ajp13Connection.java:225) at org.mortbay.jetty.ajp.Ajp13Parser.parseNext(Ajp13Parser.java:488) at org.mortbay.jetty.ajp.Ajp13Parser.parseAvailable(Ajp13Parser.java:142) at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380) at org.mortbay.jetty.bio.SocketConnector$Connection.run(SocketConnector.java:228) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907) at java.lang.Thread.run(Thread.java:619)

    Atlassian JIRA | 8 years ago | Alex Fishlock
    java.lang.IllegalStateException: response.getWriter() called after response.getOutputStream()
  2. 0

    Clicking on any url in crowd id produces the following stack trace in the logs: Its normally due to the ordering of the filters for sitemesh being wrong. I havent checked though The app works properly.. but the logs are full of this 2008-08-14 01:10:06.046::WARN: /id/ java.lang.IllegalStateException: response.getWriter() called after response.getOutputStream() at com.opensymphony.module.sitemesh.filter.Buffer.getWriter(Buffer.java:52) at com.opensymphony.module.sitemesh.filter.PageResponseWrapper$3.activateDestination(PageResponseWrapper.java:82) at com.opensymphony.module.sitemesh.filter.RoutablePrintWriter.getDestination(RoutablePrintWriter.java:38) at com.opensymphony.module.sitemesh.filter.RoutablePrintWriter.write(RoutablePrintWriter.java:144) at org.apache.jasper.runtime.JspWriterImpl.flushBuffer(JspWriterImpl.java:165) at org.apache.jasper.runtime.PageContextImpl.release(PageContextImpl.java:221) at org.apache.jasper.runtime.JspFactoryImpl.internalReleasePageContext(JspFactoryImpl.java:157) at org.apache.jasper.runtime.JspFactoryImpl.releasePageContext(JspFactoryImpl.java:108) at org.apache.jsp.index_jsp._jspService(org.apache.jsp.index_jsp:57) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:93) at javax.servlet.http.HttpServlet.service(HttpServlet.java:820) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:373) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:470) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:364) at javax.servlet.http.HttpServlet.service(HttpServlet.java:820) at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1097) at com.opensymphony.webwork.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:189) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1088) at com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.java:39) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1088) at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:360) at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216) at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181) at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:729) at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405) at org.mortbay.jetty.servlet.Dispatcher.forward(Dispatcher.java:285) at org.mortbay.jetty.servlet.Dispatcher.forward(Dispatcher.java:126) at org.mortbay.jetty.servlet.DefaultServlet.doGet(DefaultServlet.java:463) at javax.servlet.http.HttpServlet.service(HttpServlet.java:707) at javax.servlet.http.HttpServlet.service(HttpServlet.java:820) at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1097) at com.opensymphony.webwork.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:189) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1088) at com.opensymphony.module.sitemesh.filter.PageFilter.parsePage(PageFilter.java:118) at com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.java:52) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1088) at org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:198) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:75) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1088) at com.opensymphony.webwork.dispatcher.ActionContextCleanUp.doFilter(ActionContextCleanUp.java:88) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1088) at org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:350) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1088) at com.atlassian.core.filters.AbstractEncodingFilter.doFilter(AbstractEncodingFilter.java:33) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1088) at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:360) at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216) at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181) at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:729) at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405) at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:206) at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114) at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152) at org.mortbay.jetty.Server.handle(Server.java:324) at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:505) at org.mortbay.jetty.ajp.Ajp13Connection.access$2700(Ajp13Connection.java:44) at org.mortbay.jetty.ajp.Ajp13Connection$RequestHandler.headerComplete(Ajp13Connection.java:225) at org.mortbay.jetty.ajp.Ajp13Parser.parseNext(Ajp13Parser.java:488) at org.mortbay.jetty.ajp.Ajp13Parser.parseAvailable(Ajp13Parser.java:142) at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380) at org.mortbay.jetty.bio.SocketConnector$Connection.run(SocketConnector.java:228) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907) at java.lang.Thread.run(Thread.java:619)

    Atlassian JIRA | 8 years ago | Alex Fishlock
    java.lang.IllegalStateException: response.getWriter() called after response.getOutputStream()
  3. 0

    How to prevent Grails from rendering the default view?

    Stack Overflow | 6 years ago | Dave
    java.lang.IllegalStateException: response.getWriter() called after response.getOutputStream()
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Grails User (Old Archive) - Legacy app - java.lang.IllegalStateException: response.getWriter() called after response.getOutputStream()

    nabble.com | 1 year ago
    java.lang.IllegalStateException: response.getWriter() called after response.getOutputStream()
  6. 0

    OSB11g - Business Services - Calling WS throwing reader() error.

    Oracle Community | 6 years ago | Balaji885
    java.lang.IllegalStateException: getReader() called after getInputStream() called

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.IllegalStateException

      response.getWriter() called after response.getOutputStream()

      at com.opensymphony.module.sitemesh.filter.Buffer.getWriter()
    2. Sitemesh
      RoutablePrintWriter.write
      1. com.opensymphony.module.sitemesh.filter.Buffer.getWriter(Buffer.java:52)
      2. com.opensymphony.module.sitemesh.filter.PageResponseWrapper$3.activateDestination(PageResponseWrapper.java:82)
      3. com.opensymphony.module.sitemesh.filter.RoutablePrintWriter.getDestination(RoutablePrintWriter.java:38)
      4. com.opensymphony.module.sitemesh.filter.RoutablePrintWriter.write(RoutablePrintWriter.java:144)
      4 frames
    3. GWT dev
      JspFactoryImpl.releasePageContext
      1. org.apache.jasper.runtime.JspWriterImpl.flushBuffer(JspWriterImpl.java:165)
      2. org.apache.jasper.runtime.PageContextImpl.release(PageContextImpl.java:221)
      3. org.apache.jasper.runtime.JspFactoryImpl.internalReleasePageContext(JspFactoryImpl.java:157)
      4. org.apache.jasper.runtime.JspFactoryImpl.releasePageContext(JspFactoryImpl.java:108)
      4 frames
    4. org.apache.jsp
      index_jsp._jspService
      1. org.apache.jsp.index_jsp._jspService(org.apache.jsp.index_jsp:57)
      1 frame
    5. GWT dev
      HttpJspBase.service
      1. org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:93)
      1 frame
    6. JavaServlet
      HttpServlet.service
      1. javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
      1 frame
    7. GWT dev
      JspServlet.service
      1. org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:373)
      2. org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:470)
      3. org.apache.jasper.servlet.JspServlet.service(JspServlet.java:364)
      3 frames
    8. JavaServlet
      HttpServlet.service
      1. javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
      1 frame
    9. Jetty Server
      ServletHandler$CachedChain.doFilter
      1. org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)
      2. org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1097)
      2 frames
    10. WebWork
      FilterDispatcher.doFilter
      1. com.opensymphony.webwork.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:189)
      1 frame
    11. Jetty Server
      ServletHandler$CachedChain.doFilter
      1. org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1088)
      1 frame
    12. Sitemesh
      PageFilter.doFilter
      1. com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.java:39)
      1 frame
    13. Jetty Server
      DefaultServlet.doGet
      1. org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1088)
      2. org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:360)
      3. org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
      4. org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
      5. org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:729)
      6. org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405)
      7. org.mortbay.jetty.servlet.Dispatcher.forward(Dispatcher.java:285)
      8. org.mortbay.jetty.servlet.Dispatcher.forward(Dispatcher.java:126)
      9. org.mortbay.jetty.servlet.DefaultServlet.doGet(DefaultServlet.java:463)
      9 frames
    14. JavaServlet
      HttpServlet.service
      1. javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
      2. javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
      2 frames
    15. Jetty Server
      ServletHandler$CachedChain.doFilter
      1. org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)
      2. org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1097)
      2 frames
    16. WebWork
      FilterDispatcher.doFilter
      1. com.opensymphony.webwork.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:189)
      1 frame
    17. Jetty Server
      ServletHandler$CachedChain.doFilter
      1. org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1088)
      1 frame
    18. Sitemesh
      PageFilter.doFilter
      1. com.opensymphony.module.sitemesh.filter.PageFilter.parsePage(PageFilter.java:118)
      2. com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.java:52)
      2 frames
    19. Jetty Server
      ServletHandler$CachedChain.doFilter
      1. org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1088)
      1 frame
    20. Hibernate
      OpenSessionInViewFilter.doFilterInternal
      1. org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:198)
      1 frame
    21. Spring
      OncePerRequestFilter.doFilter
      1. org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:75)
      1 frame
    22. Jetty Server
      ServletHandler$CachedChain.doFilter
      1. org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1088)
      1 frame
    23. WebWork
      ActionContextCleanUp.doFilter
      1. com.opensymphony.webwork.dispatcher.ActionContextCleanUp.doFilter(ActionContextCleanUp.java:88)
      1 frame
    24. Jetty Server
      ServletHandler$CachedChain.doFilter
      1. org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1088)
      1 frame
    25. UrlRewriteFilter
      UrlRewriteFilter.doFilter
      1. org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:350)
      1 frame
    26. Jetty Server
      ServletHandler$CachedChain.doFilter
      1. org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1088)
      1 frame
    27. com.atlassian.core
      AbstractEncodingFilter.doFilter
      1. com.atlassian.core.filters.AbstractEncodingFilter.doFilter(AbstractEncodingFilter.java:33)
      1 frame
    28. Jetty Server
      HttpConnection.handleRequest
      1. org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1088)
      2. org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:360)
      3. org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
      4. org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
      5. org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:729)
      6. org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405)
      7. org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:206)
      8. org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
      9. org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
      10. org.mortbay.jetty.Server.handle(Server.java:324)
      11. org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:505)
      11 frames
    29. Jetty AJP
      Ajp13Parser.parseAvailable
      1. org.mortbay.jetty.ajp.Ajp13Connection.access$2700(Ajp13Connection.java:44)
      2. org.mortbay.jetty.ajp.Ajp13Connection$RequestHandler.headerComplete(Ajp13Connection.java:225)
      3. org.mortbay.jetty.ajp.Ajp13Parser.parseNext(Ajp13Parser.java:488)
      4. org.mortbay.jetty.ajp.Ajp13Parser.parseAvailable(Ajp13Parser.java:142)
      4 frames
    30. Jetty Server
      SocketConnector$Connection.run
      1. org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380)
      2. org.mortbay.jetty.bio.SocketConnector$Connection.run(SocketConnector.java:228)
      2 frames
    31. Java RT
      Thread.run
      1. java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
      2. java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
      3. java.lang.Thread.run(Thread.java:619)
      3 frames