Error Rendering View: java.lang.IllegalStateException: Cannot create a session after the response has been committed

+2 votes
asked Nov 27, 2013 by bardelman

I'm developping an entreprise application on jboss AS 7.1. I was reading answers to those question (Q1 and Q2) asking for the same problem then mine and the solution was to upgrade to the Mojarra 2.1.9. I'm using maven but i'm not referencing any Mojarra jar dependency as it's provided by jboss server and i don't know which version it uses itself and since those questions have been asked a long time ago then i don't know if the solution is just to add dependencies to my pom to override the version used by jboss(normally, jboss AS 7.1 has overcome this problem already, i don't understand why it still happen to me).. Which version should i add or what is the best solution at this moment ?


1 Answer

+3 votes
answered Nov 27, 2013 by balusc

JBoss AS 7.1.0 ships with Mojarra 2.1.5, so you definitely need to upgrade. Specifically JBoss 7.1.0 has however unfortunately a bug which makes it impossible to upgrade Mojarra from webapp's /WEB-INF/lib on. This was fixed in 7.1.1. For 7.1.0 you need to upgrade Mojarra in JBoss' own modules.

Detailed upgrade instructions for JBoss AS 7.x and EAP 6.x can be found in this answer: Upgrade JSF / Mojarra in JBoss AS / EAP / WildFly.

Update: as per the comments it turns out that you didn't carefully specify the version in the question and you're actually using 7.1.1 which ships with Mojarra 2.1.7 which you also definitely need to upgrade. Just drop the javax.faces.jar file of the desired Mojarra version (currently, 2.1.26 is latest available 2.1.x) in webapp's /WEB-INF/lib and add the following context parameter to webapp's web.xml:

Welcome to Q&A, where you can ask questions and receive answers from other members of the community.
Website Online Counter