[jboss-user] [Security & JAAS/JBoss] - request.isUserInRole() returns NULL in Jboss 5, beta 4.
Vellmont
do-not-reply at jboss.com
Mon Apr 21 12:25:43 EDT 2008
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.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4145586#4145586
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4145586
More information about the jboss-user
mailing list