500 error when deleting a user

Deleting a user causes a 500 error, keycloak version 17.0.0 running on ubuntu 20.04. I’m at a loss for how to debug this :thinking: here is the stack trace:

2022-04-23 10:49:04,474 ERROR [org.infinispan.CLUSTER] (jgroups-14,ip-10-11-2-100-1565) ISPN000474: Error processing request 203@ip-10-11-2-224-64128: java.lang.NoClassDefFoundError: Could not initialize class org.jboss.marshalling.river.ClassDescriptors
         at org.jboss.marshalling.river.RiverUnmarshaller.doReadClassDescriptor(RiverUnmarshaller.java:1268)
         at org.jboss.marshalling.river.RiverUnmarshaller.doReadClassDescriptor(RiverUnmarshaller.java:1067)
         at org.jboss.marshalling.river.RiverUnmarshaller.doReadNewObject(RiverUnmarshaller.java:1381)
         at org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:298)
         at org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:231)
         at org.jboss.marshalling.AbstractObjectInput.readObject(AbstractObjectInput.java:41)
         at org.infinispan.jboss.marshalling.commons.AbstractJBossMarshaller.objectFromObjectStream(AbstractJBossMarshaller.java:137)
         at org.infinispan.jboss.marshalling.commons.AbstractJBossMarshaller.objectFromByteBuffer(AbstractJBossMarshaller.java:115)
         at org.infinispan.commons.marshall.AbstractMarshaller.objectFromByteBuffer(AbstractMarshaller.java:82)
         at org.infinispan.marshall.core.impl.DelegatingUserMarshaller.objectFromByteBuffer(DelegatingUserMarshaller.java:63)
         at org.infinispan.marshall.protostream.impl.MarshallableUserObject$Marshaller.read(MarshallableUserObject.java:139)
         at org.infinispan.marshall.protostream.impl.MarshallableUserObject$Marshaller.read(MarshallableUserObject.java:100)
         at org.infinispan.protostream.impl.ProtobufTagMarshallerDelegate.unmarshall(ProtobufTagMarshallerDelegate.java:32)
         at org.infinispan.protostream.WrappedMessage.readMessage(WrappedMessage.java:539)
         at org.infinispan.protostream.WrappedMessage.read(WrappedMessage.java:351)
         at org.infinispan.protostream.ProtobufUtil.fromWrappedByteArray(ProtobufUtil.java:129)
         at org.infinispan.marshall.protostream.impl.AbstractInternalProtoStreamMarshaller.objectFromByteBuffer(AbstractInternalProtoStreamMarshaller.java:97)
         at org.infinispan.marshall.protostream.impl.AbstractInternalProtoStreamMarshaller.objectFromByteBuffer(AbstractInternalProtoStreamMarshaller.java:92)
         at org.infinispan.marshall.core.GlobalMarshaller.readUnknown(GlobalMarshaller.java:905)
         at org.infinispan.marshall.core.GlobalMarshaller.readUnknown(GlobalMarshaller.java:890)
         at org.infinispan.marshall.core.GlobalMarshaller.readNonNullableObject(GlobalMarshaller.java:714)
         at org.infinispan.marshall.core.GlobalMarshaller.readNullableObject(GlobalMarshaller.java:357)
         at org.infinispan.marshall.core.BytesObjectInput.readObject(BytesObjectInput.java:32)
         at org.infinispan.stream.impl.intops.IntermediateOperationExternalizer.readObject(IntermediateOperationExternalizer.java:378)
         at org.infinispan.stream.impl.intops.IntermediateOperationExternalizer.readObject(IntermediateOperationExternalizer.java:93)
         at org.infinispan.marshall.core.GlobalMarshaller.readWithExternalizer(GlobalMarshaller.java:727)
         at org.infinispan.marshall.core.GlobalMarshaller.readNonNullableObject(GlobalMarshaller.java:708)
         at org.infinispan.marshall.core.GlobalMarshaller.readNullableObject(GlobalMarshaller.java:357)
         at org.infinispan.marshall.core.BytesObjectInput.readObject(BytesObjectInput.java:32)
         at org.infinispan.commons.marshall.MarshallUtil.lambda$unmarshallCollection$0(MarshallUtil.java:293)
         at org.infinispan.commons.marshall.MarshallUtil.unmarshallCollection(MarshallUtil.java:276)
         at org.infinispan.commons.marshall.MarshallUtil.unmarshallCollection(MarshallUtil.java:293)
         at org.infinispan.marshall.exts.CollectionExternalizer.readObject(CollectionExternalizer.java:121)
         at org.infinispan.marshall.exts.CollectionExternalizer.readObject(CollectionExternalizer.java:28)
         at org.infinispan.marshall.core.GlobalMarshaller.readWithExternalizer(GlobalMarshaller.java:727)
         at org.infinispan.marshall.core.GlobalMarshaller.readNonNullableObject(GlobalMarshaller.java:708)
         at org.infinispan.marshall.core.GlobalMarshaller.readNullableObject(GlobalMarshaller.java:357)
         at org.infinispan.marshall.core.BytesObjectInput.readObject(BytesObjectInput.java:32)
         at org.infinispan.stream.impl.CacheIntermediatePublisher$ReducerExternalizer.readObject(CacheIntermediatePublisher.java:72)
         at org.infinispan.stream.impl.CacheIntermediatePublisher$ReducerExternalizer.readObject(CacheIntermediatePublisher.java:64)
         at org.infinispan.marshall.core.GlobalMarshaller.readWithExternalizer(GlobalMarshaller.java:727)
         at org.infinispan.marshall.core.GlobalMarshaller.readNonNullableObject(GlobalMarshaller.java:708)
         at org.infinispan.marshall.core.GlobalMarshaller.readNullableObject(GlobalMarshaller.java:357)
         at org.infinispan.marshall.core.BytesObjectInput.readObject(BytesObjectInput.java:32)
         at org.infinispan.reactive.publisher.impl.commands.batch.InitialPublisherCommand.readFrom(InitialPublisherCommand.java:157)
         at org.infinispan.marshall.exts.ReplicableCommandExternalizer.readCommandParameters(ReplicableCommandExternalizer.java:117)
         at org.infinispan.marshall.exts.CacheRpcCommandExternalizer.readObject(CacheRpcCommandExternalizer.java:164)
         at org.infinispan.marshall.exts.CacheRpcCommandExternalizer.readObject(CacheRpcCommandExternalizer.java:86)
         at org.infinispan.marshall.core.GlobalMarshaller.readWithExternalizer(GlobalMarshaller.java:727)
         at org.infinispan.marshall.core.GlobalMarshaller.readNonNullableObject(GlobalMarshaller.java:708)
         at org.infinispan.marshall.core.GlobalMarshaller.readNullableObject(GlobalMarshaller.java:357)
         at org.infinispan.marshall.core.GlobalMarshaller.objectFromObjectInput(GlobalMarshaller.java:191)
         at org.infinispan.marshall.core.GlobalMarshaller.objectFromByteBuffer(GlobalMarshaller.java:220)
         at org.infinispan.remoting.transport.jgroups.JGroupsTransport.processRequest(JGroupsTransport.java:1440)
         at org.infinispan.remoting.transport.jgroups.JGroupsTransport.processMessage(JGroupsTransport.java:1380)
         at org.infinispan.remoting.transport.jgroups.JGroupsTransport.access$300(JGroupsTransport.java:138)
         at org.infinispan.remoting.transport.jgroups.JGroupsTransport$ChannelCallbacks.up(JGroupsTransport.java:1524)
         at org.jgroups.JChannel.up(JChannel.java:780)
         at org.jgroups.stack.ProtocolStack.up(ProtocolStack.java:913)
         at org.jgroups.protocols.FRAG3.up(FRAG3.java:165)
         at org.jgroups.protocols.FlowControl.up(FlowControl.java:355)
         at org.jgroups.protocols.FlowControl.up(FlowControl.java:363)
         at org.jgroups.protocols.pbcast.GMS.up(GMS.java:876)
         at org.jgroups.protocols.pbcast.STABLE.up(STABLE.java:254)
         at org.jgroups.protocols.UNICAST3.deliverMessage(UNICAST3.java:1048)
         at org.jgroups.protocols.UNICAST3.addMessage(UNICAST3.java:771)
         at org.jgroups.protocols.UNICAST3.handleDataReceived(UNICAST3.java:752)
         at org.jgroups.protocols.UNICAST3.up(UNICAST3.java:405)
         at org.jgroups.protocols.pbcast.NAKACK2.up(NAKACK2.java:592)
         at org.jgroups.protocols.VERIFY_SUSPECT.up(VERIFY_SUSPECT.java:132)
         at org.jgroups.protocols.FailureDetection.up(FailureDetection.java:186)
         at org.jgroups.protocols.FD_SOCK.up(FD_SOCK.java:254)
         at org.jgroups.protocols.MERGE3.up(MERGE3.java:281)
         at org.jgroups.protocols.Discovery.up(Discovery.java:300)
         at org.jgroups.protocols.TP.passMessageUp(TP.java:1400)
         at org.jgroups.util.SubmitToThreadPool$SingleMessageHandler.run(SubmitToThreadPool.java:98)
         at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
         at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
         at java.base/java.lang.Thread.run(Thread.java:833)
 Caused by: java.lang.ExceptionInInitializerError: Exception java.lang.reflect.InaccessibleObjectException: Unable to make protected java.util.AbstractMap() accessible: module java.base does not "opens java.util" to unnamed module @1d2adfbe [in thread "jgroups-6,ip-10-11-2-100-1565"]
         at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:354)
         at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:297)
         at java.base/java.lang.reflect.Constructor.checkCanSetAccessible(Constructor.java:191)
         at java.base/java.lang.reflect.Constructor.setAccessible(Constructor.java:184)
         at org.jboss.marshalling.reflect.JDKSpecific$SerMethods.<init>(JDKSpecific.java:147)
         at org.jboss.marshalling.reflect.SerializableClass.<init>(SerializableClass.java:84)
         at org.jboss.marshalling.reflect.SerializableClassRegistry$1.computeValue(SerializableClassRegistry.java:62)
         at org.jboss.marshalling.reflect.SerializableClassRegistry$1.computeValue(SerializableClassRegistry.java:59)
         at java.base/java.lang.ClassValue.getFromHashMap(ClassValue.java:228)
         at java.base/java.lang.ClassValue.getFromBackup(ClassValue.java:210)
         at java.base/java.lang.ClassValue.get(ClassValue.java:116)
         at org.jboss.marshalling.reflect.SerializableClassRegistry.lookup(SerializableClassRegistry.java:83)
         at org.jboss.marshalling.reflect.SerializableClass.<init>(SerializableClass.java:76)
         at org.jboss.marshalling.reflect.SerializableClassRegistry$1.computeValue(SerializableClassRegistry.java:62)
         at org.jboss.marshalling.reflect.SerializableClassRegistry$1.computeValue(SerializableClassRegistry.java:59)
         at java.base/java.lang.ClassValue.getFromHashMap(ClassValue.java:228)
         at java.base/java.lang.ClassValue.getFromBackup(ClassValue.java:210)
         at java.base/java.lang.ClassValue.get(ClassValue.java:116)
         at org.jboss.marshalling.reflect.SerializableClassRegistry.lookup(SerializableClassRegistry.java:83)
         at org.jboss.marshalling.river.ClassDescriptors.getSerializableClassDescriptor(ClassDescriptors.java:152)
         at org.jboss.marshalling.river.ClassDescriptors.getSerializableClassDescriptor(ClassDescriptors.java:146)
         at org.jboss.marshalling.river.ClassDescriptors.<clinit>(ClassDescriptors.java:101)

Which JDK are you using? And are you using 17.0.0 Wildfly or Quarkus? I seem to remember a problem like this because of an unsupported JDK version.

1 Like

@xgp Thank you for your reply! I appreciate the offered help :smile: I was able to figure it out with a bit more googling. I’m on 17.0.0 Quarkus on jdk 18.0.1, and it turns out the issue was jdk 17+ restricting deep reflection by default which keycloak apparently uses in some cases, I was able to fix the issue by adding the following to JAVA_OPTS_APPEND:

--add-opens java.base/java.util=ALL-UNNAMED --add-opens java.base/java.util.concurrent=ALL-UNNAMED

EDIT: after some more searching it seems --illegal-access=permit (or --illegal-access=warn) would also work as a blanket permission, but I have personally tested it yet.

EDIT 2: I just tested --illegal-access=permit and it didn’t work so it looks like specific --add-openss are required

EDIT 3: Yup, --illegal-access is no longer a valid option as of jdk 17, If anyone knows the full list of --add-opens required to allow keycloak to work fully please let me know so I can prevent these 500 errors in production :sweat_smile: :crossed_fingers:

1 Like

I am having the same if not similar problem. I ran into it while trying to test out adding an LDAP federation service. I tried the additional java args but I still get the same errors. I get the same error on 17 and 18 Quarkus versions.

java --version

openjdk 11.0.14.1 2022-02-08
OpenJDK Runtime Environment 18.9 (build 11.0.14.1+1)
OpenJDK 64-Bit Server VM 18.9 (build 11.0.14.1+1, mixed mode, sharing)
2022-05-05 02:57:11,345 ERROR [org.infinispan.interceptors.impl.InvocationContextInterceptor] (jgroups-13,dc-63735) ISPN000136: Error executing command PutKeyValueCommand on Cache 'work', writing keys [3ed21c0e-062d-4892-8efc-aaab84d37dd0]: org.infinispan.remoting.RemoteException: ISPN000217: Received exception from auth-61958, see cause for remote stack trace
        at org.infinispan.remoting.transport.ResponseCollectors.wrapRemoteException(ResponseCollectors.java:25)
        at org.infinispan.remoting.transport.impl.VoidResponseCollector.addException(VoidResponseCollector.java:47)
        at org.infinispan.remoting.transport.impl.VoidResponseCollector.addException(VoidResponseCollector.java:19)
        at org.infinispan.remoting.transport.ValidResponseCollector.addResponse(ValidResponseCollector.java:29)
        at org.infinispan.remoting.transport.impl.MultiTargetRequest.onResponse(MultiTargetRequest.java:92)
        at org.infinispan.remoting.transport.impl.RequestRepository.addResponse(RequestRepository.java:51)
        at org.infinispan.remoting.transport.jgroups.JGroupsTransport.processResponse(JGroupsTransport.java:1490)
        at org.infinispan.remoting.transport.jgroups.JGroupsTransport.processMessage(JGroupsTransport.java:1392)
        at org.infinispan.remoting.transport.jgroups.JGroupsTransport.access$300(JGroupsTransport.java:144)
        at org.infinispan.remoting.transport.jgroups.JGroupsTransport$ChannelCallbacks.up(JGroupsTransport.java:1562)
        at org.jgroups.JChannel.up(JChannel.java:780)
        at org.jgroups.stack.ProtocolStack.up(ProtocolStack.java:913)
        at org.jgroups.protocols.FRAG3.up(FRAG3.java:165)
        at org.jgroups.protocols.FlowControl.up(FlowControl.java:347)
        at org.jgroups.protocols.FlowControl.up(FlowControl.java:347)
        at org.jgroups.protocols.pbcast.GMS.up(GMS.java:876)
        at org.jgroups.protocols.pbcast.STABLE.up(STABLE.java:254)
        at org.jgroups.protocols.UNICAST3.deliverMessage(UNICAST3.java:1048)
        at org.jgroups.protocols.UNICAST3.addMessage(UNICAST3.java:771)
        at org.jgroups.protocols.UNICAST3.handleDataReceived(UNICAST3.java:752)
        at org.jgroups.protocols.UNICAST3.up(UNICAST3.java:405)
        at org.jgroups.protocols.pbcast.NAKACK2.up(NAKACK2.java:592)
        at org.jgroups.protocols.VERIFY_SUSPECT.up(VERIFY_SUSPECT.java:132)
        at org.jgroups.protocols.FailureDetection.up(FailureDetection.java:186)
        at org.jgroups.protocols.FD_SOCK.up(FD_SOCK.java:254)
        at org.jgroups.protocols.MERGE3.up(MERGE3.java:281)
        at org.jgroups.protocols.Discovery.up(Discovery.java:300)
        at org.jgroups.protocols.TP.passMessageUp(TP.java:1400)
        at org.jgroups.util.SubmitToThreadPool$SingleMessageHandler.run(SubmitToThreadPool.java:98)
        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
        at java.base/java.lang.Thread.run(Thread.java:829)
Caused by: org.infinispan.commons.CacheException: java.lang.NoClassDefFoundError: Could not initialize class org.jboss.marshalling.river.ClassDescriptors
        at org.infinispan.marshall.exts.ThrowableExternalizer.readObject(ThrowableExternalizer.java:181)
        at org.infinispan.marshall.exts.ThrowableExternalizer.readObject(ThrowableExternalizer.java:42)
        at org.infinispan.marshall.core.GlobalMarshaller.readWithExternalizer(GlobalMarshaller.java:727)
        at org.infinispan.marshall.core.GlobalMarshaller.readNonNullableObject(GlobalMarshaller.java:708)
        at org.infinispan.marshall.core.GlobalMarshaller.readNullableObject(GlobalMarshaller.java:357)
        at org.infinispan.marshall.core.BytesObjectInput.readObject(BytesObjectInput.java:32)
        at org.infinispan.remoting.responses.ExceptionResponse$Externalizer.readObject(ExceptionResponse.java:49)
        at org.infinispan.remoting.responses.ExceptionResponse$Externalizer.readObject(ExceptionResponse.java:41)
        at org.infinispan.marshall.core.GlobalMarshaller.readWithExternalizer(GlobalMarshaller.java:727)
        at org.infinispan.marshall.core.GlobalMarshaller.readNonNullableObject(GlobalMarshaller.java:708)
        at org.infinispan.marshall.core.GlobalMarshaller.readNullableObject(GlobalMarshaller.java:357)
        at org.infinispan.marshall.core.GlobalMarshaller.objectFromObjectInput(GlobalMarshaller.java:191)
        at org.infinispan.marshall.core.GlobalMarshaller.objectFromByteBuffer(GlobalMarshaller.java:220)
        at org.infinispan.remoting.transport.jgroups.JGroupsTransport.processResponse(JGroupsTransport.java:1482)
        ... 25 more
Caused by: java.lang.NoClassDefFoundError: Could not initialize class org.jboss.marshalling.river.ClassDescriptors
        at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
        at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
        at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490)
        at org.infinispan.marshall.exts.ThrowableExternalizer.readGenericThrowable(ThrowableExternalizer.java:282)
        at org.infinispan.marshall.exts.ThrowableExternalizer.readObject(ThrowableExternalizer.java:259)
        at org.infinispan.marshall.exts.ThrowableExternalizer.readObject(ThrowableExternalizer.java:42)
        at org.infinispan.marshall.core.GlobalMarshaller.readWithExternalizer(GlobalMarshaller.java:727)
        at org.infinispan.marshall.core.GlobalMarshaller.readNonNullableObject(GlobalMarshaller.java:708)
        at org.infinispan.marshall.core.GlobalMarshaller.readNullableObject(GlobalMarshaller.java:357)
        at org.infinispan.marshall.core.BytesObjectInput.readObject(BytesObjectInput.java:32)
        at org.infinispan.marshall.exts.ThrowableExternalizer.readObject(ThrowableExternalizer.java:180)
        ... 38 more

2022-05-05 02:57:11,353 ERROR [org.keycloak.services.error.KeycloakErrorHandler] (executor-thread-3) Uncaught server error: org.infinispan.remoting.RemoteException: ISPN000217: Received exception from auth-61958, see cause for remote stack trace
        at org.infinispan.remoting.transport.ResponseCollectors.wrapRemoteException(ResponseCollectors.java:25)
        at org.infinispan.remoting.transport.impl.VoidResponseCollector.addException(VoidResponseCollector.java:47)
        at org.infinispan.remoting.transport.impl.VoidResponseCollector.addException(VoidResponseCollector.java:19)
        at org.infinispan.remoting.transport.ValidResponseCollector.addResponse(ValidResponseCollector.java:29)
        at org.infinispan.remoting.transport.impl.MultiTargetRequest.onResponse(MultiTargetRequest.java:92)
        at org.infinispan.remoting.transport.impl.RequestRepository.addResponse(RequestRepository.java:51)
        at org.infinispan.remoting.transport.jgroups.JGroupsTransport.processResponse(JGroupsTransport.java:1490)
        at org.infinispan.remoting.transport.jgroups.JGroupsTransport.processMessage(JGroupsTransport.java:1392)
        at org.infinispan.remoting.transport.jgroups.JGroupsTransport.access$300(JGroupsTransport.java:144)
        at org.infinispan.remoting.transport.jgroups.JGroupsTransport$ChannelCallbacks.up(JGroupsTransport.java:1562)
        at org.jgroups.JChannel.up(JChannel.java:780)
        at org.jgroups.stack.ProtocolStack.up(ProtocolStack.java:913)
        at org.jgroups.protocols.FRAG3.up(FRAG3.java:165)
        at org.jgroups.protocols.FlowControl.up(FlowControl.java:347)
        at org.jgroups.protocols.FlowControl.up(FlowControl.java:347)
        at org.jgroups.protocols.pbcast.GMS.up(GMS.java:876)
        at org.jgroups.protocols.pbcast.STABLE.up(STABLE.java:254)
        at org.jgroups.protocols.UNICAST3.deliverMessage(UNICAST3.java:1048)
        at org.jgroups.protocols.UNICAST3.addMessage(UNICAST3.java:771)
        at org.jgroups.protocols.UNICAST3.handleDataReceived(UNICAST3.java:752)
        at org.jgroups.protocols.UNICAST3.up(UNICAST3.java:405)
        at org.jgroups.protocols.pbcast.NAKACK2.up(NAKACK2.java:592)
        at org.jgroups.protocols.VERIFY_SUSPECT.up(VERIFY_SUSPECT.java:132)
        at org.jgroups.protocols.FailureDetection.up(FailureDetection.java:186)
        at org.jgroups.protocols.FD_SOCK.up(FD_SOCK.java:254)
        at org.jgroups.protocols.MERGE3.up(MERGE3.java:281)
        at org.jgroups.protocols.Discovery.up(Discovery.java:300)
        at org.jgroups.protocols.TP.passMessageUp(TP.java:1400)
        at org.jgroups.util.SubmitToThreadPool$SingleMessageHandler.run(SubmitToThreadPool.java:98)
        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
        at java.base/java.lang.Thread.run(Thread.java:829)
        Suppressed: org.infinispan.commons.util.logging.TraceException
                at org.infinispan.interceptors.impl.SimpleAsyncInvocationStage.get(SimpleAsyncInvocationStage.java:39)
                at org.infinispan.interceptors.impl.AsyncInterceptorChainImpl.invoke(AsyncInterceptorChainImpl.java:249)
                at org.infinispan.cache.impl.InvocationHelper.doInvoke(InvocationHelper.java:297)
                at org.infinispan.cache.impl.InvocationHelper.invoke(InvocationHelper.java:101)
                at org.infinispan.cache.impl.InvocationHelper.invoke(InvocationHelper.java:83)
                at org.infinispan.cache.impl.CacheImpl.put(CacheImpl.java:1300)
                at org.infinispan.cache.impl.DecoratedCache.put(DecoratedCache.java:678)
                at org.infinispan.cache.impl.DecoratedCache.put(DecoratedCache.java:218)
                at org.infinispan.cache.impl.AbstractDelegatingCache.put(AbstractDelegatingCache.java:113)
                at org.infinispan.cache.impl.AbstractDelegatingCache.put(AbstractDelegatingCache.java:113)
                at org.infinispan.cache.impl.AbstractDelegatingCache.put(AbstractDelegatingCache.java:113)
                at org.infinispan.cache.impl.EncoderCache.put(EncoderCache.java:189)
                at org.keycloak.cluster.infinispan.InfinispanNotificationsManager.notify(InfinispanNotificationsManager.java:156)
                at org.keycloak.cluster.infinispan.InfinispanClusterProvider.notify(InfinispanClusterProvider.java:130)
                at org.keycloak.services.managers.UserStorageSyncManager.notifyToRefreshPeriodicSync(UserStorageSyncManager.java:177)
                at org.keycloak.storage.UserStorageManager.onCreate(UserStorageManager.java:719)
                at org.keycloak.models.utils.ComponentUtil.notifyCreated(ComponentUtil.java:98)
                at org.keycloak.models.jpa.RealmAdapter.addComponentModel(RealmAdapter.java:2001)
                at org.keycloak.models.cache.infinispan.RealmAdapter.addComponentModel(RealmAdapter.java:1555)
                at org.keycloak.services.resources.admin.ComponentResource.create(ComponentResource.java:133)
                at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
                at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
                at java.base/java.lang.reflect.Method.invoke(Method.java:566)
                at org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:170)
                at org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:130)
                at org.jboss.resteasy.core.ResourceMethodInvoker.internalInvokeOnTarget(ResourceMethodInvoker.java:660)
                at org.jboss.resteasy.core.ResourceMethodInvoker.invokeOnTargetAfterFilter(ResourceMethodInvoker.java:524)
                at org.jboss.resteasy.core.ResourceMethodInvoker.lambda$invokeOnTarget$2(ResourceMethodInvoker.java:474)
                at org.jboss.resteasy.core.interception.jaxrs.PreMatchContainerRequestContext.filter(PreMatchContainerRequestContext.java:364)
                at org.jboss.resteasy.core.ResourceMethodInvoker.invokeOnTarget(ResourceMethodInvoker.java:476)
                at org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:434)
                at org.jboss.resteasy.core.ResourceLocatorInvoker.invokeOnTargetObject(ResourceLocatorInvoker.java:192)
                at org.jboss.resteasy.core.ResourceLocatorInvoker.invoke(ResourceLocatorInvoker.java:152)
                at org.jboss.resteasy.core.ResourceLocatorInvoker.invokeOnTargetObject(ResourceLocatorInvoker.java:183)
                at org.jboss.resteasy.core.ResourceLocatorInvoker.invoke(ResourceLocatorInvoker.java:152)
                at org.jboss.resteasy.core.ResourceLocatorInvoker.invokeOnTargetObject(ResourceLocatorInvoker.java:183)
                at org.jboss.resteasy.core.ResourceLocatorInvoker.invoke(ResourceLocatorInvoker.java:141)
                at org.jboss.resteasy.core.ResourceLocatorInvoker.invoke(ResourceLocatorInvoker.java:32)
                at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:492)
                at org.jboss.resteasy.core.SynchronousDispatcher.lambda$invoke$4(SynchronousDispatcher.java:261)
                at org.jboss.resteasy.core.SynchronousDispatcher.lambda$preprocess$0(SynchronousDispatcher.java:161)
                at org.jboss.resteasy.core.interception.jaxrs.PreMatchContainerRequestContext.filter(PreMatchContainerRequestContext.java:364)
                at org.jboss.resteasy.core.SynchronousDispatcher.preprocess(SynchronousDispatcher.java:164)
                at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:247)
                at io.quarkus.resteasy.runtime.standalone.RequestDispatcher.service(RequestDispatcher.java:73)
                at io.quarkus.resteasy.runtime.standalone.VertxRequestHandler.dispatch(VertxRequestHandler.java:151)
                at io.quarkus.resteasy.runtime.standalone.VertxRequestHandler.handle(VertxRequestHandler.java:82)
                at io.quarkus.resteasy.runtime.standalone.VertxRequestHandler.handle(VertxRequestHandler.java:42)
                at io.vertx.ext.web.impl.RouteState.handleContext(RouteState.java:1212)
                at io.vertx.ext.web.impl.RoutingContextImplBase.iterateNext(RoutingContextImplBase.java:163)
                at io.vertx.ext.web.impl.RoutingContextImpl.next(RoutingContextImpl.java:141)
                at io.quarkus.vertx.http.runtime.StaticResourcesRecorder$2.handle(StaticResourcesRecorder.java:67)
                at io.quarkus.vertx.http.runtime.StaticResourcesRecorder$2.handle(StaticResourcesRecorder.java:55)
                at io.vertx.ext.web.impl.RouteState.handleContext(RouteState.java:1212)
                at io.vertx.ext.web.impl.RoutingContextImplBase.iterateNext(RoutingContextImplBase.java:163)
                at io.vertx.ext.web.impl.RoutingContextImpl.next(RoutingContextImpl.java:141)
                at io.quarkus.vertx.http.runtime.VertxHttpRecorder$5.handle(VertxHttpRecorder.java:380)
                at io.quarkus.vertx.http.runtime.VertxHttpRecorder$5.handle(VertxHttpRecorder.java:358)
                at io.vertx.ext.web.impl.RouteState.handleContext(RouteState.java:1212)
                at io.vertx.ext.web.impl.RoutingContextImplBase.iterateNext(RoutingContextImplBase.java:163)
                at io.vertx.ext.web.impl.RoutingContextImpl.next(RoutingContextImpl.java:141)
                at org.keycloak.quarkus.runtime.integration.web.QuarkusRequestFilter.lambda$createBlockingHandler$1(QuarkusRequestFilter.java:71)
                at io.vertx.core.impl.ContextImpl.lambda$null$0(ContextImpl.java:159)
                at io.vertx.core.impl.AbstractContext.dispatch(AbstractContext.java:100)
                at io.vertx.core.impl.ContextImpl.lambda$executeBlocking$1(ContextImpl.java:157)
                at io.quarkus.vertx.core.runtime.VertxCoreRecorder$13.runWith(VertxCoreRecorder.java:543)
                at org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2449)
                at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1478)
                at org.jboss.threads.DelegatingRunnable.run(DelegatingRunnable.java:29)
                at org.jboss.threads.ThreadLocalResettingRunnable.run(ThreadLocalResettingRunnable.java:29)
                at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
                ... 1 more
Caused by: org.infinispan.commons.CacheException: java.lang.NoClassDefFoundError: Could not initialize class org.jboss.marshalling.river.ClassDescriptors
        at org.infinispan.marshall.exts.ThrowableExternalizer.readObject(ThrowableExternalizer.java:181)
        at org.infinispan.marshall.exts.ThrowableExternalizer.readObject(ThrowableExternalizer.java:42)
        at org.infinispan.marshall.core.GlobalMarshaller.readWithExternalizer(GlobalMarshaller.java:727)
        at org.infinispan.marshall.core.GlobalMarshaller.readNonNullableObject(GlobalMarshaller.java:708)
        at org.infinispan.marshall.core.GlobalMarshaller.readNullableObject(GlobalMarshaller.java:357)
        at org.infinispan.marshall.core.BytesObjectInput.readObject(BytesObjectInput.java:32)
        at org.infinispan.remoting.responses.ExceptionResponse$Externalizer.readObject(ExceptionResponse.java:49)
        at org.infinispan.remoting.responses.ExceptionResponse$Externalizer.readObject(ExceptionResponse.java:41)
        at org.infinispan.marshall.core.GlobalMarshaller.readWithExternalizer(GlobalMarshaller.java:727)
        at org.infinispan.marshall.core.GlobalMarshaller.readNonNullableObject(GlobalMarshaller.java:708)
        at org.infinispan.marshall.core.GlobalMarshaller.readNullableObject(GlobalMarshaller.java:357)
        at org.infinispan.marshall.core.GlobalMarshaller.objectFromObjectInput(GlobalMarshaller.java:191)
        at org.infinispan.marshall.core.GlobalMarshaller.objectFromByteBuffer(GlobalMarshaller.java:220)
        at org.infinispan.remoting.transport.jgroups.JGroupsTransport.processResponse(JGroupsTransport.java:1482)
        ... 25 more
Caused by: java.lang.NoClassDefFoundError: Could not initialize class org.jboss.marshalling.river.ClassDescriptors
        at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
        at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
        at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490)
        at org.infinispan.marshall.exts.ThrowableExternalizer.readGenericThrowable(ThrowableExternalizer.java:282)
        at org.infinispan.marshall.exts.ThrowableExternalizer.readObject(ThrowableExternalizer.java:259)
        at org.infinispan.marshall.exts.ThrowableExternalizer.readObject(ThrowableExternalizer.java:42)
        at org.infinispan.marshall.core.GlobalMarshaller.readWithExternalizer(GlobalMarshaller.java:727)
        at org.infinispan.marshall.core.GlobalMarshaller.readNonNullableObject(GlobalMarshaller.java:708)
        at org.infinispan.marshall.core.GlobalMarshaller.readNullableObject(GlobalMarshaller.java:357)
        at org.infinispan.marshall.core.BytesObjectInput.readObject(BytesObjectInput.java:32)
        at org.infinispan.marshall.exts.ThrowableExternalizer.readObject(ThrowableExternalizer.java:180)
        ... 38 more

@bgsteiner unfortunately that looks like a very different error, in particular because your jdk version is 11, the issue I ran into only occurs on jdk 17+. Are you using any providers?

No I am not and this was also on a fresh install of Keycloak 18 on fedora as well.
The only other service I had running was FreeIPA. I plan on doing some more testing with keycloak on its own with other ldap providers and testing all of the forms on Keycloak as this is not the first time I have had this sort of thing happen. I had problems with adding users in the past on earlier versions where I would just get a 500 error and I’d just have to enable registration to add users that way.

1 Like

After some testing I found my problem is related to how Keycloak handles caching. I forced a local cache using “build --cache=local” and things started working correctly.

Since it seems I have a different issue I wont be providing any more updates unless it may help with @op’s problem

1 Like