<div dir="ltr">Hi,<div><br></div><div>Regarding to this issue, I've tried to create the "authorization scope" via the admin GUI manually and found strange behavior as the following:-</div><div><br></div><div>1. Create the scope with name as urn:photoz.com:scopes:album:view</div><div>2. Click save</div><div>3. The system should the success, the scope has been created.</div><div>4. Go back to the "authorization scope", there is no any displayed scope.</div><div><br></div><div>Then I've tried to create again as the following:-</div><div><br></div><div>1. Create the scope with name as aaa</div><div><div>2. Click save</div><div>3. The system should the success, the scope has been created.</div><div>4. Go back to the "authorization scope", the aaa is displayed.</div><div>5. Click the aaa to edit</div><div>6. Change name from aaa to urn:photoz.com:scopes:album:view</div><div>7. The system should the success, the scope has been created.</div><div>8. Go back to the "authorization scope", the urn:photoz.com:scopes:album:view is displayed.</div><div><br></div><div>Anyhow I cannot find how to delete the created scoped as well. </div><div><br></div><div><br></div><div>I'm not sure if I'm doing something wrong or not. Could you please help to advise further?</div><div><br></div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><font face="Tahoma"><span style="font-size:10pt;font-family:Tahoma;color:rgb(153,102,51)"><font color="#000000">--</font></span></font></div><font face="Tahoma"><span style="font-size:10pt;font-family:Tahoma;color:rgb(153,102,51)"><font color="#000000"> Best Regards,<br><br>
                                                         Charlee Ch</font></span></font></div></div></div>
<br><div class="gmail_quote">2016-07-05 17:12 GMT+07:00 Charlee Chitsuk <span dir="ltr"><<a href="mailto:charlee.ch@gmail.com" target="_blank">charlee.ch@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div><br></div><div>Hi,</div><div><br></div><div>I try to follow the authorization photoz example[1]. I can import the realm[2] to the keycloak properly.</div><div><br></div><div>Anyhow when importing the authorization json[3] there is a misconfiguration about the drools policy as the "mavenArtifactVersion" should be "2.0.0.Final".</div><div><br></div><div>After correcting the version, sadly there is another failure during the importing the authorization json[3] as</div><div><br></div><div><div>ERROR [io.undertow.request] (default task-100) UT005023: </div><div>Exception handling request to /auth/admin/realms/photoz/clients/001e0705-8bc6-47de-b408-dd07a5ebba9b/authz/resource-server: </div><div>org.jboss.resteasy.spi.UnhandledException: java.lang.IllegalStateException: Not found in database</div><div><span style="white-space:pre-wrap">        </span>at org.jboss.resteasy.core.ExceptionHandler.handleApplicationException(ExceptionHandler.java:76)<br></div></div><div> .....</div><div><div>Caused by: java.lang.IllegalStateException: Not found in database</div><div><span style="white-space:pre-wrap">        </span>at org.keycloak.models.authorization.infinispan.CachedScopeStore$1.getDelegateForUpdate(CachedScopeStore.java:175)</div></div><div><br></div><div>Could you please help to advise how to fix this issue? Thank you very much for your help in advance. I'm looking forward to hearing from you soon.</div><div><br></div><div><br></div><div>[1] <a href="https://github.com/keycloak/keycloak/tree/master/examples/authz/photoz" target="_blank">https://github.com/keycloak/keycloak/tree/master/examples/authz/photoz</a></div><div><br></div><div>[2] <a href="https://github.com/keycloak/keycloak/blob/master/examples/authz/photoz/photoz-realm.json" target="_blank">https://github.com/keycloak/keycloak/blob/master/examples/authz/photoz/photoz-realm.json</a></div><div><br></div><div>[3] <a href="https://github.com/keycloak/keycloak/blob/master/examples/authz/photoz/photoz-restful-api-authz-service.json" target="_blank">https://github.com/keycloak/keycloak/blob/master/examples/authz/photoz/photoz-restful-api-authz-service.json</a></div><br clear="all"><div><div data-smartmail="gmail_signature"><div dir="ltr"><div><font face="Tahoma"><span style="font-size:10pt;font-family:Tahoma;color:rgb(153,102,51)"><font color="#000000">--</font></span></font></div><font face="Tahoma"><span style="font-size:10pt;font-family:Tahoma;color:rgb(153,102,51)"><font color="#000000"> Best Regards,<br><br>
                                                         Charlee Ch</font></span></font></div></div></div>
</div>
</blockquote></div><br></div></div></div>