[keycloak-user] No Default theme - Null Pointer Exception

Cono D'Elia codelkirby at gmail.com
Sun Jan 6 18:15:35 EST 2019


Hi All:

My use case was to automatically direct the user to a custom theme
depending on the device they are using e.g: native mobile vs other. The
theme selector will make a decision based on User Agent and direct the
end-user accordingly.

I created a theme selector based on the source code snippets provided from
https://www.keycloak.org/docs/latest/server_development/index.html#_providers.
I basically did a copy and paste. I was able to deploy the theme and it
appeared in the Provider's tab in the Admin console. I copied the base
theme as 'my-theme'. When I restart the Keycloak server it fails to start
throwing an NPE indicating that there is No Default theme.

I was wondering if I needed any other code or configuration that is not
stated in that particular section to get this going? I couldn't find a
working sample online, so if I can be directed to one that would be great.

Thanks a bunch!
Chuck.


More information about the keycloak-user mailing list