java.lang.IllegalStateException: PWC1227: Cannot forward after response has been

Splash Forums Rewrite Users java.lang.IllegalStateException: PWC1227: Cannot forward after response has been

This topic contains 2 replies, has 2 voices, and was last updated by  Christian Kaltepoth 2 years, 10 months ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #25105

    luisvg
    Participant

    I have been using prettyfaces for a while, let me congratulate to you, it is a great project. Right now I am trying to integrate the new Rewrite in a new Web project. Everything works fine, but all the time I am getting this error message in the console:

    java.lang.IllegalStateException: PWC1227: Cannot forward after response has been committed
            at org.apache.catalina.core.ApplicationDispatcher.doDispatch(ApplicationDispatcher.java:404)
            at org.apache.catalina.core.ApplicationDispatcher.dispatch(ApplicationDispatcher.java:379)
            at org.apache.catalina.core.ApplicationDispatcher.dispatch(ApplicationDispatcher.java:336)
            at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:314)
            at org.ocpsoft.rewrite.servlet.impl.HttpRewriteResultHandler.handleResult(HttpRewriteResultHandler.java:38)
            at org.ocpsoft.rewrite.servlet.RewriteFilter.rewrite(RewriteFilter.java:263)
            at org.ocpsoft.rewrite.servlet.RewriteFilter.doFilter(RewriteFilter.java:188)
            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:215)
            at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:277)
            at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:188)
            at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:641)
            at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:97)
            at com.sun.enterprise.web.PESessionLockingStandardPipeline.invoke(PESessionLockingStandardPipeline.java:85)
            at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:185)
            at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:325)
            at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:226)
            at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:165)
            at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:791)
            at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:693)
            at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:954)
            at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:170)
            at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:135)
            at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:102)
            at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:88)
            at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:76)
            at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:53)
            at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:57)
            at com.sun.grizzly.ContextTask.run(ContextTask.java:69)
            at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:330)
            at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:309)
            at java.lang.Thread.run(Thread.java:619)

    I attach a simple Web Aplicattion project where it is happening.

    I am working with Glassfish V3, Netbeans 6.0, Java 6, JSF 2.0
    Thnks!

    #25111

    Thanks for providing the sample app. I’ll try to find some time in the next days to have a look at it.

    You could also have a look at this thread:

    http://ocpsoft.org/support/topic/java-lang-illegalstateexception-pwc1227-cannot-forward-after-response-has-been/

    This is a similar problem of someone using Glassfish. I posted some hints about how to debug this issue there back then. Perhaps this will help.

    #25126

    I just gave your application a try. When I access /Test-pretty/, the page renders fine. I see “Hola” on the resulting page. I used Glassfish 3.1.2.2.

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.

Comments are closed.