title: How to access keycloak with the admin-client?
body: <p>I'm trying to change roles of a user in keycloak with the keycloak-admin-client in a spring boot application, but I can't even instanciate keycloak.</p>
  
  <p>I'm trying to get the keycloak server here, but Im getting a InstantiationError</p>
  
  <pre><code>    String serverUrl = "http://localhost:8080/auth";
      String realm = "User-Service-Realm";
      String clientId = "admin-cli";
  
      Keycloak keycloak = Keycloak.getInstance(
        serverUrl,
        realm,
        "admin",
        "admin",
        clientId);
  </code></pre>
  
  <pre><code>Exception in thread "main" java.lang.InstantiationError: org.jboss.resteasy.client.jaxrs.ResteasyClientBuilder
      at org.keycloak.admin.client.Keycloak.&lt;init&gt;(Keycloak.java:58)
      at org.keycloak.admin.client.Keycloak.getInstance(Keycloak.java:106)
      at de.uni.stuttgart.isw.ccm.userservice.api.KeycloakAdminClientExample.main(KeycloakAdminClientExample.java:31)
  </code></pre>
  
  <p>Apparently its a problem with the admin-client itself, since the keycloak builder is based on the resteasyclientbuilder. 
  <img src="https://i.imgur.com/WJ4BJvp.png" alt=""></p>