You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Werner Punz <we...@gmail.com> on 2010/09/01 10:44:49 UTC

Re: ViewExpiredException: MyFaces & PrimeFaces

Hi this is really interesting, from what I noticed in my testing is that 
you can run into this situation if you ajax a call down without sending 
a proper view identifier without intercepting it before restoreView. 
RestoreView obviously must fail then.
I have to check what primefaces is sending down but my assumption goes 
into that direction.

What I also noticed is that Mojarra is somewhat more tolerant regarding 
those situations, because I had a testing case up and running which 
rightfully ran out of views in its state history on MyFaces and did not 
in mojarra, the main reason there was that mojarra was restoring the 
last view on and on in that situation no matter if the viewstate was 
sent down or not because none of the inputs sent down had changed and 
the source did not change as well. You ran into the issue in mojarra if 
you sent down constantly changing values on your inputs as well.

It might be a similar issue here, but to really tell that I have to 
check the protocol. But I am pretty sure this is the cause of the 
situation you run into here.


Werner



Am 31.08.10 21:46, schrieb Leonardo Uribe:
> Hi
>
> Could you check your server log?. A more detailed exception could be found
> there, to identify easily what's going on.
>
> regards,
>
> Leonardo Uribe
>
> 2010/8/31 Rafael Santini<ra...@santini.eti.br>
>
>> Hi Ali,
>>
>> I have posted this question on PrimeFaces Forum.
>>
>> With Mojarra 1.2_15-b01, works perfectly!
>> The problem is that I need to continue with MyFaces for a while.
>>
>> Thanks,
>>
>> Rafael Santini
>>
>> 2010/8/31 Ali Ok<al...@aliok.com.tr>
>>
>>> Hi Rafael,
>>> Primefaces forum[1] might be a better place to discuss this, but at first
>>> sight at your code, you should put the autoCompleteBean in view scope
>>> (available with JSF2).
>>>
>>> [1]http://primefaces.prime.com.tr/forum/
>>>
>>> Cheers,
>>> Ali
>>>
>>> On Tue, Aug 31, 2010 at 6:12 PM, SANTINI, Rafael<rafael@santini.eti.br
>>>> wrote:
>>>
>>>> Hi,
>>>>
>>>> I'm trying to get PrimeFaces AutoComplete component to work with
>> MyFaces.
>>> I
>>>> have tried with MyFaces 1.2.9&  PrimeFaces 1.1, MyFaces 2.0.1&
>>> PrimeFaces
>>>> 2.1 and MyFaces 2.0.1&  PrimeFaces 2.2.M1. In the all cases, the
>>> fowlloing
>>>> exception is raised:
>>>>
>>>> 31/08/2010 11:51:32 org.apache.myfaces.renderkit.ErrorPageWriter
>>>> handleThrowable
>>>> SEVERE: An exception occurred
>>>> javax.faces.application.ViewExpiredException: /autocomplete.xhtmlNo
>> saved
>>>> view state could be found for the view identifier: /autocomplete.xhtml
>>>>        at
>>>>
>>>
>> org.apache.myfaces.lifecycle.RestoreViewExecutor.execute(RestoreViewExecutor.java:128)
>>>>        at
>>>>
>>>
>> org.apache.myfaces.lifecycle.LifecycleImpl.executePhase(LifecycleImpl.java:171)
>>>>        at
>>>>
>>>
>> org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)
>>>>        at javax.faces.webapp.FacesServlet.service(FacesServlet.java:189)
>>>>        at
>>>>
>>>
>> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
>>>>        at
>>>>
>>>
>> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
>>>>        at
>>>>
>>>
>> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
>>>>        at
>>>>
>>>
>> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
>>>>        at
>>>>
>>>
>> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
>>>>        at
>>>>
>>>
>> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
>>>>        at
>>>>
>>>
>> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
>>>>        at
>>>>
>>>
>> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
>>>>        at
>>>>
>>>
>> org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:859)
>>>>        at
>>>>
>>>
>> org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:579)
>>>>        at
>>>>
>> org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1555)
>>>>        at java.lang.Thread.run(Thread.java:619)
>>>>
>>>> I have created a simple test case (.war):
>>>> http://www.4shared.com/get/Jm6REAgI/autocomplete.html
>>>>
>>>> Any suggestion?
>>>>
>>>> Thanks,
>>>>
>>>> Rafael Santini
>>>>
>>>>
>>>>
>>>
>>>
>>> --
>>> My Blog: http://blog.aliok.com.tr
>>> Twitter: http://twitter.com/aliok_tr
>>>
>>
>