Repository navigation
How to get the user profiles definitions in User Federation Provider? #43008
Replies: 1 comment
|
Found the answer. |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Hi,
I am implementing an User Federation Provider. In my implementation I need to get the User Profiles definition in the realm including my custom attributes. The demo keycloak-quickstarts-test-helper is using dependency keycloak-admin-client to get the instance of realm and UPConfig(User Profile Config). So, I added the following dependency in the pom.xml, and the jar gets generated successfully.
But after I copied the provider to the server and run command kc.sh build, I got the following error:
ERROR: Build failure: Build failed due to errors
[error]: Build step org.keycloak.quarkus.deployment.KeycloakProcessor#configureProfile threw an exception: java.lang.LinkageError: loader constraint violation: loader io.quarkus.bootstrap.classloading.QuarkusClassLoader @7a11c4c7 wants to load class org.keycloak.common.Profile$ProfileName. A different class with the same name was previously loaded by java.net.URLClassLoader @67d18ed7. (org.keycloak.common.Profile$ProfileName is in unnamed module of loader java.net.URLClassLoader @67d18ed7, parent loader 'app')
at java.base/java.lang.ClassLoader.defineClass1(Native Method)
at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1027)
at io.quarkus.bootstrap.classloading.QuarkusClassLoader.loadClass(QuarkusClassLoader.java:558)
at io.quarkus.bootstrap.classloading.QuarkusClassLoader.loadClass(QuarkusClassLoader.java:517)
at java.base/java.lang.Class.forName0(Native Method)
at java.base/java.lang.Class.forName(Class.java:534)
at java.base/java.lang.Class.forName(Class.java:513)
at io.quarkus.deployment.recording.BytecodeRecorderImpl$$RecordingProxyProxy15.configureProfile(Unknown Source)
at org.keycloak.quarkus.deployment.KeycloakProcessor.configureProfile(KeycloakProcessor.java:238)
at java.base/java.lang.invoke.MethodHandle.invokeWithArguments(MethodHandle.java:733)
at io.quarkus.deployment.ExtensionLoader$3.execute(ExtensionLoader.java:856)
at io.quarkus.builder.BuildContext.run(BuildContext.java:255)
at org.jboss.threads.ContextHandler$1.runWith(ContextHandler.java:18)
at org.jboss.threads.EnhancedQueueExecutor$Task.doRunWith(EnhancedQueueExecutor.java:2675)
at org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2654)
at org.jboss.threads.EnhancedQueueExecutor.runThreadBody(EnhancedQueueExecutor.java:1627)
at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1594)
at java.base/java.lang.Thread.run(Thread.java:1583)
at org.jboss.threads.JBossThread.run(JBossThread.java:499)
ERROR: loader constraint violation: loader io.quarkus.bootstrap.classloading.QuarkusClassLoader @7a11c4c7 wants to load class org.keycloak.common.Profile$ProfileName. A different class with the same name was previously loaded by java.net.URLClassLoader @67d18ed7. (org.keycloak.common.Profile$ProfileName is in unnamed module of loader java.net.URLClassLoader @67d18ed7, parent loader 'app')
Can anyone guide me how to solve the issue? Or is there any other way to get User Profile Definitions instead of keycloak-admin-client? Thanks.
All reactions