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: Mon, 24 Mar 2025 00:03:08 -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:xSxlAjalTzk=;HKN/GdO/xB+2BGdPURC3a+r5Tfe jYibCbtGKXHJVQAupoGzWIZX8CUAT85DBI4/xBkk1kUuVVY3eURrCSZgGwjlPB1pBZXdAiXgp U4d6ICKs6BEhPImGh8cNuNe9+yRgUK18DaUAy2DsFYhT/qOg73Bag3LjAy0e88sm0dp9ZghOy KHJDXatCKH6MU/SmpI9zVuty9GU2cVqIFbCdKn6B/buiRWNxQ5bMJ3V3i3oTTvWXmxhfgDLBj PrvKE7VLP8w2/eT951CNKWy8/kpwDJT/OrXniw7LdxdecckU0cd5exbg9yfVRGd5Cny5/aiz9 T2wUd9bm7aAOy1kF4CFAkNOhzf7aZVQqj3RWcKx9gaKm0F/McJrZBcD9X8WsFDLGGMUfOGNHq ilgXVualER5TEMjDFSuMfctsmrfWDX2DxDiWEvw6ZUOKqmEx8xU2GM91k+J4G4YA8Ysd9kWcu CiEmqdw83MPtCccGoS7BkUYnjGvGgLB0wB/yV0TVVEEhKaRGw1A1q2GIem32YHx4xgYIHqrER Uw45mI38enmJEXMlybrIZ+JBeF7rqt836EXWVPiOlVJRm6gmt3Sf3rJYUTpJzvOTgyULGGQqA cl4RWIYKo59F6WbAhkpdmzfPWAvkhf4SavwcX5SALM9mhfF2qFbKBMBNJG/jilAcHQDKb6bVh zVcwrdufJkk+S63Rp96dfEKz1d9Noy1PuPVlg6200C20H54OuuOOXBnx0ZU8Gy1CQk3XT/yB8 qw0QgcltbX441NgPTO4TDMQGGhPjamhnjl3lRqU79GAGpIjFT5tOtCOWEKBHvSFcJ1oEskS/H xOnJDeVr6ADxCfaYJl3SnuI0reVlW3wXMW3UGmsuqs8WBqtV2FUy6Ba6PfnXQdpaYvLb0TRNo L7iwy6VZyEvxvOslRMWF90rphPuCqhEcQzC87J+4S3lJPyW7p5V2Kq6a5TOF6QHBSA6erSTEX il0dolHillQD8tJfICeupwvoHm4C4JINEz57qHHuOyRHe/qFn+tr60xZzgr1o+7Sr19xNtwGi bCz/wjc2zA8LagmsYnb/20H38dammk4cAKrrP1sS2Hk+MQEn/RxTsWFxtHwHOVBfsmSu2SDM6 qs2uY3Qfk9Gp5pH+1xeHGud8CGywol61mKG5Qb45VEqNOQmUH1Wl33jJX7GktsJEFlXiuRlUg Ic8aaU52RJ3BkeELB0RtcJeaDJiW8uoyKyBlTa56VXu8RQtdimyKNF4QSFwLpRcU76BELxEAA MGgG+mpWdQ3v4QJeoLUjVlxg5ukIqI4fLKGzXUUHKkK37sfCR4i15mPz1rTl50fblIJ2khWXY jXmHMwTj/mYhvyqSoOfgzb6vGTiSaCLgyRuLSDATIczcfihdBK1WssVPIkFMmoTG2peQDL1Nx 157BNNjnTSfmGOnB73Qo3qQJEUJE3cBTsbufbRCxfX+ezc8wq2BolqW6N7i0JwGoXK0sz6LHb oubdHKW9qyZmjhgs3DyMllkCyGiPIpGvZiZjRprE/TRsg4AJh6aLEPNEoDQc5jzG2Vyy51A==
  • User-agent: Mozilla Thunderbird

I wanted to thank you again for your kind help. I am going to keep an eye on things the rest of the week, but it appears the view expirations are entirely gone now.

On 3/14/2025 11:59 AM, Bauke Scholtz wrote:
try to ensure sticky sessions for good measure

Good. Check https://stackoverflow.com/a/35626681 for guidelines.

Cheers, B

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

OK, great. Let me test it and get it deployed. I'll monitor for any more issues and also try to ensure sticky sessions for good measure. Thanks!

On 3/14/2025 11:53 AM, Bauke Scholtz wrote:

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

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