<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
    <title></title>
  </head>
  <body text="#000000" bgcolor="#ffffff">
    Hi Balz<br>
    <br>
    I agree. Please give it a try with<br>
    <br>
    Sending       
    src/impl/java/org/wyona/yanel/impl/resources/BasicXMLResource.java<br>
    Transmitting file data .<br>
    Committed revision 60816.<br>
    <br>
    HTH<br>
    <br>
    Michael<br>
    <br>
    On 9/20/11 6:27 PM, basZero wrote:
    <blockquote
cite="mid:CAOXzDSF+i8tzodKWJJmz0wQwXBGcMcx9n9ZvbZO=cDMfpugxsw@mail.gmail.com"
      type="cite">maybe a hint:
      <div>where does the "identity" come from? how is it built?</div>
      <div>because:</div>
      <div>- at 3pm today i logged in with user A to our test system
        (cookies have been set in browser)</div>
      <div>- later I deployed a new version, from then on, the user A
        does not exist anymore in the new version (this is on purpose).</div>
      <div>- When I access the test system, the cookie is sent of course
        (containing the username A which does not exist anymore).
        Somehow, the system throws the NullPointer.</div>
      <div><br>
      </div>
      <div>My opinion is: the NullPointer should not be thrown, because
        the following "more legal" use case could happen easily:</div>
      <div><br>
      </div>
      <div>1. user A registers and logs in</div>
      <div>2. a sysadmin deletes for any reason user A</div>
      <div>3. user A comes back to the site.... boooom.</div>
      <div><br>
      </div>
      <div>Cheers</div>
      <div>Balz<br>
        <br>
        <div title="signature"> </div>
        <div class="gmail_quote">On Tue, Sep 20, 2011 at 6:19 PM,
          basZero <span dir="ltr"><<a moz-do-not-send="true"
              href="mailto:baszero@gmail.com">baszero@gmail.com</a>></span>
          wrote:<br>
          <blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt
            0.8ex; border-left: 1px solid rgb(204, 204, 204);
            padding-left: 1ex;">
            Hi Michael,
            <div>I've noticed a change in the BasicXMLResource, now my
              new version based on <b>r60815</b> is throwing a
              NullPointer exception while accessing any page of the
              realm.</div>
            <div><br>
            </div>
            <div>
              <div>2903 2011-09-20 18:08:34,671 [http-8380-1] ERROR
                org.wyona.yanel.impl.resources.BasicXMLResource.getXMLView():279
                 - java.lang.NullPointerException</div>
              <div>java.lang.NullPointerException</div>
              <div>        at
org.wyona.yanel.impl.resources.BasicXMLResource.getUserLanguage(BasicXMLResource.java:682)</div>
              <div><br>
              </div>
              <div><br>
              </div>
              <div><b>New code</b> in BasicXMLResource:</div>
              <div><br>
              </div>
              <div>
                <p>        String userID = identity.getUsername();</p>
                <p>        <span>if</span> (userID != <span>null</span>)
                  {</p>
                <p>            String userLanguage =
getRealm().getIdentityManager().getUserManager().getUser(userID).getLanguage();</p>
                <p><br>
                </p>
                <p>Cheers<br>
                  Balz</p>
              </div>
            </div>
            <div title="signature"> </div>
          </blockquote>
        </div>
        <br>
      </div>
    </blockquote>
    <br>
  </body>
</html>