<div dir="ltr">Hi team <div>we are running Keycloak 2.1.0-Final version using mongo DB but it is not working, we are getting the error below </div><div><br></div><div>ERROR [org.keycloak.broker.oidc.AbstractOAuth2IdentityProvider] (default task-3) Failed to make identity provider oauth callback: java.lang.RuntimeException: Property &#39;databaseSchema&#39; needs to be specified in the configuration<br></div><div><br></div><div>we have the correct configuration listed on the documentation, but it is not working </div><div><a href="https://keycloak.gitbooks.io/server-installation-and-configuration/content/v/2.1/topics/mongo.html">https://keycloak.gitbooks.io/server-installation-and-configuration/content/v/2.1/topics/mongo.html</a><br></div><div><br></div><div>We also see that other person got the same error, </div><div><a href="http://lists.jboss.org/pipermail/keycloak-user/2016-May/006007.html">http://lists.jboss.org/pipermail/keycloak-user/2016-May/006007.html</a></div><div><br></div><div><br></div><div>This is our keycloak-server.json configuration </div>







<div>







<p class="gmail-p1"><span class="gmail-s1">{</span></p>
<p class="gmail-p1"><span class="gmail-s1">    &quot;providers&quot;: [</span></p>
<p class="gmail-p1"><span class="gmail-s1">        &quot;classpath:${jboss.home.dir}/providers/*&quot;</span></p>
<p class="gmail-p1"><span class="gmail-s1">    ],</span></p>
<p class="gmail-p2"><span class="gmail-s1"></span><br></p>
<p class="gmail-p1"><span class="gmail-s1">    &quot;admin&quot;: {</span></p>
<p class="gmail-p1"><span class="gmail-s1">        &quot;realm&quot;: &quot;master&quot;</span></p>
<p class="gmail-p1"><span class="gmail-s1">    },</span></p>
<p class="gmail-p2"><span class="gmail-s1"></span><br></p>
<p class="gmail-p1"><span class="gmail-s1">    &quot;eventsStore&quot;: {</span></p>
<p class="gmail-p1"><span class="gmail-s1">        &quot;provider&quot;: &quot;mongo&quot;,</span></p>
<p class="gmail-p1"><span class="gmail-s1">        &quot;mongo&quot;: {</span></p>
<p class="gmail-p1"><span class="gmail-s1">            &quot;exclude-events&quot;: [ &quot;REFRESH_TOKEN&quot; ]</span></p>
<p class="gmail-p1"><span class="gmail-s1">        }</span></p>
<p class="gmail-p1"><span class="gmail-s1">    },</span></p>
<p class="gmail-p2"><span class="gmail-s1"></span><br></p>
<p class="gmail-p1"><span class="gmail-s1">    &quot;realm&quot;: {</span></p>
<p class="gmail-p1"><span class="gmail-s1">        &quot;provider&quot;: &quot;mongo&quot;</span></p>
<p class="gmail-p1"><span class="gmail-s1">    },</span></p>
<p class="gmail-p2"><span class="gmail-s1"></span><br></p>
<p class="gmail-p1"><span class="gmail-s1">    &quot;user&quot;: {</span></p>
<p class="gmail-p1"><span class="gmail-s1">        &quot;provider&quot;: &quot;mongo&quot;</span></p>
<p class="gmail-p1"><span class="gmail-s1">    },</span></p>
<p class="gmail-p2"><span class="gmail-s1"></span><br></p>
<p class="gmail-p1"><span class="gmail-s1">    &quot;userCache&quot;: {</span></p>
<p class="gmail-p1"><span class="gmail-s1">        &quot;default&quot; : {</span></p>
<p class="gmail-p1"><span class="gmail-s1">            &quot;enabled&quot;: true</span></p>
<p class="gmail-p1"><span class="gmail-s1">        }</span></p>
<p class="gmail-p1"><span class="gmail-s1">    },</span></p>
<p class="gmail-p2"><span class="gmail-s1"></span><br></p>
<p class="gmail-p1"><span class="gmail-s1">    &quot;userSessionPersister&quot;: {</span></p>
<p class="gmail-p1"><span class="gmail-s1">        &quot;provider&quot;: &quot;mongo&quot;</span></p>
<p class="gmail-p1"><span class="gmail-s1">    },</span></p>
<p class="gmail-p2"><span class="gmail-s1"></span><br></p>
<p class="gmail-p1"><span class="gmail-s1">    &quot;authorizationPersister&quot;: {</span></p>
<p class="gmail-p1"><span class="gmail-s1">        &quot;provider&quot;: &quot;mongo&quot;</span></p>
<p class="gmail-p1"><span class="gmail-s1">    },</span></p>
<p class="gmail-p2"><span class="gmail-s1"></span><br></p>
<p class="gmail-p1"><span class="gmail-s1">    &quot;timer&quot;: {</span></p>
<p class="gmail-p1"><span class="gmail-s1">        &quot;provider&quot;: &quot;basic&quot;</span></p>
<p class="gmail-p1"><span class="gmail-s1">    },</span></p>
<p class="gmail-p2"><span class="gmail-s1"></span><br></p>
<p class="gmail-p1"><span class="gmail-s1">    &quot;theme&quot;: {</span></p>
<p class="gmail-p1"><span class="gmail-s1">        &quot;staticMaxAge&quot;: 2592000,</span></p>
<p class="gmail-p1"><span class="gmail-s1">        &quot;cacheTemplates&quot;: true,</span></p>
<p class="gmail-p1"><span class="gmail-s1">        &quot;cacheThemes&quot;: true,</span></p>
<p class="gmail-p1"><span class="gmail-s1">        &quot;folder&quot;: {</span></p>
<p class="gmail-p1"><span class="gmail-s1">          &quot;dir&quot;: &quot;${jboss.home.dir}/themes&quot;</span></p>
<p class="gmail-p1"><span class="gmail-s1">        }</span></p>
<p class="gmail-p1"><span class="gmail-s1">    },</span></p>
<p class="gmail-p2"><span class="gmail-s1"></span><br></p>
<p class="gmail-p1"><span class="gmail-s1">    &quot;scheduled&quot;: {</span></p>
<p class="gmail-p1"><span class="gmail-s1">        &quot;interval&quot;: 900</span></p>
<p class="gmail-p1"><span class="gmail-s1">    },</span></p>
<p class="gmail-p2"><span class="gmail-s1"></span><br></p>
<p class="gmail-p1"><span class="gmail-s1">    &quot;connectionsHttpClient&quot;: {</span></p>
<p class="gmail-p1"><span class="gmail-s1">        &quot;default&quot;: {}</span></p>
<p class="gmail-p1"><span class="gmail-s1">    },</span></p>
<p class="gmail-p2"><span class="gmail-s1"></span><br></p>
<p class="gmail-p1"><span class="gmail-s1">    &quot;connectionsMongo&quot;: {</span></p>
<p class="gmail-p1"><span class="gmail-s1">        &quot;default&quot;: {</span></p>
<p class="gmail-p1"><span class="gmail-s1">            &quot;host&quot;: &quot;10.0.22.56&quot;,</span></p>
<p class="gmail-p1"><span class="gmail-s1">            &quot;port&quot;: &quot;27017&quot;,</span></p>
<p class="gmail-p1"><span class="gmail-s1">            &quot;db&quot;: &quot;ondbook&quot;,</span></p>
<p class="gmail-p1"><span class="gmail-s1">            &quot;user&quot;: &quot;appUser&quot;,</span></p>
<p class="gmail-p1"><span class="gmail-s1">            &quot;password&quot; : &quot;</span>password&quot;,</p>
<p class="gmail-p1"><span class="gmail-s1">            &quot;connectionsPerHost&quot;: 100,</span></p>
<p class="gmail-p1"><span class="gmail-s1">            &quot;databaseSchema&quot;: &quot;update&quot;,</span></p>
<p class="gmail-p1"><span class="gmail-s1">            &quot;schema&quot;: &quot;2.1.0.Final&quot;</span></p>
<p class="gmail-p1"><span class="gmail-s1">         }</span></p>
<p class="gmail-p1"><span class="gmail-s1">    },</span></p>
<p class="gmail-p2"><span class="gmail-s1"></span><br></p>
<p class="gmail-p1"><span class="gmail-s1">    &quot;realmCache&quot;: {</span></p>
<p class="gmail-p1"><span class="gmail-s1">        &quot;default&quot; : {</span></p>
<p class="gmail-p1"><span class="gmail-s1">            &quot;enabled&quot;: true</span></p>
<p class="gmail-p1"><span class="gmail-s1">        }</span></p>
<p class="gmail-p1"><span class="gmail-s1">    },</span></p>
<p class="gmail-p2"><span class="gmail-s1"></span><br></p>
<p class="gmail-p1"><span class="gmail-s1">    &quot;connectionsInfinispan&quot;: {</span></p>
<p class="gmail-p1"><span class="gmail-s1">        &quot;provider&quot;: &quot;default&quot;,</span></p>
<p class="gmail-p1"><span class="gmail-s1">        &quot;default&quot;: {</span></p>
<p class="gmail-p1"><span class="gmail-s1">            &quot;cacheContainer&quot; : &quot;java:comp/env/infinispan/Keycloak&quot;</span></p>
<p class="gmail-p1"><span class="gmail-s1">        }</span></p>
<p class="gmail-p1"><span class="gmail-s1">    }</span></p>
<p class="gmail-p1"><span class="gmail-s1">}</span></p><p class="gmail-p1"><span class="gmail-s1"><br></span></p><p class="gmail-p1"><span class="gmail-s1">Other problem is that we do not know why the logs is showing JPA connection when we config Mongo </span></p><p class="gmail-p1"><span class="gmail-s1"><br></span></p><p class="gmail-p1"><span class="gmail-s1">Caused by: java.lang.RuntimeException: Property &#39;databaseSchema&#39; needs to be specified in the configuration</span></p><p class="gmail-p1"><span class="gmail-s1"><span class="gmail-Apple-tab-span">        </span>at org.keycloak.connections.jpa.DefaultJpaConnectionProviderFactory.lazyInit(DefaultJpaConnectionProviderFactory.java:132)</span></p><p class="gmail-p1"><span class="gmail-s1"><span class="gmail-Apple-tab-span">        </span>at org.keycloak.connections.jpa.DefaultJpaConnectionProviderFactory.create(DefaultJpaConnectionProviderFactory.java:62)</span></p><p class="gmail-p1"><span class="gmail-s1">










</span></p><p class="gmail-p1"><span class="gmail-s1"><span class="gmail-Apple-tab-span">        </span>at org.keycloak.connections.jpa.DefaultJpaConnectionProviderFactory.create(DefaultJpaConnectionProviderFactory.java:50)</span></p><p class="gmail-p1"><span class="gmail-s1"><br></span></p><p class="gmail-p1">Could someone help us </p><p class="gmail-p1">Thanks </p><p class="gmail-p1">Francisco </p><p class="gmail-p1"><span class="gmail-s1"><br></span></p><p class="gmail-p1"><span class="gmail-s1"><br></span></p></div></div>