+
Skip to content

Update to KC 26.x from <26 fails if admin-cli client deleted #35793

@sventorben

Description

@sventorben

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

When the admin-cli clients has been deleted in one realm, the upate from KC <26 to KC 26.x fails with the following error:

{"timestamp":"2024-12-11T07:29:23.579094554Z","sequence":9861,"loggerClassName":"org.jboss.logging.Logger","loggerName":"org.keycloak.quarkus.runtime.cli.ExecutionExceptionHandler","level":"ERROR","message":"ERROR: Cannot invoke \"org.keycloak.models.ClientModel.setFullScopeAllowed(boolean)\" because \"adminCliClient\" is null","threadName":"main","threadId":1,"mdc":{},"ndc":"","hostName":"xxxx","processName":"/usr/lib/jvm/java-21-openjdk-21.0.5.0.11-2.el9.x86_64/bin/java","processId":1}

Version

26.0.7

Regression

  • The issue is a regression

Expected behavior

The update works even if the client does not exists.

Actual behavior

KC startup fails with error message.

How to Reproduce?

Run Keycloak in version <26. Delete the admin-cli client in one realm. Update to KC 26.x.

Anything else?

No response

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载