Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

JSF 2 Payara cluster Cannot serialize session attribute com.sun.faces.application.view.activeViewMaps

Tags:

jsf

payara

I have an app build with JSF2 + Spring (IoC,Transactions..). The app is running fine on a standalone server. These days I have created a Hazelcast session replicated Payara Server 4.1.2.172 #badassfish (build 235) cluster.
The session replication is working fine as tested with a cluster test app. Also in my app, the session is replicated as when I move from one node to another the system did not log me out. The problem is that I have some dialogs that are backed by @ViewScope MBs and I keep receiving messages like :

 Cannot serialize session attribute com.sun.faces.application.view.activeViewMaps for session xxxx

When I receive such a message if I move on the other node the page does not work anymore unless I go to another page and came back to current one.

Any idea how can a avoid this ?

like image 307
Videanu Adrian Avatar asked Aug 31 '26 08:08

Videanu Adrian


1 Answers

Solved,
The problem was that in my ManagedBeans I had some "services" injected which were not serializable.
To fix that I have marked that members as transient and everything worked as expected.

like image 118
Videanu Adrian Avatar answered Sep 02 '26 12:09

Videanu Adrian



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!