title: Failed adding user by keycloak-admin-client to Keycloak due to "unknown resource"
body: <p>I tried to use keycloak-admin-client in Java code like below, and then I got exceptions. From the exceptions, it looks like that it failed in constructing the API URL, even before reaching Keycloak. Does anybody have idea why this happened?</p>
  
  <p>I am running Keycloak inside a docker container and exposed port 8078. </p>
  
  <pre><code>public static void main(String ... args) {
          Keycloak kc = KeycloakBuilder.builder()
                  .serverUrl("http://localhost:8078/auth")
                  .realm("master")
                  .username("admin")
                  .password("admin")
                  .clientId("admin-cli")
                  .resteasyClient(new ResteasyClientBuilder().connectionPoolSize(10).build())
                  .build();
          CredentialRepresentation credential = new CredentialRepresentation();
          credential.setType(CredentialRepresentation.PASSWORD);
          credential.setValue("test123");
          UserRepresentation user = new UserRepresentation();
          user.setUsername("testuser");
          user.setFirstName("Test");
          user.setLastName("User");
          user.setEnabled(true);
          user.setCredentials(Arrays.asList(credential));
          kc.realm("master").users().create(user);
  }
  </code></pre>
  
  <p>Exception:</p>
  
  <pre><code>java.lang.reflect.InvocationTargetException
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:497)
      at org.codehaus.mojo.exec.ExecJavaMojo$1.run(ExecJavaMojo.java:294)
      at java.lang.Thread.run(Thread.java:745)
  Caused by: java.lang.NoSuchMethodError: javax.ws.rs.core.UriBuilder.resolveTemplates(Ljava/util/Map;)Ljavax/ws/rs/core/UriBuilder;
      at org.jboss.resteasy.client.jaxrs.internal.ClientWebTarget.resolveTemplates(ClientWebTarget.java:158)
      at org.jboss.resteasy.client.jaxrs.internal.proxy.SubResourceInvoker.invoke(SubResourceInvoker.java:65)
      at org.jboss.resteasy.client.jaxrs.internal.proxy.ClientProxy.invoke(ClientProxy.java:76)
      at com.sun.proxy.$Proxy39.realm(Unknown Source)
      at org.keycloak.admin.client.Keycloak.realm(Keycloak.java:71)
      at com.gallagher.security.keycloak.client.Program.main(Program.java:76)
  </code></pre>