That's a bug. It's failing on "if (rep.isServiceAccountsEnabled() ..)",
but serviceAccountsEnabled in the representation can be null, which would
result in this NPE.
Can you create a JIRA please? If you did a PR as well that'd be even better
:)
On 12 November 2015 at 10:58, Juraj Janosik <juraj.janosik77(a)gmail.com>
wrote:
Hi,
I want to announce an issue with "Update the client
<
http://keycloak.github.io/docs/rest-api/index.html#_update_the_client>...
via Admin REST API.
*Description:* I want to change the description for existing client #3.
*Note:* From the documentation ("Update the client
<
http://keycloak.github.io/docs/rest-api/index.html#_update_the_client>...),
body parameter attributes
are required in schema "ClientRepresentation".
Description of schema "ClientRepresentation" notes for any mandatory
attribute.
Are some parameters mandatory for successfuly running of this scenario ?
*Tested scenario:*
*Tested data:*
"Update Client":
"method":"PUT","url":"<URL>:<PORT>/auth/admin/realms/<REALM>/clients/3"
"headers":
[["Content-Type","application/json"],
["Authorization","Bearer <ACCESS_TOKEN>]]
"body":
"{
"id":"3",
"clientId":"testclient-3",
"name": "testclient-3",
"description": "TESTCLIENT-3 v.2"
}"
*Test Result:* Status Code: 500 Internal Server Error
*Some parts from console logs:*
10:35:31,591 ERROR [io.undertow.request] (default task-18) UT005023:
Exception handling request to /auth/admin/realms/universities/clients/3:
java.lang.RuntimeException: request path:
/auth/admin/realms/universities/clients/3
...
at
org.keycloak.services.filters.KeycloakSessionServletFilter.doFilter(KeycloakSessionServletFilter.java:61)
... 29 more
*Caused by: java.lang.NullPointerException*
at
org.keycloak.services.resources.admin.ClientResource.update(ClientResource.java:106)
Thanks a lot.
Best Regards,
Juraj
_______________________________________________
keycloak-user mailing list
keycloak-user(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/keycloak-user