4 Replies Latest reply on Nov 19, 2014 9:35 AM by Marwen Trabelsi

    java.lang.ClassCastException: org.infinispan.container.entries.MortalCacheEntry cannot be cast to java.util.Collection

    Marwen Trabelsi Newbie

      I'm currently working on a cluster environment (with 2 nodes) under GateIn 3.5.x and underneath PicketLinkIDM when I crossed an exception when restarting one node while the other one is left up and running:

      • Error from restarted node:
        WARN  [org.infinispan.remoting.transport.jgroups.CommandAwareRpcDispatcher] (OOB-41,node-2:group-server-43443) Problems unmarshalling remote command from byte buffer: java.lang.ClassCastException: org.infinispan.container.entries.ImmortalCacheEntry cannot be cast to java.util.Collection
          at org.infinispan.commands.control.StateTransferControlCommand.setParameters(StateTransferControlCommand.java:153) [infinispan-core.jar:5.1.7.Final]
          at org.infinispan.commands.RemoteCommandsFactory.fromStream(RemoteCommandsFactory.java:231) [infinispan-core.jar:5.1.7.Final]
          at org.infinispan.marshall.exts.ReplicableCommandExternalizer.fromStream(ReplicableCommandExternalizer.java:125) [infinispan-core.jar:5.1.7.Final]
          at org.infinispan.marshall.exts.CacheRpcCommandExternalizer.readObject(CacheRpcCommandExternalizer.java:163) [infinispan-core.jar:5.1.7.Final]
          at org.infinispan.marshall.exts.CacheRpcCommandExternalizer.readObject(CacheRpcCommandExternalizer.java:66) [infinispan-core.jar:5.1.7.Final]
          at org.infinispan.marshall.jboss.ExternalizerTable$ExternalizerAdapter.readObject(ExternalizerTable.java:395) [infinispan-core.jar:5.1.7.Final]
          at org.infinispan.marshall.jboss.ExternalizerTable.readObject(ExternalizerTable.java:224) [infinispan-core.jar:5.1.7.Final]
          at org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:355) [jboss-marshalling-river-1.3.18.GA-redhat-1.jar:1.3.18.GA-redhat-1]
          at org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:213) [jboss-marshalling-river-1.3.18.GA-redhat-1.jar:1.3.18.GA-redhat-1]
          at org.jboss.marshalling.AbstractObjectInput.readObject(AbstractObjectInput.java:37) [jboss-marshalling-1.3.18.GA-redhat-1.jar:1.3.18.GA-redhat-1]
          at org.infinispan.marshall.jboss.AbstractJBossMarshaller.objectFromObjectStream(AbstractJBossMarshaller.java:163) [infinispan-core.jar:5.1.7.Final]
          at org.infinispan.marshall.VersionAwareMarshaller.objectFromByteBuffer(VersionAwareMarshaller.java:114) [infinispan-core.jar:5.1.7.Final]
          at org.infinispan.marshall.AbstractDelegatingMarshaller.objectFromByteBuffer(AbstractDelegatingMarshaller.java:104) [infinispan-core.jar:5.1.7.Final]
          at org.infinispan.remoting.transport.jgroups.MarshallerAdapter.objectFromBuffer(MarshallerAdapter.java:50) [infinispan-core.jar:5.1.7.Final]
          at org.infinispan.remoting.transport.jgroups.CommandAwareRpcDispatcher.handle(CommandAwareRpcDispatcher.java:200) [infinispan-core.jar:5.1.7.Final]
          at org.jgroups.blocks.RequestCorrelator.handleRequest(RequestCorrelator.java:456) [jgroups.jar:3.0.13.Final]
          at org.jgroups.blocks.RequestCorrelator.receiveMessage(RequestCorrelator.java:363) [jgroups.jar:3.0.13.Final]
          at org.jgroups.blocks.RequestCorrelator.receive(RequestCorrelator.java:238) [jgroups.jar:3.0.13.Final]
          at org.jgroups.blocks.MessageDispatcher$ProtocolAdapter.up(MessageDispatcher.java:601) [jgroups.jar:3.0.13.Final]
          at org.jgroups.JChannel.up(JChannel.java:716) [jgroups.jar:3.0.13.Final]
          at org.jgroups.stack.ProtocolStack.up(ProtocolStack.java:1026) [jgroups.jar:3.0.13.Final]
          at org.jgroups.protocols.RSVP.up(RSVP.java:172) [jgroups.jar:3.0.13.Final]
          at org.jgroups.protocols.FRAG2.unfragment(FRAG2.java:302) [jgroups.jar:3.0.13.Final]
          at org.jgroups.protocols.FRAG2.up(FRAG2.java:162) [jgroups.jar:3.0.13.Final]
          at org.jgroups.protocols.FlowControl.up(FlowControl.java:418) [jgroups.jar:3.0.13.Final]
          at org.jgroups.protocols.FlowControl.up(FlowControl.java:400) [jgroups.jar:3.0.13.Final]
          at org.jgroups.protocols.pbcast.GMS.up(GMS.java:889) [jgroups.jar:3.0.13.Final]
          at org.jgroups.protocols.pbcast.STABLE.up(STABLE.java:244) [jgroups.jar:3.0.13.Final]
          at org.jgroups.protocols.UNICAST2.handleDataReceived(UNICAST2.java:759) [jgroups.jar:3.0.13.Final]
          at org.jgroups.protocols.UNICAST2.up(UNICAST2.java:365) [jgroups.jar:3.0.13.Final]
          at org.jgroups.protocols.pbcast.NAKACK.up(NAKACK.java:602) [jgroups.jar:3.0.13.Final]
          at org.jgroups.protocols.VERIFY_SUSPECT.up(VERIFY_SUSPECT.java:143) [jgroups.jar:3.0.13.Final]
          at org.jgroups.protocols.FD.up(FD.java:273) [jgroups.jar:3.0.13.Final]
          at org.jgroups.protocols.FD_SOCK.up(FD_SOCK.java:288) [jgroups.jar:3.0.13.Final]
          at org.jgroups.protocols.MERGE2.up(MERGE2.java:205) [jgroups.jar:3.0.13.Final]
          at org.jgroups.protocols.Discovery.up(Discovery.java:359) [jgroups.jar:3.0.13.Final]
          at org.jgroups.protocols.TP.passMessageUp(TP.java:1185) [jgroups.jar:3.0.13.Final]
          at org.jgroups.protocols.TP$IncomingPacket.handleMyMessage(TP.java:1733) [jgroups.jar:3.0.13.Final]
          at org.jgroups.protocols.TP$IncomingPacket.run(TP.java:1715) [jgroups.jar:3.0.13.Final]
          at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_25]
          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_25]
          at java.lang.Thread.run(Thread.java:724) [rt.jar:1.7.0_25]
      
      • Error on the running node:
      ERROR [org.infinispan.cacheviews.CacheViewsManagerImpl] (CacheViewInstaller-3,node-1:group-server-4654) ISPN000172: Failed to prepare view CacheView{viewId=17, members=[node-1:group-server-4654, node-2:group-server-43443]} for cache  idm-portal-api, rolling back to view CacheView{viewId=16, members=[node-1:group-server-4654]}: java.util.concurrent.ExecutionException: java.util.concurrent.ExecutionException: org.infinispan.CacheException: Problems invoking command.
          at java.util.concurrent.FutureTask$Sync.innerGet(FutureTask.java:262) [rt.jar:1.7.0_25]
          at java.util.concurrent.FutureTask.get(FutureTask.java:119) [rt.jar:1.7.0_25]
          at org.infinispan.cacheviews.CacheViewsManagerImpl.clusterPrepareView(CacheViewsManagerImpl.java:323) [infinispan-core.jar:5.1.7.Final]
          at org.infinispan.cacheviews.CacheViewsManagerImpl.clusterInstallView(CacheViewsManagerImpl.java:250) [infinispan-core.jar:5.1.7.Final]
          at org.infinispan.cacheviews.CacheViewsManagerImpl$ViewInstallationTask.call(CacheViewsManagerImpl.java:894) [infinispan-core.jar:5.1.7.Final]
          at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) [rt.jar:1.7.0_25]
          at java.util.concurrent.FutureTask.run(FutureTask.java:166) [rt.jar:1.7.0_25]
          at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_25]
          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_25]
          at java.lang.Thread.run(Thread.java:724) [rt.jar:1.7.0_25]
      Caused by: java.util.concurrent.ExecutionException: org.infinispan.CacheException: Problems invoking command.
          at java.util.concurrent.FutureTask$Sync.innerGet(FutureTask.java:262) [rt.jar:1.7.0_25]
          at java.util.concurrent.FutureTask.get(FutureTask.java:119) [rt.jar:1.7.0_25]
          at org.infinispan.util.concurrent.AggregatingNotifyingFutureBuilder.get(AggregatingNotifyingFutureBuilder.java:93) [infinispan-core.jar:5.1.7.Final]
          at org.infinispan.statetransfer.BaseStateTransferTask.finishPushingState(BaseStateTransferTask.java:139) [infinispan-core.jar:5.1.7.Final]
          at org.infinispan.statetransfer.ReplicatedStateTransferTask.doPerformStateTransfer(ReplicatedStateTransferTask.java:116) [infinispan-core.jar:5.1.7.Final]
          at org.infinispan.statetransfer.BaseStateTransferTask.performStateTransfer(BaseStateTransferTask.java:93) [infinispan-core.jar:5.1.7.Final]
          at org.infinispan.statetransfer.BaseStateTransferManagerImpl.prepareView(BaseStateTransferManagerImpl.java:334) [infinispan-core.jar:5.1.7.Final]
          at org.infinispan.cacheviews.CacheViewsManagerImpl.handlePrepareView(CacheViewsManagerImpl.java:492) [infinispan-core.jar:5.1.7.Final]
          at org.infinispan.cacheviews.CacheViewsManagerImpl$3.call(CacheViewsManagerImpl.java:314) [infinispan-core.jar:5.1.7.Final]
          ... 5 more
      Caused by: org.infinispan.CacheException: Problems invoking command.
          at org.infinispan.remoting.transport.jgroups.CommandAwareRpcDispatcher.handle(CommandAwareRpcDispatcher.java:215) [infinispan-core.jar:5.1.7.Final]
          at org.jgroups.blocks.RequestCorrelator.handleRequest(RequestCorrelator.java:456) [jgroups.jar:3.0.13.Final]
          at org.jgroups.blocks.RequestCorrelator.receiveMessage(RequestCorrelator.java:363) [jgroups.jar:3.0.13.Final]
          at org.jgroups.blocks.RequestCorrelator.receive(RequestCorrelator.java:238) [jgroups.jar:3.0.13.Final]
          at org.jgroups.blocks.MessageDispatcher$ProtocolAdapter.up(MessageDispatcher.java:601) [jgroups.jar:3.0.13.Final]
          at org.jgroups.JChannel.up(JChannel.java:716) [jgroups.jar:3.0.13.Final]
          at org.jgroups.stack.ProtocolStack.up(ProtocolStack.java:1026) [jgroups.jar:3.0.13.Final]
          at org.jgroups.protocols.RSVP.up(RSVP.java:172) [jgroups.jar:3.0.13.Final]
          at org.jgroups.protocols.FRAG2.unfragment(FRAG2.java:302) [jgroups.jar:3.0.13.Final]
          at org.jgroups.protocols.FRAG2.up(FRAG2.java:162) [jgroups.jar:3.0.13.Final]
          at org.jgroups.protocols.FlowControl.up(FlowControl.java:418) [jgroups.jar:3.0.13.Final]
          at org.jgroups.protocols.FlowControl.up(FlowControl.java:400) [jgroups.jar:3.0.13.Final]
          at org.jgroups.protocols.pbcast.GMS.up(GMS.java:889) [jgroups.jar:3.0.13.Final]
          at org.jgroups.protocols.pbcast.STABLE.up(STABLE.java:244) [jgroups.jar:3.0.13.Final]
          at org.jgroups.protocols.UNICAST2.handleDataReceived(UNICAST2.java:759) [jgroups.jar:3.0.13.Final]
          at org.jgroups.protocols.UNICAST2.up(UNICAST2.java:365) [jgroups.jar:3.0.13.Final]
          at org.jgroups.protocols.pbcast.NAKACK.up(NAKACK.java:602) [jgroups.jar:3.0.13.Final]
          at org.jgroups.protocols.VERIFY_SUSPECT.up(VERIFY_SUSPECT.java:143) [jgroups.jar:3.0.13.Final]
          at org.jgroups.protocols.FD.up(FD.java:273) [jgroups.jar:3.0.13.Final]
          at org.jgroups.protocols.FD_SOCK.up(FD_SOCK.java:288) [jgroups.jar:3.0.13.Final]
          at org.jgroups.protocols.MERGE2.up(MERGE2.java:205) [jgroups.jar:3.0.13.Final]
          at org.jgroups.protocols.Discovery.up(Discovery.java:359) [jgroups.jar:3.0.13.Final]
          at org.jgroups.protocols.TP.passMessageUp(TP.java:1185) [jgroups.jar:3.0.13.Final]
          at org.jgroups.protocols.TP$IncomingPacket.handleMyMessage(TP.java:1733) [jgroups.jar:3.0.13.Final]
          at org.jgroups.protocols.TP$IncomingPacket.run(TP.java:1715) [jgroups.jar:3.0.13.Final]
          ... 3 more
      Caused by: java.lang.ClassCastException: org.infinispan.container.entries.MortalCacheEntry cannot be cast to java.util.Collection
          at org.infinispan.commands.control.StateTransferControlCommand.setParameters(StateTransferControlCommand.java:153) [infinispan-core.jar:5.1.7.Final]
          at org.infinispan.commands.RemoteCommandsFactory.fromStream(RemoteCommandsFactory.java:231) [infinispan-core.jar:5.1.7.Final]
          at org.infinispan.marshall.exts.ReplicableCommandExternalizer.fromStream(ReplicableCommandExternalizer.java:125) [infinispan-core.jar:5.1.7.Final]
          at org.infinispan.marshall.exts.CacheRpcCommandExternalizer.readObject(CacheRpcCommandExternalizer.java:163) [infinispan-core.jar:5.1.7.Final]
          at org.infinispan.marshall.exts.CacheRpcCommandExternalizer.readObject(CacheRpcCommandExternalizer.java:66) [infinispan-core.jar:5.1.7.Final]
          at org.infinispan.marshall.jboss.ExternalizerTable$ExternalizerAdapter.readObject(ExternalizerTable.java:395) [infinispan-core.jar:5.1.7.Final]
          at org.infinispan.marshall.jboss.ExternalizerTable.readObject(ExternalizerTable.java:224) [infinispan-core.jar:5.1.7.Final]
          at org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:355) [jboss-marshalling-river-1.3.18.GA-redhat-1.jar:1.3.18.GA-redhat-1]
          at org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:213) [jboss-marshalling-river-1.3.18.GA-redhat-1.jar:1.3.18.GA-redhat-1]
          at org.jboss.marshalling.AbstractObjectInput.readObject(AbstractObjectInput.java:37) [jboss-marshalling-1.3.18.GA-redhat-1.jar:1.3.18.GA-redhat-1]
          at org.infinispan.marshall.jboss.AbstractJBossMarshaller.objectFromObjectStream(AbstractJBossMarshaller.java:163) [infinispan-core.jar:5.1.7.Final]
          at org.infinispan.marshall.VersionAwareMarshaller.objectFromByteBuffer(VersionAwareMarshaller.java:114) [infinispan-core.jar:5.1.7.Final]
          at org.infinispan.marshall.AbstractDelegatingMarshaller.objectFromByteBuffer(AbstractDelegatingMarshaller.java:104) [infinispan-core.jar:5.1.7.Final]
          at org.infinispan.remoting.transport.jgroups.MarshallerAdapter.objectFromBuffer(MarshallerAdapter.java:50) [infinispan-core.jar:5.1.7.Final]
          at org.infinispan.remoting.transport.jgroups.CommandAwareRpcDispatcher.handle(CommandAwareRpcDispatcher.java:200) [infinispan-core.jar:5.1.7.Final]
          ... 27 more
      
      

       

      This error caused many errors when the portal was once up and running and prevented from users authentication. Can anyone give a hint on what may have caused it and what could be the origin? Is that rather a bug or an edge case?