I am trying to upgrade a local OF to version 4.0.1 (and hazelcast 2.2) but during startup I sometime get this NPE:
2016.01.28 09:46:41 INFO [ClusterManager events dispatcher]: com.hazelcast.partition.InternalPartitionService - [169.254.80.80]:5701 [openfire] [3.5.1] Initializing cluster partition table first arrangement... 2016.01.28 09:46:41 WARN [ClusterManager events dispatcher]: org.jivesoftware.openfire.cluster.ClusterManager - Null value is not allowed! java.lang.NullPointerException: Null value is not allowed! at com.hazelcast.util.Preconditions.checkNotNull(Preconditions.java:41) at com.hazelcast.map.impl.proxy.MapProxySupport.putAllInternal(MapProxySupport.java:862) at com.hazelcast.map.impl.proxy.MapProxyImpl.putAll(MapProxyImpl.java:309) at org.jivesoftware.openfire.plugin.util.cache.ClusteredCache.putAll(ClusteredCache.java:129) at org.jivesoftware.util.cache.CacheFactory.joinedCluster(CacheFactory.java:738) at org.jivesoftware.openfire.cluster.ClusterManager$2.run(ClusterManager.java:95)
After some trial-and-error I discovered that this happens only when restarting my OF with active clients on it, the clients reconnects before OF hits this exception and I managed to catch this my debugger:
And there are some values from a cache named ‘Locked Out Accounts’ that has cached some NULL values and is causing the NPE later on.
If all clients are started after OF has initialized the clustering, this exception is not happening.