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

JIRA | Guus der Kinderen | 9 months ago
tip
Do you know that we can give you better hits? Get more relevant results from Samebug’s stack trace search.
  1. 0

    As reported in https://community.igniterealtime.org/thread/59266, the following steps leads to NullPointer- and ClassCasting exceptions. # Send a message from client A (connected to node A) to client B (connected to node B) # Client B receives the message # Send a SIGTERM to the OpenFire process running on node A # Restart OpenFire on node A # Reconnect client A # Send a message from client A (connected to node A) to client B (connected to node B) # Client B receives the message # Send a SIGTERM to the OpenFire process running on node B # Restart OpenFire on node B # Reconnect client B # Send a message from client A (connected to node A) to client B (connected to node B) Logs from Node B: {code}Logs from node B: 2016.08.23 07:24:12 INFO [TaskEngine-pool-2]: com.hazelcast.core.LifecycleService - [10.12.3.44]:5701 [openfire] [3.5.1] Address[10.12.3.44]:5701 is STARTED 2016.08.23 07:24:12 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) 2016.08.23 07:24:35 ERROR [socket_c2s-thread-3]: org.jivesoftware.openfire.spi.RoutingTableImpl - Primary packet routing failed 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(ClusteredCacheFactory.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.spi.RoutingTableImpl.routeToBareJID(RoutingTableImpl.java:539) at org.jivesoftware.openfire.spi.RoutingTableImpl.routeToLocalDomain(RoutingTableImpl.java:308) at org.jivesoftware.openfire.spi.RoutingTableImpl.routePacket(RoutingTableImpl.java:244) at org.jivesoftware.openfire.MessageRouter.route(MessageRouter.java:139) at org.jivesoftware.openfire.spi.PacketRouterImpl.route(PacketRouterImpl.java:83) at org.jivesoftware.openfire.net.StanzaHandler.processMessage(StanzaHandler.java:378) at org.jivesoftware.openfire.net.ClientStanzaHandler.processMessage(ClientStanzaHandler.java:113) at org.jivesoftware.openfire.net.StanzaHandler.process(StanzaHandler.java:232) at org.jivesoftware.openfire.net.StanzaHandler.process(StanzaHandler.java:199) at org.jivesoftware.openfire.nio.ConnectionHandler.messageReceived(ConnectionHandler.java:181) at org.apache.mina.core.filterchain.DefaultIoFilterChain$TailFilter.messageReceived(DefaultIoFilterChain.java:690) at org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:417) at org.apache.mina.core.filterchain.DefaultIoFilterChain.access$1200(DefaultIoFilterChain.java:47) at org.apache.mina.core.filterchain.DefaultIoFilterChain$EntryImpl$1.messageReceived(DefaultIoFilterChain.java:765) at org.apache.mina.core.filterchain.IoFilterAdapter.messageReceived(IoFilterAdapter.java:109) at org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:417) at org.apache.mina.core.filterchain.DefaultIoFilterChain.access$1200(DefaultIoFilterChain.java:47) at org.apache.mina.core.filterchain.DefaultIoFilterChain$EntryImpl$1.messageReceived(DefaultIoFilterChain.java:765) at org.apache.mina.filter.codec.ProtocolCodecFilter$ProtocolDecoderOutputImpl.flush(ProtocolCodecFilter.java:407) at org.apache.mina.filter.codec.ProtocolCodecFilter.messageReceived(ProtocolCodecFilter.java:236) at org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:417) at org.apache.mina.core.filterchain.DefaultIoFilterChain.access$1200(DefaultIoFilterChain.java:47) at org.apache.mina.core.filterchain.DefaultIoFilterChain$EntryImpl$1.messageReceived(DefaultIoFilterChain.java:765) at org.apache.mina.core.filterchain.IoFilterEvent.fire(IoFilterEvent.java:74) at org.apache.mina.core.session.IoEvent.run(IoEvent.java:63) at org.apache.mina.filter.executor.OrderedThreadPoolExecutor$Worker.runTask(OrderedThreadPoolExecutor.java:769) at org.apache.mina.filter.executor.OrderedThreadPoolExecutor$Worker.runTasks(OrderedThreadPoolExecutor.java:761) at org.apache.mina.filter.executor.OrderedThreadPoolExecutor$Worker.run(OrderedThreadPoolExecutor.java:703) at java.lang.Thread.run(Thread.java:745) 2016.08.23 07:24:35 ERROR [socket_c2s-thread-3]: org.jivesoftware.openfire.nio.ConnectionHandler - Closing connection due to error while processing message: <message id="b10f9e39-4e5f-413f-9b13-2e5463a5b09d" to="user20@xmpp" type="chat"><body>bar</body></message>{code}

    JIRA | 9 months ago | Guus der Kinderen
    java.lang.ClassCastException: org.jivesoftware.util.cache.DefaultCache cannot be cast to org.jivesoftware.openfire.plugin.util.cache.ClusteredCache
  2. 0

    As reported in https://community.igniterealtime.org/thread/59266, the following steps leads to NullPointer- and ClassCasting exceptions. # Send a message from client A (connected to node A) to client B (connected to node B) # Client B receives the message # Send a SIGTERM to the OpenFire process running on node A # Restart OpenFire on node A # Reconnect client A # Send a message from client A (connected to node A) to client B (connected to node B) # Client B receives the message # Send a SIGTERM to the OpenFire process running on node B # Restart OpenFire on node B # Reconnect client B # Send a message from client A (connected to node A) to client B (connected to node B) Logs from Node B: {code}Logs from node B: 2016.08.23 07:24:12 INFO [TaskEngine-pool-2]: com.hazelcast.core.LifecycleService - [10.12.3.44]:5701 [openfire] [3.5.1] Address[10.12.3.44]:5701 is STARTED 2016.08.23 07:24:12 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) 2016.08.23 07:24:35 ERROR [socket_c2s-thread-3]: org.jivesoftware.openfire.spi.RoutingTableImpl - Primary packet routing failed 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(ClusteredCacheFactory.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.spi.RoutingTableImpl.routeToBareJID(RoutingTableImpl.java:539) at org.jivesoftware.openfire.spi.RoutingTableImpl.routeToLocalDomain(RoutingTableImpl.java:308) at org.jivesoftware.openfire.spi.RoutingTableImpl.routePacket(RoutingTableImpl.java:244) at org.jivesoftware.openfire.MessageRouter.route(MessageRouter.java:139) at org.jivesoftware.openfire.spi.PacketRouterImpl.route(PacketRouterImpl.java:83) at org.jivesoftware.openfire.net.StanzaHandler.processMessage(StanzaHandler.java:378) at org.jivesoftware.openfire.net.ClientStanzaHandler.processMessage(ClientStanzaHandler.java:113) at org.jivesoftware.openfire.net.StanzaHandler.process(StanzaHandler.java:232) at org.jivesoftware.openfire.net.StanzaHandler.process(StanzaHandler.java:199) at org.jivesoftware.openfire.nio.ConnectionHandler.messageReceived(ConnectionHandler.java:181) at org.apache.mina.core.filterchain.DefaultIoFilterChain$TailFilter.messageReceived(DefaultIoFilterChain.java:690) at org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:417) at org.apache.mina.core.filterchain.DefaultIoFilterChain.access$1200(DefaultIoFilterChain.java:47) at org.apache.mina.core.filterchain.DefaultIoFilterChain$EntryImpl$1.messageReceived(DefaultIoFilterChain.java:765) at org.apache.mina.core.filterchain.IoFilterAdapter.messageReceived(IoFilterAdapter.java:109) at org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:417) at org.apache.mina.core.filterchain.DefaultIoFilterChain.access$1200(DefaultIoFilterChain.java:47) at org.apache.mina.core.filterchain.DefaultIoFilterChain$EntryImpl$1.messageReceived(DefaultIoFilterChain.java:765) at org.apache.mina.filter.codec.ProtocolCodecFilter$ProtocolDecoderOutputImpl.flush(ProtocolCodecFilter.java:407) at org.apache.mina.filter.codec.ProtocolCodecFilter.messageReceived(ProtocolCodecFilter.java:236) at org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:417) at org.apache.mina.core.filterchain.DefaultIoFilterChain.access$1200(DefaultIoFilterChain.java:47) at org.apache.mina.core.filterchain.DefaultIoFilterChain$EntryImpl$1.messageReceived(DefaultIoFilterChain.java:765) at org.apache.mina.core.filterchain.IoFilterEvent.fire(IoFilterEvent.java:74) at org.apache.mina.core.session.IoEvent.run(IoEvent.java:63) at org.apache.mina.filter.executor.OrderedThreadPoolExecutor$Worker.runTask(OrderedThreadPoolExecutor.java:769) at org.apache.mina.filter.executor.OrderedThreadPoolExecutor$Worker.runTasks(OrderedThreadPoolExecutor.java:761) at org.apache.mina.filter.executor.OrderedThreadPoolExecutor$Worker.run(OrderedThreadPoolExecutor.java:703) at java.lang.Thread.run(Thread.java:745) 2016.08.23 07:24:35 ERROR [socket_c2s-thread-3]: org.jivesoftware.openfire.nio.ConnectionHandler - Closing connection due to error while processing message: <message id="b10f9e39-4e5f-413f-9b13-2e5463a5b09d" to="user20@xmpp" type="chat"><body>bar</body></message>{code}

    Jive Software Open Source | 9 months ago | Guus der Kinderen
    java.lang.ClassCastException: org.jivesoftware.util.cache.DefaultCache cannot be cast to org.jivesoftware.openfire.plugin.util.cache.ClusteredCache
  3. 0

    Help:basic RMI question

    Google Groups | 2 decades ago | Paolo De Lutiis
    java.lang.ClassCastException: serverPackage.ServerClass_Stub at clientPackage.myApplet.init(myApplet.java:line#) at sun.applet.AppletPanel.run(AppletPanel.java:273) at java.lang.Thread.
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Shared hosting Bungeecord problems.

    GitHub | 3 years ago | Arksenu
    java.lang.ClassCastException: bka cannot be cast to fs All my servers are set to onlinemode: false Here is my config.yml groups: arksenu: - admin disabled_commands: - find player_limit: -1 stats: 347d1d62-6fb6-4869-bd43-7d0745de8e3c permissions: default: - bungeecord.command.server - bungeecord.command.list admin: - bungeecord.command.ip - bungeecord.command.alert - bungeecord.command.end - bungeecord.command.reload listeners: - max_players: 18 fallback_server: hub host: 0.0.0.0:35289 bind_local_address: true ping_passthrough: false tab_list: GLOBAL_PING default_server: hub forced_hosts: pvp.md-5.net: hub tab_size: 60 force_default_server: true motd: ’Network’ query_enabled: false query_port: 25565 timeout: 30000 connection_throttle: 4000 servers: hub: address: 108.170.8.146:35289 restricted: false motd: test UvGames: address: 66.85.165.170:26200 restricted: false motd: test UvPrison: address: 66.85.128.90:25928 restricted: false motd: test ip_forward: false online_mode: true And here is my console message -> UpstreamBridge has disconnected disconnected with: Exception Connecting:RuntimeException : Server is online mode! @ net.md_5.bungee.ServerConnector:188
  6. 0

    Shared hosting Bungeecord problems.

    GitHub | 3 years ago | Arksenu
    java.lang.ClassCastException: bka cannot be cast to fs All my servers are set to onlinemode: false Here is my config.yml groups: arksenu: - admin disabled_commands: - find player_limit: -1 stats: 347d1d62-6fb6-4869-bd43-7d0745de8e3c permissions: default: - bungeecord.command.server - bungeecord.command.list admin: - bungeecord.command.ip - bungeecord.command.alert - bungeecord.command.end - bungeecord.command.reload listeners: - max_players: 18 fallback_server: hub host: 0.0.0.0:35289 bind_local_address: true ping_passthrough: false tab_list: GLOBAL_PING default_server: hub forced_hosts: pvp.md-5.net: hub tab_size: 60 force_default_server: true motd: ’Network’ query_enabled: false query_port: 25565 timeout: 30000 connection_throttle: 4000 servers: hub: address: 108.170.8.146:35289 restricted: false motd: test UvGames: address: 66.85.165.170:26200 restricted: false motd: test UvPrison: address: 66.85.128.90:25928 restricted: false motd: test ip_forward: false online_mode: true And here is my console message -> UpstreamBridge has disconnected disconnected with: Exception Connecting:RuntimeException : Server is online mode! @ net.md_5.bungee.ServerConnector:188

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. 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()
    2. org.jivesoftware.openfire
      ClusteredCacheFactory.getLock
      1. org.jivesoftware.openfire.plugin.util.cache.ClusteredCacheFactory.getLock(ClusteredCacheFactory.java:444)
      1 frame
    3. org.jivesoftware.util
      CacheFactory.getLock
      1. org.jivesoftware.util.cache.CacheFactory.getLock(CacheFactory.java:415)
      1 frame
    4. org.jivesoftware.openfire
      ConnectionHandler.messageReceived
      1. org.jivesoftware.openfire.spi.RoutingTableImpl.getRoutes(RoutingTableImpl.java:823)
      2. org.jivesoftware.openfire.spi.RoutingTableImpl.routeToBareJID(RoutingTableImpl.java:539)
      3. org.jivesoftware.openfire.spi.RoutingTableImpl.routeToLocalDomain(RoutingTableImpl.java:308)
      4. org.jivesoftware.openfire.spi.RoutingTableImpl.routePacket(RoutingTableImpl.java:244)
      5. org.jivesoftware.openfire.MessageRouter.route(MessageRouter.java:139)
      6. org.jivesoftware.openfire.spi.PacketRouterImpl.route(PacketRouterImpl.java:83)
      7. org.jivesoftware.openfire.net.StanzaHandler.processMessage(StanzaHandler.java:378)
      8. org.jivesoftware.openfire.net.ClientStanzaHandler.processMessage(ClientStanzaHandler.java:113)
      9. org.jivesoftware.openfire.net.StanzaHandler.process(StanzaHandler.java:232)
      10. org.jivesoftware.openfire.net.StanzaHandler.process(StanzaHandler.java:199)
      11. org.jivesoftware.openfire.nio.ConnectionHandler.messageReceived(ConnectionHandler.java:181)
      11 frames
    5. Apache MINA Core
      OrderedThreadPoolExecutor$Worker.run
      1. org.apache.mina.core.filterchain.DefaultIoFilterChain$TailFilter.messageReceived(DefaultIoFilterChain.java:690)
      2. org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:417)
      3. org.apache.mina.core.filterchain.DefaultIoFilterChain.access$1200(DefaultIoFilterChain.java:47)
      4. org.apache.mina.core.filterchain.DefaultIoFilterChain$EntryImpl$1.messageReceived(DefaultIoFilterChain.java:765)
      5. org.apache.mina.core.filterchain.IoFilterAdapter.messageReceived(IoFilterAdapter.java:109)
      6. org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:417)
      7. org.apache.mina.core.filterchain.DefaultIoFilterChain.access$1200(DefaultIoFilterChain.java:47)
      8. org.apache.mina.core.filterchain.DefaultIoFilterChain$EntryImpl$1.messageReceived(DefaultIoFilterChain.java:765)
      9. org.apache.mina.filter.codec.ProtocolCodecFilter$ProtocolDecoderOutputImpl.flush(ProtocolCodecFilter.java:407)
      10. org.apache.mina.filter.codec.ProtocolCodecFilter.messageReceived(ProtocolCodecFilter.java:236)
      11. org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:417)
      12. org.apache.mina.core.filterchain.DefaultIoFilterChain.access$1200(DefaultIoFilterChain.java:47)
      13. org.apache.mina.core.filterchain.DefaultIoFilterChain$EntryImpl$1.messageReceived(DefaultIoFilterChain.java:765)
      14. org.apache.mina.core.filterchain.IoFilterEvent.fire(IoFilterEvent.java:74)
      15. org.apache.mina.core.session.IoEvent.run(IoEvent.java:63)
      16. org.apache.mina.filter.executor.OrderedThreadPoolExecutor$Worker.runTask(OrderedThreadPoolExecutor.java:769)
      17. org.apache.mina.filter.executor.OrderedThreadPoolExecutor$Worker.runTasks(OrderedThreadPoolExecutor.java:761)
      18. org.apache.mina.filter.executor.OrderedThreadPoolExecutor$Worker.run(OrderedThreadPoolExecutor.java:703)
      18 frames
    6. Java RT
      Thread.run
      1. java.lang.Thread.run(Thread.java:745)
      1 frame