<div dir="ltr">Thank you very much for the help!</div><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Jul 11, 2015 at 12:23 PM, Marek Posolda <span dir="ltr">&lt;<a href="mailto:mposolda@redhat.com" target="_blank">mposolda@redhat.com</a>&gt;</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>np, I&#39;ve fixed the JSON import issue in
      latest master <a href="https://issues.jboss.org/browse/KEYCLOAK-1558" target="_blank">https://issues.jboss.org/browse/KEYCLOAK-1558</a> and
      also another related issue
      <a href="https://issues.jboss.org/browse/KEYCLOAK-1175" target="_blank">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 href="https://issues.jboss.org/browse/KEYCLOAK-1175" target="_blank">https://issues.jboss.org/browse/KEYCLOAK-1175</a> fix.
      But in 1.3.1 it won&#39;t yet work, so you need to start+stop first to
      ensure master realm is initialized<br>
      <br>
      Cheers,<br>
      Marek<div><div class="h5"><br>
      <br>
      On 11.7.2015 13:25, Dean Peterson wrote:<br>
    </div></div></div><div><div class="h5">
    <blockquote 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">&lt;<a href="mailto:mposolda@redhat.com" target="_blank">mposolda@redhat.com</a>&gt;</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&#39;ve already created JIRA <a 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><br>
                    <br>
                    On 10.7.2015 07:30, Dean Peterson wrote:<br>
                  </div>
                </div>
              </div>
              <blockquote type="cite">
                <div>
                  <div>
                    <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: {
                          &quot;serverUsed&quot; : &quot;kcdb/<a href="http://172.17.0.69:27017" target="_blank">172.17.0.69:27017</a>&quot; ,
                          &quot;nIndexesWas&quot; : 1 , &quot;ok&quot; : 0.0 , &quot;errmsg&quot; :
                          &quot;index not found with name
                          [realmId_1_name_1]&quot;}</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 (&quot;add&quot;) failed - address:
                          ([(&quot;deployment&quot; =&gt; &quot;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 href="mailto:keycloak-user@lists.jboss.org" target="_blank">keycloak-user@lists.jboss.org</a>
<a 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>
  </div></div></div>

</blockquote></div><br></div>