Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [starter-dev] Return of the Dreaded View Expiration!
  • From: Reza Rahman <reza_rahman@xxxxxxxx>
  • Date: Fri, 14 Mar 2025 11:49:36 -0400
  • Delivered-to: starter-dev@xxxxxxxxxxx
  • List-archive: <https://dev.eclipse.org/mailman/private/starter-dev/>
  • List-help: <mailto:starter-dev-request@eclipse.org?subject=help>
  • List-subscribe: <https://dev.eclipse.org/mailman/listinfo/starter-dev>, <mailto:starter-dev-request@eclipse.org?subject=subscribe>
  • List-unsubscribe: <https://dev.eclipse.org/mailman/options/starter-dev>, <mailto:starter-dev-request@eclipse.org?subject=unsubscribe>
  • Ui-outboundreport: notjunk:1;M01:P0:Gc+ks6cQpEg=;62HhfQVyCTrb8XhAwN+8AWnZKo7 HYTit5EhdKkIpSA1hxIjSp6lRccqlpraG9oi9rHMRh9TjjTdyPyj5qEPt5z5e0LL+c545khSn +mKBUrB6oncyE0Z3Vj14yMPsBzduLRiif8WaDTVAqkbDYe/eYN7M9jzCTQSDH+dZIYI0/K8Ip YR8IaSrzc4AkdH86RhiJlUtTBlaDkXhH5CP91Rn4UExo5ye7ye0kXcLiKVpmuNPDbZhIrD++r 6nrnjI+CRWIln+GF0t6nejOs8fDozWRvICRw6uVdyZbaAK0+pFKAJvvtkMqmU3tiJVsOjYoV5 LYrr78ne6m49+jw9hmO3Qp+rDOOjSBioGn+FLuzZlKlHtQzVgQkXlSq2+rkP1NA3fqdY5zvY4 hfVv6hX/vcgV4w0H6dR7Pzn0Of0PF9AoFqmiZCcAISA2i3fTkHrqnP3Qgci647ebwITxcQEbQ TuH9pwj85uD4key+TAtMvI3kTE4OIGMgKohwS6lWt8aviFGLZwP0BSQbHt7wK4JAQU4+1fqrT XBMvTyO2nk/87JU7nuysA3sDNq3r5Oj5CZFy/ELkuQft1bwAWF1JcUHcT5v1yCTUXpk338Apq jcRSEaX5+3VcXcDg4ZuJP3qvazwXTx2dYomKhxIiLxcSIwWjPtANk7hPbedRxAJcnifPfvJLo 1D9xNTEAms01xhbALD7I6aurtWLvZtSYvAgdAIz3ZB1kfl41Jt174daYwAZ2bocB6Cc4DyEh5 zcDtprIfEyd3t578fBzkBEZJNqpFN72rzwGvcNvKgIuls3AqhGxwvSYWwQU5SmxMjChIurbHi HBKQ82BW6/gjmuVo3C0FbcphmpBbqcV0PdnvK14euKs5oxGMxcy0ZXD1dVDHLqf0Kk8Tl2z1C NuF7poXX5aleBx1DohyJ4mI+93VF3N/8QNoTSIQK1rwBd2X781o4OK0/+5aOChBdB3l7jZtMr 7lU3WcBjvU7jxaiq+5kELPqRlIC+1y8Gdhpt70QMEbYqXY1fVN0jSF7+25kOclCsC8f6ofdvb 7fyYbkHH9Fp0wh2oMFyQNZyDjXztgIFme3rS2UQ+2gFHqJesQ2m5G2+J7dnNK1Uc8cF6cnABj MoQ3ZR4QbW6SjBmoptdZ0HLhxOirZD6PfR/loy28zKm06aur/HdsPv6XHE4Y3ha8vfoEQdMyg ezl8pPgEzZuBHTSaN2SYOGtJljHYlF2e0azbRy54mBFK3ogTWuYRHnHMep8uGmW3tC6LhXl1b Qp8TNUrAgmfT1mv9CV9q15vBxhayxxRfhYcpFhdbZZAUDoEpDAZozqeJ4IyyN6HJL5kk0TVjY iwsvPITRx0OPM0qL2uQ2N6ZMVONnGgmiMPyIOH8Md7LdE/A1Nsft8A3qr74U+FTviphyKjosE esinEl1I0XG04Z1UogbwP8rSPCvEuZhLB3lGea6Vk19793t5DeOfrbnW5+vGbQNbStJc3KrOW 6mK5/QQ==
  • User-agent: Mozilla Thunderbird

Do you mind kindly making a PR with the approach you think is best overall? I'll test it out and monitor that it works. I appreciate it!

On 3/14/2025 11:45 AM, Bauke Scholtz wrote:
Yeah. The issue boils down to that the view scoped bean referenced in the p:selectOneRadio is created for the first time when the response is already committed. And view scoped beans need to be saved in the session. But when the response is already committed the cookie associated with the session cannot be set.

Another solution is to add a f:viewAction referencing some bean init method and use that instead of postconstruct. This is guaranteed invoked before render response.

Yet another solution is to create a servlet filter which does an explicit request.getSession() call.

You got it.

Cheers, B

On Fri, Mar 14, 2025 at 11:38 AM Reza Rahman <reza_rahman@xxxxxxxx> wrote:

To some extent, the symptoms at least appear simple. We are now getting copious amounts of views expired (example stack trace attached). I had seen this in prior releases with JBoss EAP 7.4 (and the corresponding WildFly version). What I did is to set STATE_SAVING_METHOD=client. It worked well and saw no more views expiring in the logs.

Then we upgraded to JBoss EAP 8 and the corresponding WildFly versions. Now with STATE_SAVING_METHOD=client, I get this strange session state saving issue (example stack trace also attached). So we are stuck with views expiring again.

Let me know if I can share anything else. Let me see if there is anything I can do to ensure sticky sessions. Because this is deployed to an Azure PaaS, I have a very limited amount of control.

On 3/14/2025 10:58 AM, Bauke Scholtz wrote:
Hi,
 
I had to remove STATE_SAVING_METHOD=client because I could not get it to work

Would be helpful if you elaborate this in detail. It might be a clue. One of pre-requirements for that in a cluster environment is that the jsf/ClientSideSecretKey env param is set (usually in web.xml). This has been renamed to faces/ClientSideSecretKey. So if the cluster doesn't use sticky sessions then ViewExpiredException will occur.

Cheers, B



On Fri, Mar 14, 2025 at 10:48 AM Kito D. Mann <kito.mann@xxxxxxxxxxx> wrote:
Hey Reza,
 
Can you provide some more details (perhaps point me to logs or explain any scenarios)? 
 
We're still partners with PrimeTek and I still work with Bauke Scholtz (cc'd), so we can figure it out. 

___

Kito D. Mann | @kito99@mastodon.social LinkedIn
Java Champion | Google Developer Expert Alumni 
Expert consulting and training: Cloud architecture and modernization, Java/Jakarta EE, Web Components, Angular, Mobile Web
Virtua, Inc. | virtua.tech
+1 203-998-0403

* Enterprise development, front and back. Listen to Stackd Podcast.
* Speak at conferences? Check out SpeakerTrax.
On Mar 14, 2025 at 10:11 AM -0400, Reza Rahman <reza_rahman@xxxxxxxx>, wrote:
Hi Kito/others,

I have been monitoring the release for stability and unfortunately we
have a problem that needs to be solved. I had to remove
STATE_SAVING_METHOD=client because I could not get it to work with the
latest PrimeFaces/Jakarta EE 10/JBoss EAP 8. Now we have the infamous
JSF problem of views expiring left and right again of course. I will
keep trying this weekend, but can you possibly help me look at this and
solve it? You still have some contacts with the PrimeFaces folks, right?
Could they help? This appears to be mainly a PrimeFaces problem.

Thanks,

Reza


Back to the top