This discussion is archived
0 Replies Latest reply: Nov 29, 2012 12:05 AM by 976914 RSS

JSF2 f:ajax call causes ViewExpiredException in WebLogic 12c

976914 Newbie
Currently Being Moderated
I am trying to develop an enterprise application with a web-part using JSF2. Basic JSF2 functionality works OK, but when I try to use an ajax call, I get ViewExpiredException, even when this call is executed just a few seconds after the page was loaded.

The part that executes the ajax call is like this (simplified):

<h:form>
[a bunch of h:inputText left out here]
<h:commandButton class="my-button" value="Searc" actionListener="#{compSearchBean.executeSearch}"><f:ajax execute="@form" render=":search-hit-list-table" /></h:commandButton>
</h:form>

<h:dataTable id="search-hit-list-table" value="${compSearchBean.results}" var="result">
[the content of the table left out here]
</h:dataTable>

This works fine in GlassFish, the executeSearch method is called (I log calls to it), the table is updated with correct data from the compSearchBean.

In WebLogic, no call is received to the executeSearch method, and no data is sent back to the browser. Nothing found in WebLogics logs (loglevel on defaults).

Checking with Wireshark, I can se that WebLogic returns the following:

<?xml version='1.0' encoding='UTF-8'?>
<partial-response><error><error-name>class javax.faces.application.ViewExpiredException</error-name><error-message><![CDATA[viewId:/main.xhtml - View /main.xhtml could not be restored.]]></error-message></error></partial-response>

So I am wondering what causes the ViewExpiredException? The session settings in WebLogic are the default values for the development version. The session cookie in the browser has Expire=Session.

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points