Wizard not Handling AJAX Exceptions Correctly

UI Components for JSF
Post Reply
fedevela
Posts: 5
Joined: 04 Mar 2010, 18:29

03 Nov 2010, 19:22

Hi Cagatay and PF rockstars,

I believe I have found a BUG when using the JSF2 exception-handler-factory described in other parts of the forum and by edburns. I am not sure whether this is mojarra or PF related.

Code: Select all

    <factory>
        <exception-handler-factory>com.psttlkr.context.PsttExceptionHandlerFactory</exception-handler-factory>
    </factory>
The exception fires, but it is not handled correctly into the custom exception handler. It ends up just logging a message under the regular JSF handling facility, whereas it should bubble up to my own defined ExceptionHandlerFactory.

I have built a war showing the normal behavior with JSF ajax, and the PF wizard. Just click on "next" and the exception will fire.

Download WAR with .class and .java files:
http://www.4shared.com/file/PV5DmoiD/PF ... dling.html

It is very weird because as Cagatay mentioned on #JSF it is just a regular jsf invoke, this is the stacktrace of the exception that is not sent to the custom exception handler:

Code: Select all

java.lang.Exception: ajax exception
        at com.psttlkr.context.Bean.handleFlow(Bean.java:52)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        ...
        at com.sun.el.parser.AstValue.invoke(AstValue.java:234)
        at com.sun.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:297)
        at com.sun.faces.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:98)
        at org.primefaces.component.wizard.WizardRenderer.encodeEnd(WizardRenderer.java:52)
        at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:878)
        at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1620)
        at com.sun.faces.context.PartialViewContextImpl$PhaseAwareVisitCallback.visit(PartialViewContextImpl.java:484)
        at com.sun.faces.component.visit.PartialVisitContext.invokeVisitCallback(PartialVisitContext.java:175)
        at javax.faces.component.UIComponent.visitTree(UIComponent.java:1446)
        ...
        at java.lang.Thread.run(Thread.java:619)
Thank you for reading! I will post an issue if necessary!

PF: 2.2.RC1-SNAPSHOT
Mojarra: 2.0.3
Oracle GlassFish Server v3 (74.2)

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 38 guests