1 Reply Latest reply on Mar 17, 2009 9:04 PM by Ron DiFrango

    Active Directory Role Creation

    Ron DiFrango Newbie

      I have my JBoss Portal instance configured to login with my Active directory server. When I go to create new roles I get the following exception:

      Caused by: org.jboss.portal.identity.IdentityException: Failed to create role
       at org.jboss.portal.identity.ldap.LDAPRoleModuleImpl.createRole(LDAPRoleModuleImpl.java:211)
       at org.jboss.portal.core.identity.cache.CachedLDAPRoleModuleWrapper.createRole(CachedLDAPRoleModuleWrapper.java:107)
       at org.hhmi.integration.projects.ProjectsServiceImpl.createRoles(ProjectsServiceImpl.java:127)
       ... 229 more
      Caused by: javax.naming.directory.SchemaViolationException: [LDAP: error code 65 - 0000207C: UpdErr: DSID-03150F6B, problem 6002 (OBJ_CLASS_VIOLATION), data 0

        • 1. Re: Active Directory Role Creation
          Ron DiFrango Newbie

          Not sure why, but my code got cut off and anything after my code block.

          // See: http://docs.jboss.org/jbportal/v2.2/javadoc/org/jboss/portal/core/modules/RoleModule.html#createRole(java.lang.String,%20java.lang.String)
           // name - the role name
           // displayName - the role display name
           for (Projects.ProjectRoles roles : Projects.ProjectRoles.values())
           StringBuilder roleName = new StringBuilder("project_");
           Role role = roleModule.createRole(roleName.toString(), roleName.toString());
           // Now add the site owner to the manager role
           if (roles.equals(Projects.ProjectRoles.MANAGER))
           User user = userModule.findUserByUserName(site.getSiteOwner());
           Set<User> set = new TreeSet<User>();
           membershipModule.assignUsers(role, set);