thomasdarimont/embedded-spring-boot-keycloak-server

java.lang.ClassCastException

ebremer opened this issue · 1 comments

On a RHEL 7 server, I started to get the error after a recent OS upgrade. The code was working fine originally.

java.lang.ClassCastException: class [I cannot be cast to class java.util.Map ([I and java.util.Map are in module java.base of loader 'bootstrap')
        at org.infinispan.distribution.ch.impl.ReplicatedConsistentHash$Externalizer.doReadObject(ReplicatedConsistentHash.java:405) ~[infinispan-core-13.0.8.Final.jar!/:13.0.8.Final]
        at org.infinispan.distribution.ch.impl.ReplicatedConsistentHash$Externalizer.doReadObject(ReplicatedConsistentHash.java:390) ~[infinispan-core-13.0.8.Final.jar!/:13.0.8.Final]
        at org.infinispan.commons.marshall.InstanceReusingAdvancedExternalizer.readObject(InstanceReusingAdvancedExternalizer.java:102) ~[infinispan-commons-13.0.8.Final.jar!/:13.0.8.Final]
        at org.infinispan.marshall.core.GlobalMarshaller.readWithExternalizer(GlobalMarshaller.java:727) ~[infinispan-core-13.0.8.Final.jar!/:13.0.8.Final]
        at org.infinispan.marshall.core.GlobalMarshaller.readNonNullableObject(GlobalMarshaller.java:708) ~[infinispan-core-13.0.8.Final.jar!/:13.0.8.Final]
        at org.infinispan.marshall.core.GlobalMarshaller.readNullableObject(GlobalMarshaller.java:357) ~[infinispan-core-13.0.8.Final.jar!/:13.0.8.Final]
        at org.infinispan.marshall.core.BytesObjectInput.readObject(BytesObjectInput.java:32) ~[infinispan-core-13.0.8.Final.jar!/:13.0.8.Final]
        at org.infinispan.topology.CacheTopology$Externalizer.doReadObject(CacheTopology.java:251) ~[infinispan-core-13.0.8.Final.jar!/:13.0.8.Final]
        at org.infinispan.topology.CacheTopology$Externalizer.doReadObject(CacheTopology.java:234) ~[infinispan-core-13.0.8.Final.jar!/:13.0.8.Final]
        at org.infinispan.commons.marshall.InstanceReusingAdvancedExternalizer.readObject(InstanceReusingAdvancedExternalizer.java:102) ~[infinispan-commons-13.0.8.Final.jar!/:13.0.8.Final]
        at org.infinispan.marshall.core.GlobalMarshaller.readWithExternalizer(GlobalMarshaller.java:727) ~[infinispan-core-13.0.8.Final.jar!/:13.0.8.Final]
        at org.infinispan.marshall.core.GlobalMarshaller.readNonNullableObject(GlobalMarshaller.java:708) ~[infinispan-core-13.0.8.Final.jar!/:13.0.8.Final]
        at org.infinispan.marshall.core.GlobalMarshaller.readNullableObject(GlobalMarshaller.java:357) ~[infinispan-core-13.0.8.Final.jar!/:13.0.8.Final]
        at org.infinispan.marshall.core.BytesObjectInput.readObject(BytesObjectInput.java:32) ~[infinispan-core-13.0.8.Final.jar!/:13.0.8.Final]
        at org.infinispan.topology.CacheStatusResponse$Externalizer.readObject(CacheStatusResponse.java:72) ~[infinispan-core-13.0.8.Final.jar!/:13.0.8.Final]
        at org.infinispan.topology.CacheStatusResponse$Externalizer.readObject(CacheStatusResponse.java:60) ~[infinispan-core-13.0.8.Final.jar!/:13.0.8.Final]
        at org.infinispan.marshall.core.GlobalMarshaller.readWithExternalizer(GlobalMarshaller.java:727) ~[infinispan-core-13.0.8.Final.jar!/:13.0.8.Final]
        at org.infinispan.marshall.core.GlobalMarshaller.readNonNullableObject(GlobalMarshaller.java:708) ~[infinispan-core-13.0.8.Final.jar!/:13.0.8.Final]
        at org.infinispan.marshall.core.GlobalMarshaller.readNullableObject(GlobalMarshaller.java:357) ~[infinispan-core-13.0.8.Final.jar!/:13.0.8.Final]
        at org.infinispan.marshall.core.BytesObjectInput.readObject(BytesObjectInput.java:32) ~[infinispan-core-13.0.8.Final.jar!/:13.0.8.Final]
        at org.infinispan.remoting.responses.SuccessfulResponse$Externalizer.readObject(SuccessfulResponse.java:71) ~[infinispan-core-13.0.8.Final.jar!/:13.0.8.Final]
        at org.infinispan.remoting.responses.SuccessfulResponse$Externalizer.readObject(SuccessfulResponse.java:63) ~[infinispan-core-13.0.8.Final.jar!/:13.0.8.Final]
        at org.infinispan.marshall.core.GlobalMarshaller.readWithExternalizer(GlobalMarshaller.java:727) ~[infinispan-core-13.0.8.Final.jar!/:13.0.8.Final]
        at org.infinispan.marshall.core.GlobalMarshaller.readNonNullableObject(GlobalMarshaller.java:708) ~[infinispan-core-13.0.8.Final.jar!/:13.0.8.Final]
        at org.infinispan.marshall.core.GlobalMarshaller.readNullableObject(GlobalMarshaller.java:357) ~[infinispan-core-13.0.8.Final.jar!/:13.0.8.Final]
        at org.infinispan.marshall.core.GlobalMarshaller.objectFromObjectInput(GlobalMarshaller.java:191) ~[infinispan-core-13.0.8.Final.jar!/:13.0.8.Final]
        at org.infinispan.marshall.core.GlobalMarshaller.objectFromByteBuffer(GlobalMarshaller.java:220) ~[infinispan-core-13.0.8.Final.jar!/:13.0.8.Final]
        at org.infinispan.remoting.transport.jgroups.JGroupsTransport.processResponse(JGroupsTransport.java:1482) ~[infinispan-core-13.0.8.Final.jar!/:13.0.8.Final]
        at org.infinispan.remoting.transport.jgroups.JGroupsTransport.processMessage(JGroupsTransport.java:1392) ~[infinispan-core-13.0.8.Final.jar!/:13.0.8.Final]
        at org.infinispan.remoting.transport.jgroups.JGroupsTransport.access$300(JGroupsTransport.java:144) ~[infinispan-core-13.0.8.Final.jar!/:13.0.8.Final]
        at org.infinispan.remoting.transport.jgroups.JGroupsTransport$ChannelCallbacks.up(JGroupsTransport.java:1562) ~[infinispan-core-13.0.8.Final.jar!/:13.0.8.Final]
        at org.jgroups.JChannel.up(JChannel.java:780) ~[jgroups-4.2.20.Final.jar!/:na]
        at org.jgroups.stack.ProtocolStack.up(ProtocolStack.java:913) ~[jgroups-4.2.20.Final.jar!/:na]
        at org.jgroups.protocols.FRAG3.up(FRAG3.java:165) ~[jgroups-4.2.20.Final.jar!/:na]
        at org.jgroups.protocols.FlowControl.up(FlowControl.java:347) ~[jgroups-4.2.20.Final.jar!/:na]
        at org.jgroups.protocols.FlowControl.up(FlowControl.java:347) ~[jgroups-4.2.20.Final.jar!/:na]
        at org.jgroups.protocols.pbcast.GMS.up(GMS.java:876) ~[jgroups-4.2.20.Final.jar!/:na]
        at org.jgroups.protocols.pbcast.STABLE.up(STABLE.java:254) ~[jgroups-4.2.20.Final.jar!/:na]
        at org.jgroups.protocols.UNICAST3.deliverMessage(UNICAST3.java:1048) ~[jgroups-4.2.20.Final.jar!/:na]
        at org.jgroups.protocols.UNICAST3.addMessage(UNICAST3.java:771) ~[jgroups-4.2.20.Final.jar!/:na]
        at org.jgroups.protocols.UNICAST3.handleDataReceived(UNICAST3.java:752) ~[jgroups-4.2.20.Final.jar!/:na]
        at org.jgroups.protocols.UNICAST3.up(UNICAST3.java:405) ~[jgroups-4.2.20.Final.jar!/:na]
        at org.jgroups.protocols.pbcast.NAKACK2.up(NAKACK2.java:592) ~[jgroups-4.2.20.Final.jar!/:na]
        at org.jgroups.protocols.VERIFY_SUSPECT.up(VERIFY_SUSPECT.java:132) ~[jgroups-4.2.20.Final.jar!/:na]
        at org.jgroups.protocols.FailureDetection.up(FailureDetection.java:186) ~[jgroups-4.2.20.Final.jar!/:na]
        at org.jgroups.protocols.FD_SOCK.up(FD_SOCK.java:254) ~[jgroups-4.2.20.Final.jar!/:na]
        at org.jgroups.protocols.MERGE3.up(MERGE3.java:281) ~[jgroups-4.2.20.Final.jar!/:na]
        at org.jgroups.protocols.Discovery.up(Discovery.java:300) ~[jgroups-4.2.20.Final.jar!/:na]
        at org.jgroups.protocols.TP.passMessageUp(TP.java:1400) ~[jgroups-4.2.20.Final.jar!/:na]
        at org.jgroups.util.SubmitToThreadPool$SingleMessageHandler.run(SubmitToThreadPool.java:98) ~[jgroups-4.2.20.Final.jar!/:na]
        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) ~[na:na]
        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) ~[na:na]
        at java.base/java.lang.Thread.run(Thread.java:833) ~[na:na]

I included the jgroups.xml and jgroups_dns.xml files from the custom server and the problem went away. Not sure what changed in the OS update, but the defaults no longer worked. OS is question:
Linux 3.10.0-1160.76.1.el7.x86_64 #1 SMP Tue Jul 26 14:15:37 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux