You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While trying migrate version 4.6.0 to 18.0.0 I identified that throws ModelDuplicateException originated by MigrateTo9_0_0 class without any information about duplicate object.
After a time investigating, I compiled the lib keycloak-server-spi-private and keycloak-model-jpa with logs before exception occurs and I checked 2 issues (In my migration case):
1 - For some reason that I do not understand, the realms already had roles 'view-applications', 'view-consent' and 'manage-consent' on database;
To solve this first case I executed the follow sql
deletefrom COMPOSITE_ROLE where COMPOSITE in (selectkr.idfrom KEYCLOAK_ROLE kr left join client c onc.id=kr.clientandc.client_id='account'wherekr.NAMEin ('view-applications', 'view-consent', 'manage-consent'));
deletefrom KEYCLOAK_ROLE where id in (selectkr.idfrom KEYCLOAK_ROLE kr left join client c onc.id=kr.clientandc.client_id='account'wherekr.NAMEin ('view-applications', 'view-consent', 'manage-consent'));
commit;
2 - After solve issue 1, I saw that the client 'account' did not exists in some realms, the person that adminstrate keycloak removed this client.
To solve this I make a copy of a existent 'account' client and change collumns ID, BASE_URL and REALM_ID
Description
While trying migrate version 4.6.0 to 18.0.0 I identified that throws
ModelDuplicateException
originated by MigrateTo9_0_0 class without any information about duplicate object.After a time investigating, I compiled the lib
keycloak-server-spi-private
andkeycloak-model-jpa
with logs before exception occurs and I checked 2 issues (In my migration case):1 - For some reason that I do not understand, the realms already had roles 'view-applications', 'view-consent' and 'manage-consent' on database;
To solve this first case I executed the follow sql
2 - After solve issue 1, I saw that the client 'account' did not exists in some realms, the person that adminstrate keycloak removed this client.
To solve this I make a copy of a existent 'account' client and change collumns ID, BASE_URL and REALM_ID
Discussion
No response
Motivation
Help others with same case.
Details
No response
The text was updated successfully, but these errors were encountered: