Migration from mojarra 2.0.2 to 2.0.4 generate exception !!!

Splash Forums PrettyFaces Users Migration from mojarra 2.0.2 to 2.0.4 generate exception !!!

This topic contains 6 replies, has 3 voices, and was last updated by  mohamida 10 years, 11 months ago.

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
  • #17864


    Hi everybody.

    i’m developping a JEE application ( jsf mojarra 2.0.2 + prettyfaces 3.0.1 + richfaces 3.3.3 + facelets ). This is what i did:

    – i migrated my app from mojarra 2.0.2 to mojarra 2.0.4, but that generated some exception

    – i migrated my app from prettyfaces 3.0.1 to 3.2.0 (i thought maybe this will solve my problem) but nothing was fixed.

    – i migrated only prettyfaces to 3.2.0, and left mojarra (2.0.2) as it is, there was No exception

    Is there a problem coming from me ?

    this is the exception:

    <br />
    javax.servlet.ServletException: Tentative non autorisée de définition de ViewHandler après la restitution dune réponse.<br />
    javax.faces.webapp.FacesServlet.service(FacesServlet.java:325)<br />
    org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:206)<br />
    org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:290)<br />
    org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:388)<br />
    org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:515)<br />
    <p>cause mère</p>
    <p>java.lang.IllegalStateException: Tentative non autorisée de définition de ViewHandler après la restitution dune réponse.<br />
    com.sun.faces.application.ApplicationImpl.setViewHandler(ApplicationImpl.java:563)<br />
    org.ajax4jsf.event.InitPhaseListener.beforePhase(InitPhaseListener.java:92)<br />
    com.sun.faces.lifecycle.Phase.handleBeforePhase(Phase.java:228)<br />
    com.sun.faces.lifecycle.Phase.doPhase(Phase.java:99)<br />
    com.sun.faces.lifecycle.RestoreViewPhase.doPhase(RestoreViewPhase.java:111)<br />
    com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)<br />
    javax.faces.webapp.FacesServlet.service(FacesServlet.java:312)<br />
    org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:206)<br />
    org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:290)<br />
    org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:388)<br />
    org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:515)<br />
    com.ocpsoft.pretty.PrettyFilter.doFilter(PrettyFilter.java:115)<br />



    you can find my web.xml in here :




    sorry, i removed prettyfaces from my app, but apparently, the exception is not coming from prettyfaces.

    sorry, i will figure it out.

    (you can remove the post is you like)



    do you have a own facelets.jar in web-inf/lib ? if so, remove it, as its already provided my mojarra 2.x



    when i was using mojarra 2.0.2, there was 3 jars (jsf-api, jsf-impl and jsf-facelets)

    so i removed those 3 jars, and replaced them with only jsf-api and jsf-impl ( because, in mojarra 2.0.4 there’s only those 2 jars), but there was an exception when i started the server (Tomcat 6.0.26): http://privatepaste.com/198c41fcad

    so, i added jsf-facelets from mojarra 2.0.2 to the app, there was no exception when i started the server, but when i try to access to the application, there was this exception : http://privatepaste.com/0cc4fcc482

    and don’t have any idea about this exception, and don’t know how to fix this. maybe i will let mojarra 2.0.2


    Using RichFaces 3.3.3 together with JSF 2.0 is problematic because RichFaces 3.3.3 requires to manually add the “old” Facelets JAR and disabling the Facelets support provided by JSF 2.0.

    See this wiki page for details:


    There is also a “known problem” with PrettyFaces for JSF 2.0 if used together with the old Facelets implementation (like RichFaces 3.3.3 requires it) as the old Facelets implementation does not parse .taglib.xml files correctly (due to namespace issues).

    See this forum post for details:


    I personally don’t think that it is a good idea to use RichFaces 3.3.3 together with JSF 2.0 as it is causing a lot of trouble.

    If you have a working configuration with Mojarra 2.0.2 then better keep it! :-)



    Thank you very much, and sorry for the annoyance

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

The forum ‘PrettyFaces Users’ is closed to new topics and replies.

Comments are closed.