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 6 years, 8 months ago.

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

    mohamida
    Participant

    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 />
    com.ocpsoft.pretty.PrettyFilter.doFilter(PrettyFilter.java:115)</p>
    <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 />

    #20650

    mohamida
    Participant

    you can find my web.xml in here :

    http://privatepaste.com/09dedeb5d6

    #20651

    mohamida
    Participant

    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)

    #20652

    domdorn
    Participant

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

    #20653

    mohamida
    Participant

    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

    #20654

    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:

    http://community.jboss.org/wiki/RichFaces333andJSF20

    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:

    http://ocpsoft.com/support/topic/strange-exception

    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! :-)

    #20655

    mohamida
    Participant

    Thank you very much, and sorry for the annoyance

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

You must be logged in to reply to this topic.

Comments are closed.