Uploaded image for project: 'Keycloak'
  1. Keycloak
  2. KEYCLOAK-527

Client scope mapping error assigning role from available roles (model cache>jpa ClassCastException)

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Done
    • 1.0-beta-3
    • 1.0-beta-4
    • None
    • None
    • Hide

      1. In a realm, ensure there's at least one available Realm Role (or create one).
      2. Create a new OAuth Client.
      3. Open the Scope tab for the newly created client.
      4. Select an "Available Role" and click the Right Arrow (to try making it an "Assigned Roles")

      UI shows the standard Error Dialog box (in red).

      Show
      1. In a realm, ensure there's at least one available Realm Role (or create one). 2. Create a new OAuth Client. 3. Open the Scope tab for the newly created client. 4. Select an "Available Role" and click the Right Arrow (to try making it an "Assigned Roles") UI shows the standard Error Dialog box (in red).

    Description

      Error when assigning from available roles in client scope mapping:

      Caused by: java.lang.ClassCastException: org.keycloak.models.cache.RoleAdapter cannot be cast to org.keycloak.models.jpa.RoleAdapter
      at org.keycloak.models.jpa.ClientAdapter.addScopeMapping(ClientAdapter.java:217) [keycloak-model-jpa-1.0-beta-3-SNAPSHOT.jar:]
      at org.keycloak.models.cache.ClientAdapter.addScopeMapping(ClientAdapter.java:151) [keycloak-invalidation-cache-model-1.0-beta-3-SNAPSHOT.jar:]
      at org.keycloak.services.resources.admin.ScopeMappedResource.addRealmScopeMappings(ScopeMappedResource.java:179) [keycloak-services-1.0-beta-3-SNAPSHOT.
      jar:]

      Attachments

        Activity

          People

            Unassigned Unassigned
            dlmetcalf_jira David Metcalf (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: