I created a seam application using seam-gen. I am getting below error while navigating to StatusList.xhtml page after saving and clicking Done button from Status.xhtml form.
Error is:
PWC2785: Cannot serialize session attribute org.jboss.seam.CONVERSATION#21$navigationBean for session 7800870138c191edf3d23718a68e
java.io.NotSerializableException: com.sitestuff.admin.NavigationBean
The following code is written for Done button in Status.xhtml
<s:button id="done" value="Done"action="#{statusHome.viewRecord}"/>
and viewRecord method is:
public String viewRecord() {
getInstance();
String rtValue = null;
if (instance.getTextKey() != null) {
rtValue = "/StatusList.xhtml?textKey=" + instance.getTextKey() +"?doSearch=1";
} else {
rtValue = "/StatusList.xhtml";
}
return rtValue;
}
I am trying to pass the specific textkey field as parameter in string as I have a filter condition on it and want to show only specific textkey records on StatusList.xhtml form.
Can anyone tell me what is going wrong and why error occurs ?
Thanks in advance.
Regards,
It looks like you have Richfaces (I’m assuming you are using it) configured to serialize session state and that “com.sitestuff.admin.NavigationBean” is not Serializable.
Check if that bean/class implements serializable. Something like
I’m also assuming that you have some rule on pages.xml which uses NavigationBean or that you have some interceptors that triggers something on NavigationBean.
I had this problem just recently when playing with the state Serialization, hope that it helps.