8000 Realm export not working for Keycloak X 15.1.0 · Issue #9089 · keycloak/keycloak · GitHub
[go: up one dir, main page]

Skip to content

Realm export not working for Keycloak X 15.1.0 #9089

Closed

Description

@tomjo

Describe the bug

The export functionality is not working for Keycloak X 15.1.0. A ClassCastException occurs.

Version

15.1.0

Expected behavior

The export should work (and a ClassCastException should never occur).

Actual behavior

Export fails with following stacktrace:

java.lang.ClassCastException: class picocli.CommandLine$2 cannot be cast to class org.keycloak.quarkus.runtime.cli.ExecutionExceptionHandler (picocli.CommandLine$2 and org.keycloak.quarkus.runtime.cli.ExecutionExceptionHandler are in unnamed module of loader io.quarkus.bootstrap.runner.RunnerClassLoader @4141d797)
        at org.keycloak.quarkus.runtime.cli.command.AbstractStartCommand.run(AbstractStartCommand.java:34)
        at picocli.CommandLine.executeUserObject(CommandLine.java:1939)
        at picocli.CommandLine.access$1300(CommandLine.java:145)
        at picocli.CommandLine$RunLast.executeUserObjectOfLastSubcommandWithSameParent(CommandLine.java:2358)
        at picocli.CommandLine$RunLast.handle(CommandLine.java:2352)
        at picocli.CommandLine$RunLast.handle(CommandLine.java:2314)
        at picocli.CommandLine$AbstractParseResultHandler.execute(CommandLine.java:2179)
        at picocli.CommandLine$RunLast.execute(CommandLine.java:2316)
        at picocli.CommandLine.execute(CommandLine.java:2078)
        at org.keycloak.quarkus.runtime.cli.command.AbstractExportImportCommand.run(AbstractExportImportCommand.java:72)
        at picocli.CommandLine.executeUserObject(CommandLine.java:1939)
        at picocli.CommandLine.access$1300(CommandLine.java:145)
        at picocli.CommandLine$RunLast.executeUserObjectOfLastSubcommandWithSameParent(CommandLine.java:2358)
        at picocli.CommandLine$RunLast.handle(CommandLine.java:2352)
        at picocli.CommandLine$RunLast.handle(CommandLine.java:2314)
        at picocli.CommandLine$AbstractParseResultHandler.execute(CommandLine.java:2179)
        at picocli.CommandLine$RunLast.execute(CommandLine.java:2316)
        at picocli.CommandLine.execute(CommandLine.java:2078)
        at org.keycloak.quarkus.runtime.cli.Picocli.parseAndRun(Picocli.java:88)
        at org.keycloak.quarkus.runtime.KeycloakMain.main(KeycloakMain.java:78)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:566)
        at io.quarkus.bootstrap.runner.QuarkusEntryPoint.doRun(QuarkusEntryPoint.java:53)
        at io.quarkus.bootstrap.runner.QuarkusEntryPoint.main(QuarkusEntryPoint.java:28)

How to Reproduce?

docker run quay.io/keycloak/keycloak-x:15.1.0  export --dir /tmp/export

Anything else?

I think this might be related to 9a4ab82

I assume import is also impacted, but I don't have a realm file ready for testing.

Activity

  1. ll4strw commented on Dec 13, 2021

    @ll4strw

    @tomjo Indeed import seems also to break.
    If I try importing a dir containing all users and realms as separate .json files produced by export in kc v15.0.2 I get

    bin/kc.sh import --dir /exported-realms
    java.lang.ClassCastException: class picocli.CommandLine$2 cannot be cast to class org.keycloak.quarkus.runtime.cli.ExecutionExceptionHandler (picocli.CommandLine$2 and org.keycloak.quarkus.runtime.cli.ExecutionExceptionHandler are in unnamed module of loader io.quarkus.bootstrap.runner.RunnerClassLoader @27ddd392)
    	at org.keycloak.quarkus.runtime.cli.command.AbstractStartCommand.run(AbstractStartCommand.java:34)
    	at picocli.CommandLine.executeUserObject(CommandLine.java:1939)
    	at picocli.CommandLine.access$1300(CommandLine.java:145)
    	at picocli.CommandLine$RunLast.executeUserObjectOfLastSubcommandWithSameParent(CommandLine.java:2358)
    	at picocli.CommandLine$RunLast.handle(CommandLine.java:2352)
    	at picocli.CommandLine$RunLast.handle(CommandLine.java:2314)
    	at picocli.CommandLine$AbstractParseResultHandler.execute(CommandLine.java:2179)
    	at picocli.CommandLine$RunLast.execute(CommandLine.java:2316)
    	at picocli.CommandLine.execute(CommandLine.java:2078)
    	at org.keycloak.quarkus.runtime.cli.command.AbstractExportImportCommand.run(AbstractExportImportCommand.java:72)
    	at picocli.CommandLine.executeUserObject(CommandLine.java:1939)
    	at picocli.CommandLine.access$1300(CommandLine.java:145)
    	at picocli.CommandLine$RunLast.executeUserObjectOfLastSubcommandWithSameParent(CommandLine.java:2358)
    	at picocli.CommandLine$RunLast.handle(CommandLine.java:2352)
    	at picocli.CommandLine$RunLast.handle(CommandLine.java:2314)
    	at picocli.CommandLine$AbstractParseResultHandler.execute(CommandLine.java:2179)
    	at picocli.CommandLine$RunLast.execute(CommandLine.java:2316)
    	at picocli.CommandLine.execute(CommandLine.java:2078)
    	at org.keycloak.quarkus.runtime.cli.Picocli.parseAndRun(Picocli.java:88)
    	at org.keycloak.quarkus.runtime.KeycloakMain.main(KeycloakMain.java:78)
    	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
    	at io.quarkus.bootstrap.runner.QuarkusEntryPoint.doRun(QuarkusEntryPoint.java:53)
    	at io.quarkus.bootstrap.runner.QuarkusEntryPoint.main(QuarkusEntryPoint.java:28)

    N.B.: I am using openjdk 11.0.13.

  2. self-assigned this
    on Dec 13, 2021
  3. added this to the 16.0.0 milestone on Dec 13, 2021
  4. added a commit that references this issue on Dec 13, 2021
    e9f25b8
  5. moved this from In Progress to Ready in Keycloak: Quarkus distributionon Dec 13, 2021
  6. added
    area/dist/quarkusQuarkus distribution — packaging, container images, server config (kc.sh)
    and removed on Dec 13, 2021
  7. pedroigor commented on Dec 13, 2021

    @pedroigor
    Contributor

    @tomjo Thanks, we appreciate the feedback. Targeted for next release.

  8. Repository owner moved this from Ready to Done in Keycloak: Quarkus distributionon Dec 14, 2021
  9. added a commit that references this issue on Dec 14, 2021
    9b243ce
  10. modified the milestones: 16.0.0, 17.0.0 on Feb 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area/dist/quarkusQuarkus distribution — packaging, container images, server config (kc.sh)kind/bugCategorizes a PR related to a bug

Type

No type

Fields

No fields configured for issues without a type.

Projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

0