Thanks to visit codestin.com
Credit goes to github.com

Skip to content

'Show version information' is not working #23783

@mamccorm

Description

@mamccorm

Before reporting an issue

Area

admin/cli

Describe the bug

The CLI does not appear to be returning the version, when the associated arg is invoked. Quoting supported args:

docker run quay.io/keycloak/keycloak:latest --help
Options:
-V, --version        Show version information

Whenever running docker run quay.io/keycloak/keycloak:latest --version or 'docker run quay.io/keycloak/keycloak:latest -V` an exception is thrown.

Details below.

Version

22.0.4

Expected behavior

Container should output version information and exit gracefully

Actual behavior

docker run quay.io/keycloak/keycloak:latest --version
The DelayedHandler was closed before any children handlers were configured. Messages will be written to stderr.
2023-10-06 11:09:42,128 DEBUG [org.jboss.logging] (main) Logging Provider: org.jboss.logging.JBossLogManagerProvider

Exception in thread "main" java.lang.reflect.InvocationTargetException
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:568)
	at io.quarkus.bootstrap.runner.QuarkusEntryPoint.doRun(QuarkusEntryPoint.java:61)
	at io.quarkus.bootstrap.runner.QuarkusEntryPoint.main(QuarkusEntryPoint.java:32)
Caused by: java.lang.NullPointerException: Cannot invoke "picocli.CommandLine.getCommand()" because "cmdCommand" is null
	at org.keycloak.quarkus.runtime.cli.Picocli.hasConfigChanges(Picocli.java:260)
	at org.keycloak.quarkus.runtime.cli.Picocli.requiresReAugmentation(Picocli.java:141)
	at org.keycloak.quarkus.runtime.cli.Picocli.runReAugmentationIfNeeded(Picocli.java:126)
	at org.keycloak.quarkus.runtime.cli.Picocli.parseAndRun(Picocli.java:95)
	at org.keycloak.quarkus.runtime.KeycloakMain.main(KeycloakMain.java:88)
	... 6 more

How to Reproduce?

docker run quay.io/keycloak/keycloak:latest --version

Anything else?

No response

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions