How response can be committed before action method finishes

UI Components for JSF
Post Reply
User avatar
MISS_DUKE
Posts: 273
Joined: 08 Aug 2010, 05:52

18 Nov 2011, 10:10

The following error message is shown when an action method of a <h:commandLink/> JSF tag is called:

PWC3999: Cannot create a session after the response has been committed

The meaning of the error message is very straightforward, but my question is how the response could have been committed before the action method finishes execution.

(This error is only occurring time to time, not every time the commandLink is clicked.)
JSF implementation: Mojarra V2.1.7
JSF component library: Primefaces V3.1.1
Server: GlassFish Open Source Edition V3.1.1 (build 12)

smithh032772
Posts: 6144
Joined: 10 Sep 2011, 21:10

18 Nov 2011, 20:06

Howard

PrimeFaces 6.0, Extensions 6.0.0, Push (Atmosphere 2.4.0)
TomEE+ 1.7.4 (Tomcat 7.0.68), MyFaces Core 2.2.9, JDK8
JUEL 2.2.7 | OmniFaces | EclipseLink-JPA/Derby | Chrome

Java EE 6 Tutorial|NetBeans|Google|Stackoverflow|PrimeFaces|Apache

User avatar
jim@jimtough.com
Posts: 142
Joined: 03 Jun 2011, 18:06
Location: Canada

19 Nov 2011, 07:37

The workaround in this post solved the issue for me:
viewtopic.php?f=3&t=13151#p43963

It involves using a 'pre-render view' event and forcing the session to be created early in the rendering phase.
PF 3.0,
Mojarra 2.1.4,
Tomcat 7.0.14,
Eclipse Indigo,
IE 7, Chrome

Image
http://stackoverflow.com/users/346112/jim-tough

Would rather be a Decepticon...

smithh032772
Posts: 6144
Joined: 10 Sep 2011, 21:10

19 Nov 2011, 15:37

Jim,

I wonder if the preRenderViewEvent and applicationScopeBean would solve the p:schedule issue that myself and this other person has been experiencing. Please see posts below. I've provided my code in the last link below.

viewtopic.php?f=3&t=16339

viewtopic.php?f=3&t=15689

http://stackoverflow.com/questions/7862 ... infinitely


Thanks,
Howard
Howard

PrimeFaces 6.0, Extensions 6.0.0, Push (Atmosphere 2.4.0)
TomEE+ 1.7.4 (Tomcat 7.0.68), MyFaces Core 2.2.9, JDK8
JUEL 2.2.7 | OmniFaces | EclipseLink-JPA/Derby | Chrome

Java EE 6 Tutorial|NetBeans|Google|Stackoverflow|PrimeFaces|Apache

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 28 guests