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

Unable to update client's service account setting if realmCache is disabled.

    Details

    • Docs QE Status:
      NEW
    • QE Status:
      NEW

      Description

      1. In standalone.xml, disable the realmCache config.

      <spi name="realmCache">
      <provider name="default" enabled="false"/>
      </spi>

       

      2.And go to client list, pick one of the client with 'Service Accounts Enabled=true'

      3. And then set it as false, and Save.

       

      The system prompt:

      Error! An unexpected server error has occurred

       

      Server log:

      [org.keycloak.services.error.KeycloakErrorHandler] (default task-5) Uncaught server error: org.hibernate.LazyInitializationException: failed to lazily initialize a collection of role: org.keycloak.models.jpa.entities.ClientEntity.attributes, could not initialize proxy - no Session

      at org.hibernate.collection.internal.AbstractPersistentCollection.throwLazyInitializationException(AbstractPersistentCollection.java:602)

      at org.hibernate.collection.internal.AbstractPersistentCollection.withTemporarySessionIfNeeded(AbstractPersistentCollection.java:217)

      at org.hibernate.collection.internal.AbstractPersistentCollection.initialize(AbstractPersistentCollection.java:581)

      at org.hibernate.collection.internal.AbstractPersistentCollection.read(AbstractPersistentCollection.java:148)

      at org.hibernate.collection.internal.PersistentBag.iterator(PersistentBag.java:390)

      at org.keycloak.models.jpa.ClientAdapter.setAttribute(ClientAdapter.java:312)

      at org.keycloak.models.utils.RepresentationToModel.updateClient(RepresentationToModel.java:1504)

      at org.keycloak.services.resources.admin.ClientResource.updateClientFromRep(ClientResource.java:705)

      at org.keycloak.services.resources.admin.ClientResource.update(ClientResource.java:158)

      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)

      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

      at java.lang.reflect.Method.invoke(Method.java:498)

       

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                ryouto Ryouto Choi
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated: