Wednesday, May 8, 2013

java.lang.ClassCastException: [Ljava.lang.Object; cannot be cast to com.sun.faces.application.view.StateHolderSaver

I have faced this problem while navigating back and forth in my project
using netbeans 7.1 , glassfish 3+ , primefaces 2.1 and openfaces 3.0;

After some minutes of headache I finally solve by adding <redirect/> under the navigation case in web.xml file:
e.g:

<navigation-rule>
        <from-view-id>/student/SearchEdit.xhtml</from-view-id>
        <navigation-case>
            <from-outcome>back</from-outcome>
            <to-view-id>/student/Search.xhtml</to-view-id>
            <redirect/>
        </navigation-case>
    </navigation-rule>

hope you rock!!!

No comments:

Post a Comment