Topic
4 replies Latest Post - ‏2013-01-09T16:39:13Z by Codeoline
Codeoline
Codeoline
141 Posts
ACCEPTED ANSWER

Pinned topic java.lang.IllegalStateException: getOutputStream() has already been called

‏2013-01-08T14:43:53Z |
When trying to export to an Excel spreadsheet from the list page I am getting this message

java.lang.IllegalStateException: getOutputStream() has already been called for this response.

How do correct this? I searched the forum but dont see anything pertaining to this.
Thanks
Updated on 2013-01-09T16:39:13Z at 2013-01-09T16:39:13Z by Codeoline
  • kevintap
    kevintap
    742 Posts
    ACCEPTED ANSWER

    Re: java.lang.IllegalStateException: getOutputStream() has already been called

    ‏2013-01-08T16:15:08Z  in response to Codeoline
    Can you provide the full stack trace for the IllegalStateException? Also, I'd suggest checking your log files for any errors that may precede this error in your logs. The IllegalStateException itself could be a side effect of something else that went wrong during the export operation.

    The postings on this site are my own and do not necessarily represent the positions, strategies, or opinions of IBM.
    • Codeoline
      Codeoline
      141 Posts
      ACCEPTED ANSWER

      Re: java.lang.IllegalStateException: getOutputStream() has already been called

      ‏2013-01-08T17:23:08Z  in response to kevintap
      Here is the stack trace and i will check the log files.
      Thank You

      An error has occurred.
      The error message returned was: "getOutputStream() has already been called for this response".

      Please refer to the logs folder in your deployed application for additional error information.

      Click here for a detailed error message. Click here to hide the detailed error message.

      Exception getOutputStream() has already been called for this response
      Stack Trace
      java.lang.IllegalStateException: getOutputStream() has already been called for this response
      at org.apache.catalina.connector.Response.getWriter(Response.java:611)
      at org.apache.catalina.connector.ResponseFacade.getWriter(ResponseFacade.java:198)
      at com.bowstreet.webapp.engine.WebAppRunner.reportUnhandledError(WebAppRunner.java:920)
      at com.bowstreet.webapp.engine.WebAppRunner.doRequest(WebAppRunner.java:612)
      at com.bowstreet.webapp.engine.WebAppRunner.doRequest(WebAppRunner.java:338)
      at com.bowstreet.webapp.engine.WebAppRunner.doRequest(WebAppRunner.java:275)
      at com.bowstreet.webapp.util.StandaloneURLMapper.doRequest(StandaloneURLMapper.java:164)
      at com.bowstreet.servlet.AjaxServlet.doRequest(AjaxServlet.java:53)
      at com.bowstreet.servlet.AjaxServlet.doGet(AjaxServlet.java:31)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:693)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:806)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
      at org.apache.geronimo.tomcat.valve.DefaultSubjectValve.invoke(DefaultSubjectValve.java:56)
      at org.apache.geronimo.tomcat.GeronimoStandardContext$SystemMethodValve.invoke(GeronimoStandardContext.java:406)
      at org.apache.geronimo.tomcat.valve.GeronimoBeforeAfterValve.invoke(GeronimoBeforeAfterValve.java:47)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
      at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:555)
      at org.apache.geronimo.tomcat.valve.ThreadCleanerValve.invoke(ThreadCleanerValve.java:40)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
      at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:857)
      at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
      at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
      at java.lang.Thread.run(Thread.java:736)

      Action Status
      The following table lists the actions that have run during this request.

      Action ID:
      WebAppRunner.doRequest
      addCompatibilityHeader
      spreadsheet.streamDataToBrowser
      spreadsheet_Util.callReferenceResolver
      spreadsheet_Util.callReferenceResolver
      _IRResolver_1
      DSUIGetRequestsExcel
      DSUI.executeOperation
      GetRequestsExcelExecute
      LJO_.get_Excel
      • mburati
        mburati
        2544 Posts
        ACCEPTED ANSWER

        Re: java.lang.IllegalStateException: getOutputStream() has already been called

        ‏2013-01-08T20:27:07Z  in response to Codeoline
        That stack trace looks like it hit that exception (trying to get an output stream that was already obtained previously) WHILE trying to log an unhandled exception, so as Kevin suggested, there is likely a prior error/exception that's causing the actual problem.

        When you look in the WEF WAR's WEB-INF/logs/event.log look for exception(s) that happen just prior to the one that you are seeing with the getOutpuStream issue to see if you can tell what's actually going wrong with the action that should be doing the export.

        I hope that info helps,
        ..Mike Burati
        http://www-10.lotus.com/ldd/pfwiki.nsf/
        The postings on this site are my own and do not necessarily represent the positions, strategies, or opinions of IBM.
  • Codeoline
    Codeoline
    141 Posts
    ACCEPTED ANSWER

    Re: java.lang.IllegalStateException: getOutputStream() has already been called

    ‏2013-01-09T16:39:13Z  in response to Codeoline
    Spelling error found in event.log.
    Thanks for your help