Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NPE with added Resource in AuthorizationSettings #1111

Open
bohmber opened this issue Jul 23, 2024 · 0 comments · May be fixed by #1096
Open

NPE with added Resource in AuthorizationSettings #1111

bohmber opened this issue Jul 23, 2024 · 0 comments · May be fixed by #1096
Labels

Comments

@bohmber
Copy link

bohmber commented Jul 23, 2024

Current Behavior

2024-07-23T07:39:16.190Z ERROR 317 --- [ main] o.s.boot.SpringApplication : Application run failed java.lang.NullPointerException: Cannot invoke "java.util.Map.isEmpty()" because the return value of "org.keycloak.representations.idm.authorization.ResourceRepresentation.getAttributes()" is null at de.adorsys.keycloak.config.service.ClientAuthorizationImportService.updateAuthorizationResource(ClientAuthorizationImportService.java:301) at de.adorsys.keycloak.config.service.ClientAuthorizationImportService.createOrUpdateAuthorizationResource(ClientAuthorizationImportService.java:267) at de.adorsys.keycloak.config.service.ClientAuthorizationImportService.createOrUpdateAuthorizationResources(ClientAuthorizationImportService.java:254) at de.adorsys.keycloak.config.service.ClientAuthorizationImportService.updateAuthorization(ClientAuthorizationImportService.java:154) at de.adorsys.keycloak.config.service.ClientAuthorizationImportService.updateClientAuthorizationSettings(ClientAuthorizationImportService.java:121) at de.adorsys.keycloak.config.service.ClientAuthorizationImportService.doImport(ClientAuthorizationImportService.java:98) at de.adorsys.keycloak.config.service.RealmImportService.configureRealm(RealmImportService.java:215) at de.adorsys.keycloak.config.service.RealmImportService.updateRealm(RealmImportService.java:196) at de.adorsys.keycloak.config.service.RealmImportService.updateRealmIfNecessary(RealmImportService.java:154) at de.adorsys.keycloak.config.service.RealmImportService.doImport(RealmImportService.java:145) at de.adorsys.keycloak.config.KeycloakConfigRunner.run(KeycloakConfigRunner.java:79) at org.springframework.boot.SpringApplication.lambda$callRunner$5(SpringApplication.java:790) at org.springframework.util.function.ThrowingConsumer$1.acceptWithException(ThrowingConsumer.java:83) at org.springframework.util.function.ThrowingConsumer.accept(ThrowingConsumer.java:60) at org.springframework.util.function.ThrowingConsumer$1.accept(ThrowingConsumer.java:88) at org.springframework.boot.SpringApplication.callRunner(SpringApplication.java:798) at org.springframework.boot.SpringApplication.callRunner(SpringApplication.java:789) at org.springframework.boot.SpringApplication.lambda$callRunners$3(SpringApplication.java:774) at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:184) at java.base/java.util.stream.SortedOps$SizedRefSortingSink.end(SortedOps.java:357) at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:510) at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499) at java.base/java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:151) at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:174) at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) at java.base/java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:596) at org.springframework.boot.SpringApplication.callRunners(SpringApplication.java:774) at org.springframework.boot.SpringApplication.run(SpringApplication.java:341) at org.springframework.boot.SpringApplication.run(SpringApplication.java:1354) at org.springframework.boot.SpringApplication.run(SpringApplication.java:1343) at de.adorsys.keycloak.config.KeycloakConfigApplication.main(KeycloakConfigApplication.java:35) at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103) at java.base/java.lang.reflect.Method.invoke(Method.java:580) at org.springframework.boot.loader.launch.Launcher.launch(Launcher.java:91) at org.springframework.boot.loader.launch.Launcher.launch(Launcher.java:53) at org.springframework.boot.loader.launch.PropertiesLauncher.main(PropertiesLauncher.java:574)

Expected Behavior

No NPE

Steps To Reproduce

No response

Environment

  • Keycloak Version: 25.0.2
  • keycloak-config-cli Version: 6.1.5
  • Java Version: 21

Anything else?

No response

@bohmber bohmber added the bug label Jul 23, 2024
@bohmber bohmber changed the title NPE with added Resource in AuthorisationSettings NPE with added Resource in AuthorizationSettings Jul 23, 2024
bohmber added a commit to bohmber/keycloak-config-cli that referenced this issue Jul 23, 2024
@bohmber bohmber linked a pull request Jul 23, 2024 that will close this issue
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant