Mantis - Resin
Viewing Issue Advanced Details
4862 minor random 11-20-11 23:12 11-22-11 10:43
closed 4.0.22  
none 4.0.25  
0004862: NullPointerException in AbstractCauchoRequest.getUserPrincipal()
NullPointerException in AbstractCauchoRequest.getUserPrincipal()
After looking at the source code which should looks like:

  public Principal getUserPrincipal()

    Principal user;
    user = (Principal) getAttribute(AbstractLogin.LOGIN_USER_NAME);

    if (user != null)
      return user;

    WebApp webApp = getWebApp();
    if (webApp == null)
      return null;

    // If the authenticator can find the user, return it.
    Login login = webApp.getLogin();

    if (login != null) {
      user = login.getUserPrincipal(this);

      if (user != null) {
      else {
        // server/123h, server/1920
        // distinguishes between setPrivateCache and setPrivateOrResinCache
        // _response.setPrivateOrResinCache(true);

    return user;

Is it possible that the getResponse() return null and cause this?
We got this NPE in one of our filter and none of our previous filters on stack trace have wrapped any request/response object.

There are no notes attached to this issue.