java.lang.IllegalArgumentException: Duplicate keys in mappings com.atlassian.bamboo.plan.branch.ChainBranchImpl@b2172046=0 and com.atlassian.bamboo.plan.branch.ChainBranchImpl@38c544dc=0

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • steps to reproduce: 1) create new plan, let's call it P1 2) create second plan, let's call it P2 3) create a new branch for plan P1, as a name use "branch" 4) create a new branch for plan P2, as a name use the same "branch" 5) admin->system->indexing->full_reindex->perform 6a) Error message appears: {panel:bgColor=#FFCECE} (-) *Indexing operation failed - errors occurred while indexing.: java.lang.IllegalArgumentException: Duplicate keys in mappings com.atlassian.bamboo.plan.branch.ChainBranchImpl@b2172046=0 and com.atlassian.bamboo.plan.branch.ChainBranchImpl@38c544dc=0* {panel} 6b) not sure what is the expected behavior... should we allow indexing multiple branches with the same name? ---- stacktrace: {noformat} java.lang.IllegalArgumentException: Duplicate keys in mappings com.atlassian.bamboo.plan.branch.ChainBranchImpl@b2172046=0 and com.atlassian.bamboo.plan.branch.ChainBranchImpl@38c544dc=0 at com.google.common.collect.ImmutableSortedMap.validateEntries(ImmutableSortedMap.java:285) at com.google.common.collect.ImmutableSortedMap.copyOfInternal(ImmutableSortedMap.java:262) at com.google.common.collect.ImmutableSortedMap.copyOf(ImmutableSortedMap.java:201) at com.atlassian.bamboo.index.DefaultBuildResultsIndexer.reindexAll(DefaultBuildResultsIndexer.java:71) at com.atlassian.bamboo.index.ReindexAction.execute(ReindexAction.java:68) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) {noformat} ---- relevant part (DefaultBuildResultsIndexer.java:71): {code} ImmutableSortedMap<Plan, Long> sortedPlanMap = ImmutableSortedMap.copyOf(planMap, Ordering.natural().onResultOf(Functions.forMap(planMap)).reverse().compound(getPlanNameProviderCaseInsensitiveOrdering())); {code}
    via by Piotr Stefan Stefaniak [Atlassian],
  • steps to reproduce: 1) create new plan, let's call it P1 2) create second plan, let's call it P2 3) create a new branch for plan P1, as a name use "branch" 4) create a new branch for plan P2, as a name use the same "branch" 5) admin->system->indexing->full_reindex->perform 6a) Error message appears: {panel:bgColor=#FFCECE} (-) *Indexing operation failed - errors occurred while indexing.: java.lang.IllegalArgumentException: Duplicate keys in mappings com.atlassian.bamboo.plan.branch.ChainBranchImpl@b2172046=0 and com.atlassian.bamboo.plan.branch.ChainBranchImpl@38c544dc=0* {panel} 6b) not sure what is the expected behavior... should we allow indexing multiple branches with the same name? ---- stacktrace: {noformat} java.lang.IllegalArgumentException: Duplicate keys in mappings com.atlassian.bamboo.plan.branch.ChainBranchImpl@b2172046=0 and com.atlassian.bamboo.plan.branch.ChainBranchImpl@38c544dc=0 at com.google.common.collect.ImmutableSortedMap.validateEntries(ImmutableSortedMap.java:285) at com.google.common.collect.ImmutableSortedMap.copyOfInternal(ImmutableSortedMap.java:262) at com.google.common.collect.ImmutableSortedMap.copyOf(ImmutableSortedMap.java:201) at com.atlassian.bamboo.index.DefaultBuildResultsIndexer.reindexAll(DefaultBuildResultsIndexer.java:71) at com.atlassian.bamboo.index.ReindexAction.execute(ReindexAction.java:68) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) {noformat} ---- relevant part (DefaultBuildResultsIndexer.java:71): {code} ImmutableSortedMap<Plan, Long> sortedPlanMap = ImmutableSortedMap.copyOf(planMap, Ordering.natural().onResultOf(Functions.forMap(planMap)).reverse().compound(getPlanNameProviderCaseInsensitiveOrdering())); {code}
    via by Piotr Stefan Stefaniak [Atlassian],
  • Duplicate keys in mappings
    via GitHub by Prometheius
    ,
    • java.lang.IllegalArgumentException: Duplicate keys in mappings com.atlassian.bamboo.plan.branch.ChainBranchImpl@b2172046=0 and com.atlassian.bamboo.plan.branch.ChainBranchImpl@38c544dc=0 at com.google.common.collect.ImmutableSortedMap.validateEntries(ImmutableSortedMap.java:285) at com.google.common.collect.ImmutableSortedMap.copyOfInternal(ImmutableSortedMap.java:262) at com.google.common.collect.ImmutableSortedMap.copyOf(ImmutableSortedMap.java:201) at com.atlassian.bamboo.index.DefaultBuildResultsIndexer.reindexAll(DefaultBuildResultsIndexer.java:71) at com.atlassian.bamboo.index.ReindexAction.execute(ReindexAction.java:68) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597)
    No Bugmate found.