[keycloak-user] Getting 'Failed to find provider' when attempting to set default SPI provider

Jared Blashka jblashka at redhat.com
Wed Jan 30 12:00:20 EST 2019


I'm trying to use a custom Email sender provider with keycloak 3.4.3.Final
but something isn't working correctly because keycloak fails to start up
with:

java.lang.RuntimeException: Failed to find provider serviceEmailSender for
emailSender

I'm deploying the provider via a war in the /deployments directory. I have
the factory class listed in the
META-INF/services/org.keycloak.email.EmailSenderProviderFactory file

I've added this to the keycloak-server subsystem

            <spi name="emailSender">
                <default-provider>serviceEmailSender</default-provider>
                <provider name="serviceEmailSender" enabled="true"/>
            </spi>

If I leave out the <default-provider> entry and restart the server I can
see that the init() method is called on my EmailSenderProviderFactory
implementation so as far as I can tell everything is configured correctly.
But keycloak doesn't like when I try to set this provider as the default.
Is there something I'm missing?

Jared


More information about the keycloak-user mailing list