errorjava.lang.IllegalArgumentException: duplicate 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
Symptoms
Requests to FishEye from
JIRA raises errors in FishEye's error log:
1
2
3
4
5
2012-01-13 11:57:16,057 ERROR [btpool0-21 ] com.sun.jersey.server.impl.application.WebApplicationImpl com.sun.jersey.server.impl.application.WebApplicationImpl-onException - Internal server errorjava.lang.IllegalArgumentException: duplicate key: YYY
at com.google.common.collect.RegularImmutableMap.<init>(RegularImmutableMap.java:62)
at com.google.common.collect.ImmutableMap$Builder.fromEntryList(ImmutableMap.java:212)
at com.google.common.collect.ImmutableMap$Builder.build(ImmutableMap.java:198)
at com.google.common.collect.Maps.uniqueIndex(Maps.java:476)
Cause
The problem happens when both Fisheye and Crucible have a repository and a project with the same key.
Resolution
As a quick workaround, we recommend having the Crucible project prefixed with "CR-". So if your Fisheye repository is YYY, your Crucible project should be CR-YYY to easily distinguish one over the other.
Alternatively, upgrading to Fisheye 2.7.10 or above would also fix this situation.
Was this helpful?