Bug 996177
| Summary: | Errors in server log after unassigning and reassigning again the same LDAP group in role assignment UI | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | [JBoss] JBoss Operations Network | Reporter: | Sunil Kondkar <skondkar> | ||||||
| Component: | UI | Assignee: | Heiko W. Rupp <hrupp> | ||||||
| Status: | CLOSED CURRENTRELEASE | QA Contact: | Mike Foley <mfoley> | ||||||
| Severity: | high | Docs Contact: | |||||||
| Priority: | unspecified | ||||||||
| Version: | JON 3.2 | CC: | hrupp, myarboro | ||||||
| Target Milestone: | ER03 | ||||||||
| Target Release: | JON 3.2.0 | ||||||||
| Hardware: | Unspecified | ||||||||
| OS: | Unspecified | ||||||||
| Whiteboard: | |||||||||
| Fixed In Version: | Doc Type: | Bug Fix | |||||||
| Doc Text: | Story Points: | --- | |||||||
| Clone Of: | Environment: | ||||||||
| Last Closed: | 2014-01-02 20:35:25 UTC | Type: | Bug | ||||||
| Regression: | --- | Mount Type: | --- | ||||||
| Documentation: | --- | CRM: | |||||||
| Verified Versions: | Category: | --- | |||||||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||
| Cloudforms Team: | --- | Target Upstream Version: | |||||||
| Embargoed: | |||||||||
| Attachments: |
|
||||||||
|
Description
Sunil Kondkar
2013-08-12 15:09:27 UTC
Created attachment 785749 [details]
Screenshot-UI_Warning
Created attachment 785751 [details]
Server_log
20:24:44,556 WARN [org.hibernate.engine.jdbc.spi.SqlExceptionHelper] (http-/0.0.0.0:7080-2) SQL Error: 0, SQLState: 23505
20:24:44,556 ERROR [org.hibernate.engine.jdbc.spi.SqlExceptionHelper] (http-/0.0.0.0:7080-2) Batch entry 0 insert into RHQ_ROLE_LDAP_GROUP (LDAP_GROUP_NAME, ROLE_ID, ID) values ('sunilgroupad', 10001, 10011) was aborted. Call getNextException to see the cause.
20:24:44,556 WARN [org.hibernate.engine.jdbc.spi.SqlExceptionHelper] (http-/0.0.0.0:7080-2) SQL Error: 0, SQLState: 23505
20:24:44,556 ERROR [org.hibernate.engine.jdbc.spi.SqlExceptionHelper] (http-/0.0.0.0:7080-2) ERROR: duplicate key value violates unique constraint "rhq_role_ldap_group_idx"
20:24:44,578 ERROR [org.jboss.as.ejb3.invocation] (http-/0.0.0.0:7080-2) JBAS014134: EJB Invocation failed on component RoleManagerBean for method public abstract org.rhq.core.domain.authz.Role org.rhq.enterprise.server.authz.RoleManagerLocal.updateRole(org.rhq.core.domain.auth.Subject,org.rhq.core.domain.authz.Role):
/org/rhq/enterprise/server/authz/RoleManagerBean.java:468
for (LdapGroup ldapGroup : currentLdapGroups) {
if (!newLdapGroups.contains(ldapGroup)) {
attachedRole.removeLdapGroup(ldapGroup);
entityManager.remove(ldapGroup);
}
the contains() succeeds and thus the if (!contains()) fails and the block is not removing the old association. Then in the next block that group-role is attached again, but fails, as a group with that name still exits.
master 8e3e7bbe8ac0d Moving to ON_QA for testing. Verified on Version: 3.2.0.ER3 Build Number: c0742ed:cbad264 Followed the steps and verified that there are no errors in UI and server log after unassigning and reassigning again the same LDAP group in role assignment UI. |