post action error use omnifaces and glassfish 3 or 4

Splash Forums PrettyFaces Users post action error use omnifaces and glassfish 3 or 4

This topic contains 3 replies, has 3 voices, and was last updated by  sertan76 2 years, 9 months ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #25317

    sertan76
    Participant

    I wrote a simple application which use pretty faces and glassfish. This app uses a post method and call an other page. Normally, it works. Although I added omnifaces gzipfilter to web.xml, glassfish gives an error like below. How can I solve this problem?
    WARNING: StandardWrapperValve[Faces Servlet]: PWC1406: Servlet.service() for servlet Faces Servlet threw exception
    java.lang.IllegalStateException: Current state = FLUSHED, new state = CODING_END
    at java.nio.charset.CharsetEncoder.throwIllegalStateException(CharsetEncoder.java:968)
    at java.nio.charset.CharsetEncoder.encode(CharsetEncoder.java:554)
    at sun.nio.cs.StreamEncoder.flushLeftoverChar(StreamEncoder.java:242)
    at sun.nio.cs.StreamEncoder.implClose(StreamEncoder.java:301)
    at sun.nio.cs.StreamEncoder.close(StreamEncoder.java:149)
    at java.io.OutputStreamWriter.close(OutputStreamWriter.java:233)
    at org.omnifaces.io.ResettableBufferedWriter.close(ResettableBufferedWriter.java:98)
    at java.io.PrintWriter.close(PrintWriter.java:339)
    at org.omnifaces.servlet.HttpServletResponseOutputWrapper.close(HttpServletResponseOutputWrapper.java:149)
    at org.omnifaces.servlet.GzipHttpServletResponse.close(GzipHttpServletResponse.java:133)
    at org.omnifaces.filter.GzipResponseFilter.doFilter(GzipResponseFilter.java:150)
    at org.omnifaces.filter.HttpFilter.doFilter(HttpFilter.java:75)
    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.arp.DefaultAsyncExecutor.execute(DefaultAsyncExecutor.java:159)
    at com.sun.grizzly.arp.DefaultAsyncExecutor.interrupt(DefaultAsyncExecutor.java:145)
    at com.sun.grizzly.arp.AsyncProcessorTask.doTask(AsyncProcessorTask.java:102)
    at com.sun.grizzly.http.TaskBase.run(TaskBase.java:193)
    at com.sun.grizzly.http.TaskBase.execute(TaskBase.java:175)
    at com.sun.grizzly.arp.DefaultAsyncHandler.handle(DefaultAsyncHandler.java:145)
    at com.sun.grizzly.arp.AsyncProtocolFilter.execute(AsyncProtocolFilter.java:210)
    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:722)

    • This topic was modified 2 years, 9 months ago by  sertan76.
    #25319

    Hmmm. This exception is thrown from the Omnifaces code. And the RewriteFilter isn’t anywhere is the stacktrace, which may be OK, because the RewriteFilter could be configured to run AFTER the Omnifaces filter and the Omnifaces stuff fails before the RewriteFilte does anything. I think this is more a Omnifaces problem. I don’t see any reason why Rewrite could cause this.

    #25320

    Could you try your application without Rewrite/PrettyFaces and see if the problem persists? Thanks.

    #25324

    sertan76
    Participant

    I wrote pretty filter before omnifaces gzipfilter problem is solved. Thanks for your effort.

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

You must be logged in to reply to this topic.

Comments are closed.