<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">np, I've fixed the JSON import issue in
latest master <a class="moz-txt-link-freetext" href="https://issues.jboss.org/browse/KEYCLOAK-1558">https://issues.jboss.org/browse/KEYCLOAK-1558</a> and
also another related issue
<a class="moz-txt-link-freetext" href="https://issues.jboss.org/browse/KEYCLOAK-1175">https://issues.jboss.org/browse/KEYCLOAK-1175</a> .<br>
<br>
You should still be able to import the JSON in Keycloak
1.3.1.Final if you do not import the JSON through admin console
but through the import mechanism. You need to:<br>
- Start keycloak against clean database (to ensure master realm is
created)<br>
- Stop keycloak<br>
- Start keycloak again with the system properties like:
-Dkeycloak.migration.action=import
-Dkeycloak.migration.provider=singleFile
-Dkeycloak.migration.file=/tmp/abecorn-realm.json<br>
<br>
In latest version you will be able to import directly into clean
DB because of <a class="moz-txt-link-freetext" href="https://issues.jboss.org/browse/KEYCLOAK-1175">https://issues.jboss.org/browse/KEYCLOAK-1175</a> fix.
But in 1.3.1 it won't yet work, so you need to start+stop first to
ensure master realm is initialized<br>
<br>
Cheers,<br>
Marek<br>
<br>
On 11.7.2015 13:25, Dean Peterson wrote:<br>
</div>
<blockquote
cite="mid:CAFGzvPmtsUMxO2mztXgOE6ZTg_vonf1A42cYct0PcjPeQDAVmw@mail.gmail.com"
type="cite">
<div dir="ltr">Thank you very much! I sent my JSON file to you in
another e-mail too. </div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On Sat, Jul 11, 2015 at 4:36 AM, Marek
Posolda <span dir="ltr"><<a moz-do-not-send="true"
href="mailto:mposolda@redhat.com" target="_blank">mposolda@redhat.com</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000">
<div>I've already created JIRA <a moz-do-not-send="true"
href="https://issues.jboss.org/browse/KEYCLOAK-1548"
target="_blank">https://issues.jboss.org/browse/KEYCLOAK-1548</a>
with the reference to the ML thread you created earlier.
Will look into it to have the fix for Keycloak 1.4
release.<br>
<br>
Marek
<div>
<div class="h5"><br>
<br>
On 10.7.2015 07:30, Dean Peterson wrote:<br>
</div>
</div>
</div>
<blockquote type="cite">
<div>
<div class="h5">
<div dir="ltr">I did a fresh install with mongodb
3.0 and everything worked fine running
1.3.1.Final. However, I need to upgrade from
1.2.0.Beta1 so I tried the same configuration with
everything except this time migrating the old
database data. I get the following error:<br>
<div><br>
</div>
<div>
<div><span style="white-space:pre-wrap"> </span>at
java.lang.reflect.Constructor.newInstance(Constructor.java:422)</div>
<div><span style="white-space:pre-wrap"> </span>at
org.jboss.resteasy.core.ConstructorInjectorImpl.construct(ConstructorInjectorImpl.java:148)</div>
<div><span style="white-space:pre-wrap"> </span>...
19 more</div>
<div>Caused by: java.lang.RuntimeException:
Failed to update database</div>
<div><span style="white-space:pre-wrap"> </span>at
org.keycloak.connections.mongo.updater.impl.DefaultMongoUpdaterProvider.update(DefaultMongoUpdaterProvider.java:90)</div>
<div><span style="white-space:pre-wrap"> </span>at
org.keycloak.connections.mongo.DefaultMongoConnectionFactoryProvider.lazyInit(DefaultMongoConnectionFactoryProvider.java:99)</div>
<div><span style="white-space:pre-wrap"> </span>...
36 more</div>
<div>Caused by:
com.mongodb.CommandFailureException: {
"serverUsed" : "kcdb/<a moz-do-not-send="true"
href="http://172.17.0.69:27017"
target="_blank">172.17.0.69:27017</a>" ,
"nIndexesWas" : 1 , "ok" : 0.0 , "errmsg" :
"index not found with name
[realmId_1_name_1]"}</div>
<div><span style="white-space:pre-wrap"> </span>at
com.mongodb.CommandResult.getException(CommandResult.java:71)</div>
<div><span style="white-space:pre-wrap"> </span>at
com.mongodb.CommandResult.throwOnError(CommandResult.java:110)</div>
<div><span style="white-space:pre-wrap"> </span>at
com.mongodb.DBCollection.dropIndexes(DBCollection.java:847)</div>
<div><span style="white-space:pre-wrap"> </span>at
com.mongodb.DBCollection.dropIndex(DBCollection.java:1349)</div>
<div><span style="white-space:pre-wrap"> </span>at
org.keycloak.connections.mongo.updater.impl.updates.Update1_2_0_CR1.convertApplicationsToClients(Update1_2_0_CR1.java:33)</div>
<div><span style="white-space:pre-wrap"> </span>at
org.keycloak.connections.mongo.updater.impl.updates.Update1_2_0_CR1.update(Update1_2_0_CR1.java:23)</div>
<div><span style="white-space:pre-wrap"> </span>at
org.keycloak.connections.mongo.updater.impl.DefaultMongoUpdaterProvider.update(DefaultMongoUpdaterProvider.java:79)</div>
<div><span style="white-space:pre-wrap"> </span>...
37 more</div>
<div><br>
</div>
<div>01:17:00,691 ERROR
[org.jboss.as.controller.management-operation]
(Controller Boot Thread) WFLYCTL0013:
Operation ("add") failed - address:
([("deployment" => "keycloak-server.</div>
</div>
<div><br>
</div>
<div><br>
</div>
<div>I mentioned this before and Stian was going
to look into it; at the time he thought it might
be due to using mongodb 3.0. However, mongodb
3.0 works fine with a fresh install.</div>
</div>
<br>
<fieldset></fieldset>
<br>
</div>
</div>
<pre>_______________________________________________
keycloak-user mailing list
<a moz-do-not-send="true" href="mailto:keycloak-user@lists.jboss.org" target="_blank">keycloak-user@lists.jboss.org</a>
<a moz-do-not-send="true" href="https://lists.jboss.org/mailman/listinfo/keycloak-user" target="_blank">https://lists.jboss.org/mailman/listinfo/keycloak-user</a></pre>
</blockquote>
<br>
</div>
</blockquote>
</div>
<br>
</div>
</blockquote>
<br>
</body>
</html>