<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <div class="moz-cite-prefix">Funny.&nbsp; I just ran into that exact NPE
      yesterday but I thought it was a state that was caused by my new
      code.&nbsp; So I only fixed it in that one representation class.&nbsp; But
      I'm not ready to merge that yet.<br>
      <br>
      We really need to go through all the representations and set
      defaults for all instance variables of type Boolean.&nbsp; It's
      probably rare that we would want that default to be null.&nbsp; Even if
      it should be null we should say so explicitly.<br>
      <br>
      Stan<br>
      <br>
      On 11/12/2015 5:42 AM, Stian Thorgersen wrote:<br>
    </div>
    <blockquote
cite="mid:CAJgngAdsczsJ0crhJLd7KYK=2-NYmu6gJEF0Kadp0o1Y-fr4DA@mail.gmail.com"
      type="cite">
      <div dir="ltr">That's a bug. It's failing on "if
        (rep.isServiceAccountsEnabled() ..)", but&nbsp;serviceAccountsEnabled
        in the representation can be null, which would result in this
        NPE.
        <div><br>
        </div>
        <div>Can you create a JIRA please? If you did a PR as well
          that'd be even better :)</div>
      </div>
      <div class="gmail_extra"><br>
        <div class="gmail_quote">On 12 November 2015 at 10:58, Juraj
          Janosik <span dir="ltr">&lt;<a moz-do-not-send="true"
              href="mailto:juraj.janosik77@gmail.com" target="_blank">juraj.janosik77@gmail.com</a>&gt;</span>
          wrote:<br>
          <blockquote class="gmail_quote" style="margin:0 0 0
            .8ex;border-left:1px #ccc solid;padding-left:1ex">
            <div dir="ltr">
              <div>
                <div>
                  <div>
                    <div>
                      <div>
                        <div>
                          <div>Hi,<br>
                            <br>
                          </div>
                          I want to announce an issue with "<a
                            moz-do-not-send="true"
href="http://keycloak.github.io/docs/rest-api/index.html#_update_the_client"
                            target="_blank">Update the client</a>" via
                          Admin REST API.<br>
                        </div>
                        <div><br>
                          <u>Description:</u> I want to change the
                          description for existing client #3.<br>
                          <br>
                          <u>Note:</u> From the documentation ("<a
                            moz-do-not-send="true"
href="http://keycloak.github.io/docs/rest-api/index.html#_update_the_client"
                            target="_blank">Update the client</a>"),
                          body parameter attributes <br>
                          are required in schema "ClientRepresentation".<br>
                        </div>
                        <div>Description of schema
                          "ClientRepresentation" notes for any mandatory
                          attribute.<br>
                          <br>
                          Are some parameters mandatory for successfuly
                          running of this scenario ?<br>
                          <br>
                        </div>
                        <u>Tested scenario:</u><br>
                        <u>Tested data:</u><br>
                        "Update Client":<br>
"method":"PUT","url":"&lt;URL&gt;:&lt;PORT&gt;/auth/admin/realms/&lt;REALM&gt;/clients/3"<br>
                        <div>"headers":<br>
                          [["Content-Type","application/json"],<br>
                          <div>["Authorization","Bearer
                            &lt;ACCESS_TOKEN&gt;]]</div>
                        </div>
                        <div>"body":<br>
                          "{<br>
                          "id":"3",<br>
                          "clientId":"testclient-3",<br>
                          "name": "testclient-3",<br>
                          "description": "TESTCLIENT-3 v.2"<br>
                          }"<br>
                        </div>
                        <br>
                      </div>
                      <u>Test Result:</u> Status Code: 500 Internal
                      Server Error<br>
                      <br>
                    </div>
                    <u>Some parts from console logs:</u><br>
                    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<br>
                    ...<br>
                    &nbsp;&nbsp;&nbsp; at
org.keycloak.services.filters.KeycloakSessionServletFilter.doFilter(KeycloakSessionServletFilter.java:61)<br>
                    &nbsp;&nbsp;&nbsp; ... 29 more<br>
                    <b>Caused by: java.lang.NullPointerException</b><br>
                    &nbsp;&nbsp;&nbsp; at
org.keycloak.services.resources.admin.ClientResource.update(ClientResource.java:106)<br>
                    <br>
                    <br>
                  </div>
                  Thanks a lot.<br>
                  <br>
                </div>
                Best Regards,<br>
              </div>
              Juraj<br>
              <div>
                <div>
                  <div>
                    <div>
                      <div>
                        <div><br>
                          <br>
                        </div>
                      </div>
                    </div>
                  </div>
                </div>
              </div>
            </div>
            <br>
            _______________________________________________<br>
            keycloak-user mailing list<br>
            <a moz-do-not-send="true"
              href="mailto:keycloak-user@lists.jboss.org">keycloak-user@lists.jboss.org</a><br>
            <a moz-do-not-send="true"
              href="https://lists.jboss.org/mailman/listinfo/keycloak-user"
              rel="noreferrer" target="_blank">https://lists.jboss.org/mailman/listinfo/keycloak-user</a><br>
          </blockquote>
        </div>
        <br>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
keycloak-user mailing list
<a class="moz-txt-link-abbreviated" href="mailto:keycloak-user@lists.jboss.org">keycloak-user@lists.jboss.org</a>
<a class="moz-txt-link-freetext" href="https://lists.jboss.org/mailman/listinfo/keycloak-user">https://lists.jboss.org/mailman/listinfo/keycloak-user</a></pre>
    </blockquote>
    <br>
  </body>
</html>