Users unable to login to Fisheye due to java.lang.IllegalArgumentException: Multiple entries with same key
Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.
Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Except Fisheye and Crucible
Summary
When users attempt to log in to Fisheye/Crucible, they are redirected back to the login page and cannot access the instance.
Environment
Fisheye/Crucible
External user directory (e.g. Jira, LDAP and etc)
Diagnosis
There are multiple stacktraces in the logs of the form:
1
2
3
4
5
6
7
8
9
10
11
12
13
DATE time WARN [qtp478489615-283528 ] fisheye DefaultUserManager-validateCurrentUser - Problem logging user out
com.google.common.util.concurrent.UncheckedExecutionException: com.google.common.util.concurrent.UncheckedExecutionException: java.lang.IllegalArgumentException: Multiple entries with same key: userA=com.atlassian.crowd.model.user.InternalUser@xxx[id=xxx,name=userA ,xxxxx] and userA=com.atlassian.crowd.model.user.InternalUser@xxx[id=xxxx,name=userA,xxxxxx]
at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2203) [guava-18.0.jar:?]
at com.google.common.cache.LocalCache.get(LocalCache.java:3937) [guava-18.0.jar:?]
at com.google.common.cache.LocalCache.getOrLoad(LocalCache.java:3941) [guava-18.0.jar:?]
at com.google.common.cache.LocalCache$LocalLoadingCache.get(LocalCache.java:4824) [guava-18.0.jar:?]
at com.google.common.cache.LocalCache$LocalLoadingCache.getUnchecked(LocalCache.java:4830) [guava-18.0.jar:?]
at com.atlassian.fisheye.user.permissions.cache.SyncGlobalPermissionCache.getUsersWithPermission(SyncGlobalPermissionCache.java:57) [fisheye.jar:?]
at com.atlassian.fisheye.user.permissions.DefaultGlobalPermissionManager.getUsersWithPermission(DefaultGlobalPermissionManager.java:84) [fisheye.jar:?]
at com.atlassian.fisheye.user.permissions.DefaultGlobalPermissionManager.hasPermission(DefaultGlobalPermissionManager.java:65) [fisheye.jar:?]
at sun.reflect.GeneratedMethodAccessor662.invoke(Unknown Source) [?:?]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImp
.......
Cause
Note the format of the 2 entries: userA and userA[whitespace]:
1
Multiple entries with same key: userA=com.atlassian.crowd.model.user.InternalUser@xxx[id=xxx,name=userA ,xxxxx] and userA=com.atlassian.crowd.model.user.InternalUser@a48dc1a[id=xxxx,name=userA,xxxxxx]
Fisheye trims whitespaces to construct the index of unique user names.
When constructing the index it throws the error since it finds 2 identical keys, after trimming the whitespace from one of the account names
The multiple key exception then affects the login for all users due to an internal consistency check.
Solution
Rename one of the users in the external directory (don't just remove the whitespace, to avoid a database constraint violation).
Was this helpful?