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

Apache's JIRA Issue Tracker | Jason Morris | 2 years ago
tip
Click on the to mark the solution that helps you, Samebug will learn from it.
As a community member, you’ll be rewarded for you help.
  1. 0

    [JSPWIKI-874] java.lang.IllegalStateException - ASF JIRA

    apache.org | 1 year ago
    java.lang.IllegalStateException: PWC3990: getWriter() has already been called for this response
  2. 0

    After deploying JSPWiki.jar from GlassFish admin console. After running Install.jsp After moving generated jspwiki-custom.properties to GlassFish classpath dir After attempting to log in with generated admin credentials Page returns with following error: java.lang.IllegalStateException: PWC3990: getWriter() has already been called for this response Root cause: org.apache.wiki.ui.WikiJSPFilter.doFilter(WikiJSPFilter.java:136) Log file says: [#|2014-12-19T07:19:11.727+0000|WARNING|oracle-glassfish3.1.2|javax.enterprise.system.container.web.com.sun.enterprise.web|_ThreadID=255;_ThreadName=Thread-2;|StandardWrapperValve[jsp]: PWC1406: Servlet.service() for servlet jsp threw exception java.lang.IllegalStateException: PWC3990: getWriter() has already been called for this response at org.apache.catalina.connector.Response.getOutputStream(Response.java:674) at org.apache.catalina.connector.ResponseFacade.getOutputStream(ResponseFacade.java:206) at org.apache.wiki.ui.WikiJSPFilter.doFilter(WikiJSPFilter.java:136) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:217) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:279) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175) at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:655) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:595) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:161) at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:331) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:231) at com.sun.enterprise.v3.services.impl.ContainerMapper$AdapterCallable.call(ContainerMapper.java:317) at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:195) at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:860) at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:757) at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1056) at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:229) at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137) at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104) at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90) at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79) at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54) at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59) at com.sun.grizzly.ContextTask.run(ContextTask.java:71) at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532) at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513) at java.lang.Thread.run(Thread.java:744)

    Apache's JIRA Issue Tracker | 2 years ago | Jason Morris
    java.lang.IllegalStateException: PWC3990: getWriter() has already been called for this response
  3. 0

    After deploying JSPWiki.jar from GlassFish admin console. After running Install.jsp After moving generated jspwiki-custom.properties to GlassFish classpath dir After attempting to log in with generated admin credentials Page returns with following error: java.lang.IllegalStateException: PWC3990: getWriter() has already been called for this response Root cause: org.apache.wiki.ui.WikiJSPFilter.doFilter(WikiJSPFilter.java:136) Log file says: [#|2014-12-19T07:19:11.727+0000|WARNING|oracle-glassfish3.1.2|javax.enterprise.system.container.web.com.sun.enterprise.web|_ThreadID=255;_ThreadName=Thread-2;|StandardWrapperValve[jsp]: PWC1406: Servlet.service() for servlet jsp threw exception java.lang.IllegalStateException: PWC3990: getWriter() has already been called for this response at org.apache.catalina.connector.Response.getOutputStream(Response.java:674) at org.apache.catalina.connector.ResponseFacade.getOutputStream(ResponseFacade.java:206) at org.apache.wiki.ui.WikiJSPFilter.doFilter(WikiJSPFilter.java:136) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:217) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:279) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175) at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:655) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:595) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:161) at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:331) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:231) at com.sun.enterprise.v3.services.impl.ContainerMapper$AdapterCallable.call(ContainerMapper.java:317) at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:195) at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:860) at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:757) at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1056) at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:229) at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137) at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104) at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90) at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79) at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54) at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59) at com.sun.grizzly.ContextTask.run(ContextTask.java:71) at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532) at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513) at java.lang.Thread.run(Thread.java:744)

    Apache's JIRA Issue Tracker | 2 years ago | Jason Morris
    java.lang.IllegalStateException: PWC3990: getWriter() has already been called for this response
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    I've checked out and built JSPWiki-2.10.3-SNAPSHOT. The .war file is installed in a fresh Payara Server domain. The following error is then observed when attempting to authenticate to the new installation, when user preferences are saved, or otherwise triggered seemingly at random: {noformat} The server encountered an internal error that prevented it from fulfilling this request. java.lang.IllegalStateException: getWriter() has already been called for this response {noformat} The full stack trace is: {noformat} [2017-03-03T22:21:56.205+1300] [Payara 4.1] [WARNING] [] [javax.enterprise.web] [tid: _ThreadID=52 _ThreadName=http-listener-2(5)] [timeMillis: 1488532916205] [levelValue: 900] [[ StandardWrapperValve[jsp]: Servlet.service() for servlet jsp threw exception java.lang.IllegalStateException: getWriter() has already been called for this response at org.apache.catalina.connector.Response.getOutputStream(Response.java:747) at org.apache.catalina.connector.ResponseFacade.getOutputStream(ResponseFacade.java:206) at org.apache.wiki.ui.WikiJSPFilter.doFilter(WikiJSPFilter.java:128) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:316) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:160) at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:734) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:673) at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:99) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:174) at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:416) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:283) at com.sun.enterprise.v3.services.impl.ContainerMapper$HttpHandlerCallable.call(ContainerMapper.java:459) at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:167) at org.glassfish.grizzly.http.server.HttpHandler.runService(HttpHandler.java:206) at org.glassfish.grizzly.http.server.HttpHandler.doHandle(HttpHandler.java:180) at org.glassfish.grizzly.http.server.HttpServerFilter.handleRead(HttpServerFilter.java:235) at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119) at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:283) at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:200) at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:132) at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:111) at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77) at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:536) at org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:112) at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.run0(WorkerThreadIOStrategy.java:117) at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.access$100(WorkerThreadIOStrategy.java:56) at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy$WorkerThreadRunnable.run(WorkerThreadIOStrategy.java:137) at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:591) at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:571) at java.lang.Thread.run(Thread.java:745) {noformat} I've tried installing on two separate systems, in both cases using JSPWiki built from source independently, and the same error is observed. Earlier JSPWiki 2.10.x builds on the same platform(s) installed and functioned without problem. The error is observed when using either the default skin or Haddock.

    Apache's JIRA Issue Tracker | 2 months ago | Dave Koelmeyer
    java.lang.IllegalStateException: getWriter() has already been called for this response
  6. 0

    [Glassfish] PWC3990: getWriter() has already been called for this response

    GitHub | 4 years ago | smithh032772
    java.lang.IllegalStateException: PWC3990: getWriter() has already been called for this response

    7 unregistered visitors
    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

      PWC3990: getWriter() has already been called for this response

      at org.apache.catalina.connector.Response.getOutputStream()
    2. Glassfish Core
      ResponseFacade.getOutputStream
      1. org.apache.catalina.connector.Response.getOutputStream(Response.java:674)
      2. org.apache.catalina.connector.ResponseFacade.getOutputStream(ResponseFacade.java:206)
      2 frames
    3. org.apache.wiki
      WikiJSPFilter.doFilter
      1. org.apache.wiki.ui.WikiJSPFilter.doFilter(WikiJSPFilter.java:136)
      1 frame
    4. Glassfish Core
      CoyoteAdapter.service
      1. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
      2. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:217)
      3. org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:279)
      4. org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
      5. org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:655)
      6. org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:595)
      7. org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:161)
      8. org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:331)
      9. org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:231)
      9 frames
    5. Kernel Classes
      ContainerMapper.service
      1. com.sun.enterprise.v3.services.impl.ContainerMapper$AdapterCallable.call(ContainerMapper.java:317)
      2. com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:195)
      2 frames
    6. Grizzly WS
      AbstractThreadPool$Worker.run
      1. com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:860)
      2. com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:757)
      3. com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1056)
      4. com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:229)
      5. com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137)
      6. com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104)
      7. com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90)
      8. com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79)
      9. com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54)
      10. com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59)
      11. com.sun.grizzly.ContextTask.run(ContextTask.java:71)
      12. com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532)
      13. com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513)
      13 frames
    7. Java RT
      Thread.run
      1. java.lang.Thread.run(Thread.java:744)
      1 frame