I created a simple crud jsf project.My page contains dataTable and it is filled up form database.Sometimes, My program does not running especially after 3 or 4 requests.For example , I caught up a scenariao like this: Whenever I trigger my selectOneMenu multiple times(Example: 13-14 times) I saw DevTools console screen gives error
<p:selectOneMenu id=studentNo"
value="#{myBean.studentNo}" style="width:150px">
<p:ajax listener="#{myBean.onStudentChange}"
update=":formTabInvoiceList:tabViewInvoiceList:StudensList:table-wrapper"/>
<f:selectItem itemLabel="Choose student number" itemValue="#{null}" noSelectionOption="true" />
<f:selectItems value="#{myBean.studentNumbersList}" />
</p:selectOneMenu>
Error is :
<partial-response>
<error>
<error-name>
javax.faces.application.ViewExpiredException
</error-name>
<error-message>
/xhtml/pages/Invoice.xhtmlNo saved view state could be found for the view identifier:
/xhtml/pages/Invoice.xhtml
</error-message>
</error>
</partial-response>
I found this error on network tab of DevTools.I caught this error another repeated scenarios on my program.
I googled it and I found some solutions but I did not solve it. My web.xml file contains
<context-param>
<param-name>org.apache.myfaces.SERIALIZE_STATE_IN_SESSION</param-name>
<param-value>false</param-value>
.
Also I check all components on my xhtml file to find components that have same id.All components have different id.
My primeFace version is : 3.4.1
myFaces : 2.1.10
Do you have any idea?
my web.xml file is :
<context-param>
<param-name>org.apache.myfaces.SERIALIZE_STATE_IN_SESSION</param-name>
<param-value>false</param-value>
</context-param>
<context-param>
<param-name>org.apache.myfaces.EXPRESSION_FACTORY</param-name>
<param-value>com.sun.el.ExpressionFactoryImpl</param-value>
</context-param>
<context-param>
<param-name>javax.faces.PROJECT_STAGE</param-name>
<param-value>Production</param-value>
</context-param>
<context-param>
<param-name>javax.faces.FACELETS_SKIP_COMMENTS</param-name>
<param-value>true</param-value>
</context-param>
<context-param>
<param-name>javax.faces.PARTIAL_STATE_SAVING</param-name>
<param-value>false</param-value>
</context-param>
<context-param>
<param-name>javax.faces.FACELETS_REFRESH_PERIOD</param-name>
<param-value>1</param-value>
</context-param>
<context-param>
<param-name>javax.faces.DATETIMECONVERTER_DEFAULT_TIMEZONE_IS_SYSTEM_TIMEZONE</param-name>
<param-value>true</param-value>
</context-param>