[keycloak-user] Keycloak 3.4.3, custom SPI deployment: noclassdef-error caused by ClassNotFoundException when trying to call LDAPStorageProvider

Marek Posolda mposolda at redhat.com
Thu Jan 25 08:58:27 EST 2018


Yes, you need to declare those modules in your own module.xml (in case 
you want to deploy your provider as module) or in 
jboss-deployment-structure.xml (in case you deploy it through the 
deployer). See our documentation (Server Developer Guide) and example 
providers (Directory "providers" of keycloak-examples distribution. We 
may also have some quickstarts...)

Marek

On 24/01/18 16:12, Dominik Guhr wrote:
> Hi everyone,
>
> sorry for spamming, but I have another problem here:
>
> I am using maven to deploy my jar-file to keycloak 3.4.3.
>
> I added the dependencies for kerberos and ldap federation like this
> (with and without scope provided):
>
> <dependency>
>       <groupId>org.keycloak</groupId>
>       <artifactId>keycloak-kerberos-federation</artifactId>
>       <version>3.4.3.Final</version>
> </dependency>
> <dependency>
>       <groupId>org.keycloak</groupId>
>       <artifactId>keycloak-ldap-federation</artifactId>
>       <version>3.4.3.Final</version>
> </dependency>
>
> In my IDE I can call the Classes in Question, e.g. LDAPStorageProvider,
> but when the jar is successfully deployed to keycloak, I get the
> following exception when my method is called:
>
> ...Caused by: java.lang.ClassNotFoundException:
> org.keycloak.storage.ldap.LDAPStorageProvider from [Module
> "deployment.ldap-authenticator.jar" from Service Module Loader]
>
> I looked in modules/...keycloak/ and saw all jars lying there in version
> 3.4.3.Final, I even looked inside with jar -tf, and the class in
> question is provided. As said, I tried to use scope provided and no
> scope, without effect.
>
> Apart from that, I changed the module.xml for the private jars by
> removing the private part from them and restarting the kc server, but
> without any effect.
>
> At this link u can see the build-definition of my pom.xml:
>
> https://pastebin.com/xgHdSGFa
>
> So, am I missing something? Hope anyone could help me out here. :/
>
> _______________________________________________
> keycloak-user mailing list
> keycloak-user at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/keycloak-user




More information about the keycloak-user mailing list