0 Replies Latest reply on Apr 21, 2008 12:25 PM by Steve Sether

    request.isUserInRole() returns NULL in Jboss 5, beta 4.

    Steve Sether Newbie

      I'm experiencing a NPE in Jboss 5 when I try to check the request for a specific role. Example code below:

      if (request.isUserInRole("Employee"))
      System.out.println("not employee role");
      else
      System.out.println("employee role");
      }

      returns:
      java.lang.NullPointerException
      org.jboss.web.tomcat.security.JBossWebRealm.hasRole(JBossWebRealm.java:528)
      org.apache.catalina.connector.Request.isUserInRole(Request.java:2184)

      This is through the container performing the authentication. The same method works fine under Jboss 4.0.3SP1, but migrating to Jboss 5 gives this error.

      I know my roles are available, as accessing role information through SecurityAssociation works fine.

      Any help would be appreciated. I'm unsure if this is a configuration error, or an error in Jboss 5.