[keycloak-user] Unable to register provider implementation: not a subtype exception

Alessandro Tundo aletundo at wikitolearn.org
Wed Dec 20 10:52:54 EST 2017


Hi folks!

I followed the documentation for implementing and registering a SPI but I'm
not able to deploy it correctly.

The raised exception is:

*java.util.ServiceConfigurationError:
org.keycloak.credential.hash.PasswordHashProviderFactory: Provider
org.wikitolearn.keycloak.provider.MediaWikiBTypePasswordHashProviderFactory
not a subtype*

I tried both registration ways but the outcome is the same. The .jar I'm
trying to deployt has the following structure:


   -
   META-INF/services/org.keycloak.credential.hash.PasswordHashProviderFactory
   - org/wikitolearn/keycloak/provider/
   MediaWikiBTypePasswordHashProviderFactory.class
   - org/wikitolearn/keycloak/provider/
   MediaWikiBTypePasswordHashProvider.class

The factory and the provider implements
respectively PasswordHashProviderFactory and PasswordHashProvider.

I would like also to point out that the SPI works correctly in my Keycloak
fork. But as you can imagine, a fork is not a good option. Especially when
are available more elegant ways to extend the software programatically
without a fork.

I'm looking forward to receiving your reply asap.

Thank you!

Alessandro


More information about the keycloak-user mailing list