[keycloak-user] Exported realm cannot be imported

Bill Burke bburke at redhat.com
Wed Aug 20 13:21:56 EDT 2014


Somebody else reported this and I couldn't reproduce.

Did you forget the -Dkeycloak.migration.strategy=OVERWRITE_EXISTING flag 
when you imported?

On 8/20/2014 12:12 PM, Christina Lau wrote:
>
> I exported a realm I created on beta-4 using this command:
>
> ./standalone.sh -Dkeycloak.migration.action=export
> -Dkeycloak.migration.provider=singleFile
> -Dkeycloak.migration.file=dsgapi.json -Dkeycloak.migration.realmName=DSG_API
>
> I then try to import it into another new instance. However I got this
> error. Any idea? Is this possible? I can send the json file if it helps.
>
>
> 12:08:10,574 WARN  [org.hibernate.engine.jdbc.spi.SqlExceptionHelper]
> (default task-26) SQL Error: 23505, SQLState: 23505
> 12:08:10,574 ERROR [org.hibernate.engine.jdbc.spi.SqlExceptionHelper]
> (default task-26) Unique index or primary key violation:
> "UK_B71CJLBENV945RB6GCON438AT_INDEX_7 ON PUBLIC.CLIENT(REALM_ID, NAME)
> VALUES ( /* key:17 */ null, null, null, null, null,
> 'security-admin-console', null, null, null, null, null, null, null,
> null, 'cc0823c1-dab8-4f17-9b23-b04708d3b523')"; SQL statement:
> insert into CLIENT (ALLOWED_CLAIMS_MASK, ENABLED, FULL_SCOPE_ALLOWED,
> NAME, NOT_BEFORE, PUBLIC_CLIENT, REALM_ID, SECRET, BASE_URL,
> BEARER_ONLY, MANAGEMENT_URL, SURROGATE_AUTH_REQUIRED, DTYPE, ID) values
> (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, 'ApplicationEntity', ?) [23505-173]
> 12:08:10,576
> INFO  [org.hibernate.engine.jdbc.batch.internal.AbstractBatchImpl]
> (default task-26) HHH000010: On release of batch it still contained JDBC
> statements
>
>
> _______________________________________________
> keycloak-user mailing list
> keycloak-user at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/keycloak-user
>

-- 
Bill Burke
JBoss, a division of Red Hat
http://bill.burkecentral.com


More information about the keycloak-user mailing list