-
FEATURED COMPONENTS
First time here? Check out the FAQ!
while iterating Hashmap in zul as below getting serialization error
<forEach items="@load(vm.lastUpdated.entrySet())" >
<label [email protected](each.key)/>
</forEach>
How are you using Hazelcast in this project? Sharing data between instances, clustering, fallback, etc.
According to JavaDoc, the Set retrieved from map.entrySet(): "The set is backed by the map, so changes to the map are reflected in the set, and vice-versa. If the map is modified while an iteration over the set is in progress the results of the iteration are undefined."
Is it be possible that the map content is modified by hazelcast while iteration is happening? You could try using a ConcurrentHashMap or an IMap instead, to see if this is a concurrent access issue.
Usual ZK clustering questions below:
0)Using two zk web applications for High availability if one application failed the other application should take over without loosing session information.
1)Disabled websocket
2) Configured zk.xml with the following for clustering
<system-config>
<ui-factory-class>org.zkoss.zk.ui.http.SerializableUiFactory</ui-factory-class>
</system-config>
<listener>
<listenerclass>org.zkoss.zkplus.cluster.ClusterSessionPatch</listener-class>
</listener>
3)No Global Desktop cache is enabled
4)Using Nginx as loadbalancer with the following settings
upstream backend.com{
server 192.168.100.131:8086;
server 192.168.100.131:8087;
}
server{
listen 80;
server_name backend.com;
location / {
proxy_pass http://backend.com;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Port $server_port;
proxy_set_header Host $host;
proxy_read_timeout 5000;
}
}
5) In zul Hashmap is iterated with entrySet() for displaying data only, no concurrent modifications are done during iteration
6)As suggested tried with ConcurrentHashMap also getting the same error
I'm not familiar with Nginx enough, but you'll probably want to check if sticky sessions are enabled. (for ZK clustering, you generally want the load balancer to pass all requests from a give user to the same node, as long as that node is available, and only change the target node in a fallback situation).
So far not seeing anything obvious. Could you post the entire error stack trace? It's not clear to me what is exactly failing here.
Asked: 2022-04-07 00:11:25 +0800
Seen: 10 times
Last updated: Apr 07 '22
bug with intboxes on mobile devices
zk keikai-how to add custom button/label to formulabar?
zk-keikai- update multiple cells parallel at same time asynchronously
zk-keikai-How to auto fit column width based on text
zk-keikai-ClipboardPateEvent-called twice
Reference a spring bean from VariableResolver