keycloak/keycloak

NullPointerException after after 26.3.2 migration

Open

#41,640 创建于 2025年8月4日

在 GitHub 查看
 (9 评论) (1 反应) (0 负责人)Java (8,346 fork)batch import
area/coregood first issuekind/bugpriority/lowteam/core-iamteam/core-shared

仓库指标

Star
 (34,398 star)
PR 合并指标
 (平均合并 6天 19小时) (30 天内合并 384 个 PR)

描述

Before reporting an issue

  • I have read and understood the above terms for submitting issues, and I understand that my issue may be closed without action if I do not follow them.

Area

core

Describe the bug

We get exceptions in the logs

Version

26.3.2

Regression

  • The issue is a regression

Expected behavior

no exception in the logs

Actual behavior

We got this exception:

 2025-08-04 11:46:38,469 logLevel=ERROR [org.keycloak.services.error.KeycloakErrorHandler] (executor-thread-15) Uncaught server error: java.lang.NullPointerException: Cannot invoke "java.lang.Integer.intValue()" because the return value of "org.keycloak.representations.idm.CredentialRepresentation.getHashIterations()" is null
 	at org.keycloak.models.utils.RepresentationToModel.convertDeprecatedCredentialsFormat(RepresentationToModel.java:245)
	at org.keycloak.models.utils.RepresentationToModel.createCredentials(RepresentationToModel.java:778)
 	at org.keycloak.services.resources.admin.UsersResource.createUser(UsersResource.java:173)
 	at org.keycloak.services.resources.admin.UsersResource$quarkusrestinvoker$createUser_dbaf1f3ce12d75e1e6e52c8055b800147ead4329.invoke(Unknown Source)
 	at org.jboss.resteasy.reactive.server.handlers.InvocationHandler.handle(InvocationHandler.java:29)
 	at io.quarkus.resteasy.reactive.server.runtime.QuarkusResteasyReactiveRequestContext.invokeHandler(QuarkusResteasyReactiveRequestContext.java:141)
 	at org.jboss.resteasy.reactive.common.core.AbstractResteasyReactiveContext.run(AbstractResteasyReactiveContext.java:147)
 	at io.quarkus.vertx.core.runtime.VertxCoreRecorder$15.runWith(VertxCoreRecorder.java:638)
 	at org.jboss.threads.EnhancedQueueExecutor$Task.doRunWith(EnhancedQueueExecutor.java:2675)
 	at org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2654)
 	at org.jboss.threads.EnhancedQueueExecutor.runThreadBody(EnhancedQueueExecutor.java:1627)
 	at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1594)
 	at org.jboss.threads.DelegatingRunnable.run(DelegatingRunnable.java:11)
 	at org.jboss.threads.ThreadLocalResettingRunnable.run(ThreadLocalResettingRunnable.java:11)
 	at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
 	at java.base/java.lang.Thread.run(Thread.java:1583)

How to Reproduce?

No sure about it

Anything else?

No response

贡献者指南