Hazelcast 2.2.0 has issue with openfire 4.0.2

Hi i have 2 node and am trying to do clustering using Hazel cast using following version but its not working.

Openfire : 4.0.2

HazelCast : 2.2.0

Java : 1.8

what is did :

1.add hazelcast plugin on both node from available plugins.

  1. Change plugins/hazelcast/classes/hazelcast-cache-config.xml add 2 node

ip:5701

ip:5701

  1. go to clustring in admin console and click on Enable on one node.

then It show processing for ever.

if i stop that and reboot both node then on first node it show clustering enabled and show one node and on second show clustering is disabled.

after clustering if i click on Users/Group tab on Admin console it throw following error :

java.lang.ClassCastException: org.jivesoftware.util.cache.DefaultCache cannot be cast to org.jivesoftware.openfire.plugin.util.cache.ClusteredCache

at org.jivesoftware.openfire.plugin.util.cache.ClusteredCacheFactory.getLock(Clust eredCacheFactory.java:444)

at org.jivesoftware.util.cache.CacheFactory.getLock(CacheFactory.java:415)

at org.jivesoftware.openfire.spi.RoutingTableImpl.getRoutes(RoutingTableImpl.java: 823)

at org.jivesoftware.openfire.SessionManager.getActiveSessionCount(SessionManager.j ava:994)

at org.jivesoftware.openfire.spi.PresenceManagerImpl.isAvailable(PresenceManagerIm pl.java:99)

at org.jivesoftware.openfire.admin.user_002dsummary_jsp._jspService(user_002dsumma ry_jsp.java:278)

at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)

at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:812)

at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.ja va:1669)

at com.opensymphony.module.sitemesh.filter.PageFilter.parsePage(PageFilter.java:11 8)

at com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.java:52)

at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.ja va:1652)

at org.jivesoftware.util.LocaleFilter.doFilter(LocaleFilter.java:76)

at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.ja va:1652)

at org.jivesoftware.util.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingF ilter.java:53)

at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.ja va:1652)

at org.jivesoftware.admin.PluginFilter.doFilter(PluginFilter.java:80)

at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.ja va:1652)

at org.jivesoftware.admin.AuthCheckFilter.doFilter(AuthCheckFilter.java:162)

at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.ja va:1652)

at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585)

at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)

at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:577)

at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:22 3)

at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:11 27)

at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515)

at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185 )

at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:106 1)

at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)

at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandler Collection.java:215)

at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.jav a:110)

at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)

at org.eclipse.jetty.server.Server.handle(Server.java:499)

at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:311)

at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257)

at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:544)

at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635 )

at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555)

at java.lang.Thread.run(Thread.java:745)

In my experience, although you can enable clustering dynamically, it’s necessary to restart with Openfire 4.x after clustering has been enabled in order to get things working properly.

Have you found a solution to this issue yet? We are experiencing the exact same behavior.

I faces same issues. please provide useful solution.

Two thoughts;

a) Can you provide the complete log file (post it to pastebin or similar) - I suspect that there’s another error earlier on that’s causing the problem.

b) You may be able to avoid the problem (if it’s what I think it is) by not attempting to login to the server until after Clustering has started. Of course, there’s no easy way to determine that, other than by waiting a good few minutes after starting!

I was facing the same problem and found the solution to it.

When you want to put a server in a cluster, just put hazelcast.jar in the plugins folder and restart the server.

In few seconds, the server will auto enable the server as a junior/senior member in the cluster. Discovery of the nodes will take place automatically.

Clicking on the enable button causes this error.