Reputation: 6324
I had a working local keycloak image when I had to nuke all my docker images for another issue. I then brought up my keycloak image again with
version: '3.6'
volumes:
keycloak_postgres_data: {}
services:
postgres-keycloak:
image: postgres:10-alpine
container_name: postgres
volumes:
- keycloak_postgres_data:/var/lib/postgresql/data
environment:
POSTGRES_DB: keycloak
POSTGRES_USER: keycloak
POSTGRES_PASSWORD: password
keycloak:
image: jboss/keycloak:4.1.0.Final
environment:
DB_VENDOR: POSTGRES
DB_ADDR: postgres
DB_DATABASE: keycloak
DB_USER: keycloak
DB_PASSWORD: password
KEYCLOAK_USER: admin
KEYCLOAK_PASSWORD: testing
ports:
- 8088:8080
volumes:
- ./themes/puretalent:/opt/jboss/keycloak/themes/puretalent
- ./themes/fifteenrock:/opt/jboss/keycloak/themes/fifteenrock
depends_on:
- postgres-keycloak
The themes mentioned in the volume are present in the same folder and are also in the container when I bring it up. In the Realm Settings, I have tried, setting the theme to my specific theme or to the default theme but I get the same error below. I’ve elided it to the relevant error messages. I have also disable cache in the standalone.xml and restarted the container.
However, I'm getting a NullPointer exception.
keycloak_1 |
keycloak_1 | 01:18:58,781 WARN [org.keycloak.events] (default task-1) type=LOGIN_ERROR, realmId=master, clientId=odin, userId=null, ipAddress=172.20.0.1, error=invalid_user_credentials, auth_method=openid-connect, auth_type=code, response_type=code, redirect_uri=http://localhost:8082/odin/oidc_callback, code_id=9646b75e-273d-473e-a999-643d01d4cc36, response_mode=query
keycloak_1 | 01:18:58,793 ERROR [org.keycloak.services.error.KeycloakErrorHandler] (default task-1) Uncaught server error: java.lang.NullPointerException
keycloak_1 | at org.keycloak.theme.ExtendingThemeManager.loadTheme(ExtendingThemeManager.java:117)
keycloak_1 | at org.keycloak.theme.ExtendingThemeManager.getTheme(ExtendingThemeManager.java:108)
keycloak_1 | at org.keycloak.theme.DefaultThemeManager.getTheme(DefaultThemeManager.java:26)
keycloak_1 | at org.keycloak.theme.DefaultThemeManager.getTheme(DefaultThemeManager.java:21)
keycloak_1 | at org.keycloak.forms.login.freemarker.FreeMarkerLoginFormsProvider.getTheme(FreeMarkerLoginFormsProvider.java:262)
keycloak_1 | at org.keycloak.forms.login.freemarker.FreeMarkerLoginFormsProvider.createResponse(FreeMarkerLoginFormsProvider.java:158)
keycloak_1 | at org.keycloak.forms.login.freemarker.FreeMarkerLoginFormsProvider.createErrorPage(FreeMarkerLoginFormsProvider.java:498)
keycloak_1 | at org.keycloak.services.ErrorPage.error(ErrorPage.java:31)
keycloak_1 | at org.keycloak.authentication.AuthenticationProcessor.handleBrowserException(AuthenticationProcessor.java:728)
keycloak_1 | at org.keycloak.protocol.AuthorizationEndpointBase.handleBrowserAuthenticationRequest(AuthorizationEndpointBase.java:145)
keycloak_1 | at org.keycloak.protocol.oidc.endpoints.AuthorizationEndpoint.buildAuthorizationCodeAuthorizationResponse(AuthorizationEndpoint.java:409)
keycloak_1 | at org.keycloak.protocol.oidc.endpoints.AuthorizationEndpoint.process(AuthorizationEndpoint.java:152)
keycloak_1 | at org.keycloak.protocol.oidc.endpoints.AuthorizationEndpoint.buildGet(AuthorizationEndpoint.java:108)
…
Upvotes: 4
Views: 9487
Reputation: 446
Please note that the Client-Login-Theme overrides the Realm-Login-Theme.
See this images, you need to set the Client-Login-Theme to Choose...
to get the Realm-Login-Theme working.
I've created an added my custom theme kreata
to Keycloak based on this tutorial: https://www.keycloak.org/docs/latest/server_development/#_themes
Upvotes: 1