From 1cc1911ec35ffbf32d191f22dfd8eb75abcf7b09 Mon Sep 17 00:00:00 2001 From: Steven Hawkins Date: Thu, 14 Mar 2024 11:47:07 -0400 Subject: [PATCH] doc: adding a note about repairing a corrupted classloading index (#27906) relates to: #26396 Signed-off-by: Steve Hawkins --- .../server_development/topics/providers.adoc | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/docs/documentation/server_development/topics/providers.adoc b/docs/documentation/server_development/topics/providers.adoc index e6a7cb30dd..92fbc75e1b 100644 --- a/docs/documentation/server_development/topics/providers.adoc +++ b/docs/documentation/server_development/topics/providers.adoc @@ -220,6 +220,8 @@ Providers are registered with the server by simply copying the JAR file to the ` If your provider needs additional dependencies not already provided by Keycloak copy these to the `providers` directory. +After registering new providers or dependencies Keycloak needs to be re-built with a non-optimized start or the `kc.[sh|bat] build` command. + [NOTE] ==== Provider JARs are not loaded in isolated classloaders, so do not include resources or classes in your provider JARs that conflict with built-in resources or classes. @@ -234,9 +236,17 @@ or you can check for the existence of `some.file` in the JAR contents under the ---- find . -type f -name "*.jar" -exec unzip -l {} \; | grep some.file ---- + +If you find that your server will not start due to a `NoSuchFileException` error related to a removed provider JAR, then run: + +[source,bash] +---- +./kc.sh -Dquarkus.launch.rebuild=true +---- + +This will force Quarkus to rebuild the classloading related index files. From there you should be able to perform a non-optimized start or build without an exception. ==== -After registering new providers or dependencies Keycloak needs to be re-built with a non-optimized start or the `kc.[sh|bat] build` command. ==== Disabling a provider