<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 'databaseSchema' 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"> "providers": [</span></p>
<p class="gmail-p1"><span class="gmail-s1"> "classpath:${jboss.home.dir}/providers/*"</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"> "admin": {</span></p>
<p class="gmail-p1"><span class="gmail-s1"> "realm": "master"</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"> "eventsStore": {</span></p>
<p class="gmail-p1"><span class="gmail-s1"> "provider": "mongo",</span></p>
<p class="gmail-p1"><span class="gmail-s1"> "mongo": {</span></p>
<p class="gmail-p1"><span class="gmail-s1"> "exclude-events": [ "REFRESH_TOKEN" ]</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"> "realm": {</span></p>
<p class="gmail-p1"><span class="gmail-s1"> "provider": "mongo"</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"> "user": {</span></p>
<p class="gmail-p1"><span class="gmail-s1"> "provider": "mongo"</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"> "userCache": {</span></p>
<p class="gmail-p1"><span class="gmail-s1"> "default" : {</span></p>
<p class="gmail-p1"><span class="gmail-s1"> "enabled": 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"> "userSessionPersister": {</span></p>
<p class="gmail-p1"><span class="gmail-s1"> "provider": "mongo"</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"> "authorizationPersister": {</span></p>
<p class="gmail-p1"><span class="gmail-s1"> "provider": "mongo"</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"> "timer": {</span></p>
<p class="gmail-p1"><span class="gmail-s1"> "provider": "basic"</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"> "theme": {</span></p>
<p class="gmail-p1"><span class="gmail-s1"> "staticMaxAge": 2592000,</span></p>
<p class="gmail-p1"><span class="gmail-s1"> "cacheTemplates": true,</span></p>
<p class="gmail-p1"><span class="gmail-s1"> "cacheThemes": true,</span></p>
<p class="gmail-p1"><span class="gmail-s1"> "folder": {</span></p>
<p class="gmail-p1"><span class="gmail-s1"> "dir": "${jboss.home.dir}/themes"</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"> "scheduled": {</span></p>
<p class="gmail-p1"><span class="gmail-s1"> "interval": 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"> "connectionsHttpClient": {</span></p>
<p class="gmail-p1"><span class="gmail-s1"> "default": {}</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"> "connectionsMongo": {</span></p>
<p class="gmail-p1"><span class="gmail-s1"> "default": {</span></p>
<p class="gmail-p1"><span class="gmail-s1"> "host": "10.0.22.56",</span></p>
<p class="gmail-p1"><span class="gmail-s1"> "port": "27017",</span></p>
<p class="gmail-p1"><span class="gmail-s1"> "db": "ondbook",</span></p>
<p class="gmail-p1"><span class="gmail-s1"> "user": "appUser",</span></p>
<p class="gmail-p1"><span class="gmail-s1"> "password" : "</span>password",</p>
<p class="gmail-p1"><span class="gmail-s1"> "connectionsPerHost": 100,</span></p>
<p class="gmail-p1"><span class="gmail-s1"> "databaseSchema": "update",</span></p>
<p class="gmail-p1"><span class="gmail-s1"> "schema": "2.1.0.Final"</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"> "realmCache": {</span></p>
<p class="gmail-p1"><span class="gmail-s1"> "default" : {</span></p>
<p class="gmail-p1"><span class="gmail-s1"> "enabled": 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"> "connectionsInfinispan": {</span></p>
<p class="gmail-p1"><span class="gmail-s1"> "provider": "default",</span></p>
<p class="gmail-p1"><span class="gmail-s1"> "default": {</span></p>
<p class="gmail-p1"><span class="gmail-s1"> "cacheContainer" : "java:comp/env/infinispan/Keycloak"</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 'databaseSchema' 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>