Group users = identityManager.lookupIdentityById(Group.class, "users"); RelationshipManager relationshipManager = this.partitionManager.createRelationshipManager(); BasicModel.addToGroup(relationshipManager, user, users);
If 'users' is null, a null group will be added, which later causes problems checking authorizations:
19:41:47,996 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/redoculous-io].[default]] (http-localhost/127.0.0.1:8080-4) JBWEB000236: Servlet.service() for servlet default threw exception: java.lang.NullPointerException at org.picketlink.idm.model.basic.BasicModel.isMember(BasicModel.java:188) [picketlink-idm-api-2.5.1.Final.jar:] at org.ocpsoft.redoculous.io.security.AuthorizationChecker.isMember(AuthorizationChecker.java:46) [classes:] at org.ocpsoft.redoculous.io.rewrite.SecurityConfiguration$1.evaluate(SecurityConfiguration.java:45) [classes:]
Relevant code: