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

java.net | 5 months ago
  1. 0

    When attempting to create a new JDBC connection pool, GlassFish errors with the exception: java.lang.IllegalStateException: getOutputStream() has already been called for this response To reproduce, using the latest builds (from 23 Feb 2015): 1. Select Create New JDBCConnection Pool 2. Enter any valid information on Step 1 of 2 (New JDBC Connection Pool page) 3. Click the Next button and the error is thrown. The full stack tace from the log files is as follows: [2015-02-23T22:06:15.124+0000] [glassfish 4.1] [WARNING] [] [javax.enterprise.web] [tid: _ThreadID=178 _ThreadName=admin-listener(8)] [timeMillis: 1424729175124] [levelValue: 900] [[ StandardWrapperValve[FacesServlet]: Servlet.service() for servlet FacesServlet threw exception java.lang.IllegalStateException: getOutputStream() has already been called for this response at org.apache.catalina.connector.Response.getWriter(Response.java:777) at org.apache.catalina.connector.ResponseFacade.getWriter(ResponseFacade.java:224) at com.sun.faces.context.ExternalContextImpl.getResponseOutputWriter(ExternalContextImpl.java:846) at com.sun.faces.context.PartialViewContextImpl.createPartialResponseWriter(PartialViewContextImpl.java:504) at com.sun.faces.context.PartialViewContextImpl.access$300(PartialViewContextImpl.java:79) at com.sun.faces.context.PartialViewContextImpl$DelayedInitPartialResponseWriter.getWrapped(PartialViewContextImpl.java:642) at javax.faces.context.PartialResponseWriter.startDocument(PartialResponseWriter.java:120) at com.sun.faces.context.AjaxExceptionHandlerImpl.handlePartialResponseError(AjaxExceptionHandlerImpl.java:201) at com.sun.faces.context.AjaxExceptionHandlerImpl.handle(AjaxExceptionHandlerImpl.java:126) at javax.faces.context.ExceptionHandlerWrapper.handle(ExceptionHandlerWrapper.java:100) at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:119) at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:219) at javax.faces.webapp.FacesServlet.service(FacesServlet.java:647) at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1682) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:344) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214) at com.sun.webui.jsf.util.UploadFilter.doFilter(UploadFilter.java:233) 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.doChainInvoke(StandardPipeline.java:678) at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:97) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:174) at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:415) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:282) 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:201) at org.glassfish.grizzly.http.server.HttpHandler.doHandle(HttpHandler.java:175) 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:284) at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:201) at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:133) at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:112) at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77) at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:561) 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:565) at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:545) at java.lang.Thread.run(Thread.java:745) ]] [2015-02-23T22:09:25.421+0000] [glassfish 4.1] [INFO] [] [org.glassfish.admingui] [tid: _ThreadID=53 _ThreadName=admin-listener(3)] [timeMillis: 1424729365421] [levelValue: 800] [[ Exception Occurred :null]]

    Java.net JIRA | 2 years ago | doobrie
    java.lang.IllegalStateException: getOutputStream() has already been called for this response
  2. 0

    [GLASSFISH-21314] Cannot create JDBC Connection Pool - Java.net JIRA

    java.net | 5 months ago
    java.lang.IllegalStateException: getOutputStream() has already been called for this response
  3. 0

    When attempting to create a new JDBC connection pool, GlassFish errors with the exception: java.lang.IllegalStateException: getOutputStream() has already been called for this response To reproduce, using the latest builds (from 23 Feb 2015): 1. Select Create New JDBCConnection Pool 2. Enter any valid information on Step 1 of 2 (New JDBC Connection Pool page) 3. Click the Next button and the error is thrown. The full stack tace from the log files is as follows: [2015-02-23T22:06:15.124+0000] [glassfish 4.1] [WARNING] [] [javax.enterprise.web] [tid: _ThreadID=178 _ThreadName=admin-listener(8)] [timeMillis: 1424729175124] [levelValue: 900] [[ StandardWrapperValve[FacesServlet]: Servlet.service() for servlet FacesServlet threw exception java.lang.IllegalStateException: getOutputStream() has already been called for this response at org.apache.catalina.connector.Response.getWriter(Response.java:777) at org.apache.catalina.connector.ResponseFacade.getWriter(ResponseFacade.java:224) at com.sun.faces.context.ExternalContextImpl.getResponseOutputWriter(ExternalContextImpl.java:846) at com.sun.faces.context.PartialViewContextImpl.createPartialResponseWriter(PartialViewContextImpl.java:504) at com.sun.faces.context.PartialViewContextImpl.access$300(PartialViewContextImpl.java:79) at com.sun.faces.context.PartialViewContextImpl$DelayedInitPartialResponseWriter.getWrapped(PartialViewContextImpl.java:642) at javax.faces.context.PartialResponseWriter.startDocument(PartialResponseWriter.java:120) at com.sun.faces.context.AjaxExceptionHandlerImpl.handlePartialResponseError(AjaxExceptionHandlerImpl.java:201) at com.sun.faces.context.AjaxExceptionHandlerImpl.handle(AjaxExceptionHandlerImpl.java:126) at javax.faces.context.ExceptionHandlerWrapper.handle(ExceptionHandlerWrapper.java:100) at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:119) at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:219) at javax.faces.webapp.FacesServlet.service(FacesServlet.java:647) at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1682) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:344) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214) at com.sun.webui.jsf.util.UploadFilter.doFilter(UploadFilter.java:233) 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.doChainInvoke(StandardPipeline.java:678) at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:97) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:174) at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:415) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:282) 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:201) at org.glassfish.grizzly.http.server.HttpHandler.doHandle(HttpHandler.java:175) 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:284) at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:201) at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:133) at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:112) at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77) at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:561) 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:565) at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:545) at java.lang.Thread.run(Thread.java:745) ]] [2015-02-23T22:09:25.421+0000] [glassfish 4.1] [INFO] [] [org.glassfish.admingui] [tid: _ThreadID=53 _ThreadName=admin-listener(3)] [timeMillis: 1424729365421] [levelValue: 800] [[ Exception Occurred :null]]

    Java.net JIRA | 2 years ago | doobrie
    java.lang.IllegalStateException: getOutputStream() has already been called for this response
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    [#GLASSFISH-21314] Cannot create JDBC Connection Pool

    java.net | 5 months ago
    java.lang.IllegalStateException: getOutputStream() has already been called for this response
  6. 0

    Glassfish Admin Console throws java.lang.IllegalStateException when creating JDBC Pool

    Stack Overflow | 1 year ago | George
    java.lang.IllegalStateException: getOutputStream() has already been called for this response

  1. Piz 24 times, last 4 months ago
  2. mortalman7 10 times, last 7 months ago
  3. Bugger 1 times, last 8 months ago
  4. eilonreshef 1 times, last 9 months ago
39 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

    getOutputStream() has already been called for this response

    at org.apache.catalina.connector.Response.getWriter()
  2. Glassfish Core
    ResponseFacade.getWriter
    1. org.apache.catalina.connector.Response.getWriter(Response.java:777)
    2. org.apache.catalina.connector.ResponseFacade.getWriter(ResponseFacade.java:224)
    2 frames
  3. JSF
    PartialViewContextImpl$DelayedInitPartialResponseWriter.getWrapped
    1. com.sun.faces.context.ExternalContextImpl.getResponseOutputWriter(ExternalContextImpl.java:851)
    2. com.sun.faces.context.PartialViewContextImpl.createPartialResponseWriter(PartialViewContextImpl.java:504)
    3. com.sun.faces.context.PartialViewContextImpl.access$300(PartialViewContextImpl.java:79)
    4. com.sun.faces.context.PartialViewContextImpl$DelayedInitPartialResponseWriter.getWrapped(PartialViewContextImpl.java:642)
    4 frames
  4. JavaEE 7
    PartialResponseWriter.startDocument
    1. javax.faces.context.PartialResponseWriter.startDocument(PartialResponseWriter.java:120)
    1 frame
  5. JSF
    AjaxExceptionHandlerImpl.handle
    1. com.sun.faces.context.AjaxExceptionHandlerImpl.handlePartialResponseError(AjaxExceptionHandlerImpl.java:202)
    2. com.sun.faces.context.AjaxExceptionHandlerImpl.handle(AjaxExceptionHandlerImpl.java:127)
    2 frames
  6. JavaEE 7
    ExceptionHandlerWrapper.handle
    1. javax.faces.context.ExceptionHandlerWrapper.handle(ExceptionHandlerWrapper.java:100)
    1 frame
  7. JSF
    LifecycleImpl.render
    1. com.sun.faces.lifecycle.Phase.doPhase(Phase.java:119)
    2. com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:219)
    2 frames
  8. JavaEE 7
    FacesServlet.service
    1. javax.faces.webapp.FacesServlet.service(FacesServlet.java:659)
    1 frame
  9. Glassfish Core
    ApplicationFilterChain.doFilter
    1. org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1682)
    2. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:344)
    3. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
    3 frames
  10. com.sun.webui
    UploadFilter.doFilter
    1. com.sun.webui.jsf.util.UploadFilter.doFilter(UploadFilter.java:233)
    1 frame
  11. Glassfish Core
    StandardPipeline.doChainInvoke
    1. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
    2. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
    3. org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:316)
    4. org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:160)
    5. org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:734)
    6. org.apache.catalina.core.StandardPipeline.doChainInvoke(StandardPipeline.java:678)
    6 frames
  12. Glassfish
    WebPipeline.invoke
    1. com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:97)
    1 frame
  13. Glassfish Core
    CoyoteAdapter.service
    1. org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:174)
    2. org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:416)
    3. org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:283)
    3 frames
  14. Kernel Classes
    ContainerMapper.service
    1. com.sun.enterprise.v3.services.impl.ContainerMapper$HttpHandlerCallable.call(ContainerMapper.java:459)
    2. com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:167)
    2 frames
  15. Grizzly Server
    HttpServerFilter.handleRead
    1. org.glassfish.grizzly.http.server.HttpHandler.runService(HttpHandler.java:206)
    2. org.glassfish.grizzly.http.server.HttpHandler.doHandle(HttpHandler.java:180)
    3. org.glassfish.grizzly.http.server.HttpServerFilter.handleRead(HttpServerFilter.java:235)
    3 frames
  16. Grizzly
    ProcessorExecutor.execute
    1. org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119)
    2. org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:283)
    3. org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:200)
    4. org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:132)
    5. org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:111)
    6. org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77)
    6 frames
  17. Nucleus Grizzly jars Combining
    PUFilter.handleRead
    1. org.glassfish.grizzly.portunif.PUFilter.handleRead(PUFilter.java:231)
    1 frame
  18. Grizzly
    ProcessorExecutor.execute
    1. org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119)
    2. org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:283)
    3. org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:200)
    4. org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:132)
    5. org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:111)
    6. org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77)
    6 frames
  19. Nucleus Grizzly jars Combining
    PUFilter.handleRead
    1. org.glassfish.grizzly.portunif.PUFilter.handleRead(PUFilter.java:231)
    1 frame
  20. Grizzly
    AbstractThreadPool$Worker.run
    1. org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119)
    2. org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:283)
    3. org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:200)
    4. org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:132)
    5. org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:111)
    6. org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77)
    7. org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:536)
    8. org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:112)
    9. org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.run0(WorkerThreadIOStrategy.java:117)
    10. org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.access$100(WorkerThreadIOStrategy.java:56)
    11. org.glassfish.grizzly.strategies.WorkerThreadIOStrategy$WorkerThreadRunnable.run(WorkerThreadIOStrategy.java:137)
    12. org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:591)
    13. org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:571)
    13 frames
  21. Java RT
    Thread.run
    1. java.lang.Thread.run(Thread.java:745)
    1 frame