-
Bug
-
Resolution: Tracked Elsewhere
-
Low
-
5.2
-
5.02
-
Symptom
Getting the following error when trying to view a profile page:
jiraschema.userhistoryitem (ID, entitytype, entityid, USERNAME, lastviewed, data) VALUES (?, ?, ?, ?, ?, ?) (Cannot insert duplicate key row in object 'jiraschema.userhistoryitem' with unique index 'uh_type_user_entity'.)) com.atlassian.jira.exception.DataAccessException: org.ofbiz.core.entity.GenericEntityException: while inserting: [GenericEntity:UserHistoryItem][id,10374][username,admin][data,null][entityId,admin][lastViewed,1350569188345][type,Assignee] (SQL Exception while executing the following:INSERT INTO jiraschema.userhistoryitem (ID, entitytype, entityid, USERNAME, lastviewed, data) VALUES (?, ?, ?, ?, ?, ?) (Cannot insert duplicate key row in object 'jiraschema.userhistoryitem' with unique index 'uh_type_user_entity'.)) at com.atlassian.jira.ofbiz.DefaultOfBizDelegator.createValue(DefaultOfBizDelegator.java:379) at com.atlassian.jira.user.OfBizUserHistoryStore.addHistoryItemNoChecks(OfBizUserHistoryStore.java:104) at com.atlassian.jira.user.CachingUserHistoryStore$2.run(CachingUserHistoryStore.java:94) at com.atlassian.util.concurrent.ManagedLocks$ManagedLockImpl.withLock(ManagedLocks.java:333) at com.atlassian.jira.user.CachingUserHistoryStore.addHistoryItem(CachingUserHistoryStore.java:84) at com.atlassian.jira.user.SessionBasedAnonymousUserHistoryStore$2.run(SessionBasedAnonymousUserHistoryStore.java:120) at com.atlassian.util.concurrent.ManagedLocks$ManagedLockImpl.withLock(ManagedLocks.java:333)
Cause
If a user's name changes case and you are connected to a database that does case insensitive comparison (e.g. MSSQL 2008 as setup following the steps on https://confluence.atlassian.com/x/CpX2Cw). The most common way for a user's name to change is for it to change in an external user directory where case is important (e.g. some LDAP servers).
Steps
- Setup JIRA to an LDAP directory.
- Create a user with username "testuser" in the internal JIRA directory.
- Login with username "testuser"
- Go to the user's profile page.
- Inside the LDAP directory, create a user "TestUser".
- Move the LDAP directory to the top.
- (BUG) Go to the current user's profile page. You will get the above exception.
- derived from
-
JRASERVER-26194 Mixed case username from LDAP still has a few problems
- Closed
- is cloned from
-
JRASERVER-27601 Mixed case username causes problems with UserHistory
- Closed
- is related to
-
JRASERVER-27590 Mixed case username from LDAP does not work with security schemes
- Closed
-
JRASERVER-27600 Mixed case username from LDAP causes problems in subscriptions
- Closed
- relates to
-
JRASERVER-26441 Mixed case username from LDAP doesn't match existing Dashboards
- Closed
- discovered while testing
-
JRADEV-15907 Loading...
- duplicates
-
JRADEV-15778 Loading...
-
JRADEV-15974 Loading...
- is caused by
-
JRADEV-14960 Loading...
- mentioned in
-
Wiki Page Loading...