You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Cannot invoke "String.equals(Object)" because the return value of "org.keycloak.representations.idm.RoleRepresentation.getDescription()" is null
at de.adorsys.keycloak.config.util.KeycloakUtil.isDefaultRole(KeycloakUtil.java:50)
Here is the complete error log with stacktrace:
2023-12-15 13:24:21.809 INFO 1 --- [ main] ConditionEvaluationReportLoggingListener :
Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
2023-12-15 13:24:21.852 ERROR 1 --- [ main] o.s.boot.SpringApplication : Application run failed
java.lang.IllegalStateException: Failed to execute CommandLineRunner
at org.springframework.boot.SpringApplication.callRunner(SpringApplication.java:771)
at org.springframework.boot.SpringApplication.callRunners(SpringApplication.java:752)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:314)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1303)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1292)
at de.adorsys.keycloak.config.KeycloakConfigApplication.main(KeycloakConfigApplication.java:35)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.base/java.lang.reflect.Method.invoke(Unknown Source)
at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:49)
at org.springframework.boot.loader.Launcher.launch(Launcher.java:108)
at org.springframework.boot.loader.Launcher.launch(Launcher.java:58)
at org.springframework.boot.loader.PropertiesLauncher.main(PropertiesLauncher.java:467)
Caused by: java.lang.NullPointerException: Cannot invoke "String.equals(Object)" because the return value of "org.keycloak.representations.idm.RoleRepresentation.getDescription()" is null
at de.adorsys.keycloak.config.util.KeycloakUtil.isDefaultRole(KeycloakUtil.java:50)
at de.adorsys.keycloak.config.service.RoleImportService.deleteRealmRolesMissingInImport(RoleImportService.java:262)
at de.adorsys.keycloak.config.service.RoleImportService.doImport(RoleImportService.java:94)
at de.adorsys.keycloak.config.service.RealmImportService.configureRealm(RealmImportService.java:199)
at de.adorsys.keycloak.config.service.RealmImportService.updateRealm(RealmImportService.java:192)
at de.adorsys.keycloak.config.service.RealmImportService.updateRealmIfNecessary(RealmImportService.java:150)
at de.adorsys.keycloak.config.service.RealmImportService.doImport(RealmImportService.java:141)
at de.adorsys.keycloak.config.KeycloakConfigRunner.run(KeycloakConfigRunner.java:79)
at org.springframework.boot.SpringApplication.callRunner(SpringApplication.java:768)
... 13 common frames omitted
Current Behavior
An error is thrown when
org.keycloak.representations.idm.RoleRepresentation.getDescription()
returns null.It happens, when roles have no description.
This happens here https://github.com/adorsys/keycloak-config-cli/blob/main/src/main/java/de/adorsys/keycloak/config/util/KeycloakUtil.java#L50
Here is the complete error log with stacktrace:
Expected Behavior
Should execute without error.
Environment
21.1.2
docker.io/adorsys/keycloak-config-cli:5.10.0-21.1.1
The text was updated successfully, but these errors were encountered: