java.lang.IllegalArgumentException: duplicate key: likedBy

Atlassian JIRA | Pierre-Etienne Poirot [Atlassian] | 2 years ago
tip
Do you know that we can give you better hits? Get more relevant results from Samebug’s stack trace search.
  1. 0

    {{FlatteningCommentPropertyProvider}} does not deduplicate the comments when 'flattening' the {{CommentPropertyContext}}. As a result, descendants of that SPI class can provide properties for the same comments multiple times which creates {{IllegalArgumentException: duplicate key}} when the properties are added to the comment. For example: {noformat} java.lang.IllegalArgumentException: duplicate key: likedBy at com.google.common.base.Preconditions.checkArgument(Preconditions.java:115) ~[guava-11.0.2-atlassian-02.jar:na] at com.google.common.collect.RegularImmutableMap.<init>(RegularImmutableMap.java:72) ~[guava-11.0.2-atlassian-02.jar:na] at com.google.common.collect.ImmutableMap$Builder.fromEntryList(ImmutableMap.java:245) ~[guava-11.0.2-atlassian-02.jar:na] at com.google.common.collect.ImmutableMap$Builder.build(ImmutableMap.java:231) ~[guava-11.0.2-atlassian-02.jar:na] at com.atlassian.stash.property.PropertyMap$Builder.build(PropertyMap.java:160) ~[stash-api-3.7.0-SNAPSHOT.jar:na] at com.atlassian.stash.internal.content.AbstractProviderContext.getPropertiesFor(AbstractProviderContext.java:56) ~[stash-service-impl-3.7.0-SNAPSHOT.jar:na] at com.atlassian.stash.internal.comment.PluginCommentPostProcessor$Enricher.apply(PluginCommentPostProcessor.java:163) ~[stash-service-impl-3.7.0-SNAPSHOT.jar:na] at com.atlassian.stash.internal.comment.PluginCommentPostProcessor$Enricher.apply(PluginCommentPostProcessor.java:152) ~[stash-service-impl-3.7.0-SNAPSHOT.jar:na] at com.atlassian.stash.internal.comment.PluginCommentPostProcessor$Enricher.apply(PluginCommentPostProcessor.java:143) ~[stash-service-impl-3.7.0-SNAPSHOT.jar:na] at com.google.common.collect.Lists$TransformingRandomAccessList.get(Lists.java:451) ~[guava-11.0.2-atlassian-02.jar:na] at java.util.AbstractList$Itr.next(AbstractList.java:358) ~[na:1.8.0_31] at java.util.AbstractCollection.toArray(AbstractCollection.java:141) ~[na:1.8.0_31] at com.google.common.collect.ImmutableList.copyFromCollection(ImmutableList.java:290) ~[guava-11.0.2-atlassian-02.jar:na] at com.google.common.collect.ImmutableList.copyOf(ImmutableList.java:247) ~[guava-11.0.2-atlassian-02.jar:na] at com.atlassian.stash.internal.comment.PluginCommentPostProcessor.processAll(PluginCommentPostProcessor.java:79) ~[stash-service-impl-3.7.0-SNAPSHOT.jar:na] at com.atlassian.stash.internal.pull.comment.CompositeCommentPostProcessor.processAll(CompositeCommentPostProcessor.java:45) ~[stash-service-impl-3.7.0-SNAPSHOT.jar:na] at com.atlassian.stash.internal.pull.comment.CommentPullRequestActivityEnricher.enrich(CommentPullRequestActivityEnricher.java:96) ~[stash-service-impl-3.7.0-SNAPSHOT.jar:na] at com.atlassian.stash.internal.pull.DefaultPullRequestService.enrichActivities(DefaultPullRequestService.java:1207) ~[stash-service-impl-3.7.0-SNAPSHOT.jar:na] at com.atlassian.stash.internal.pull.DefaultPullRequestService.enrichActivities(DefaultPullRequestService.java:1200) ~[stash-service-impl-3.7.0-SNAPSHOT.jar:na] at com.atlassian.stash.internal.pull.DefaultPullRequestService.searchActivities(DefaultPullRequestService.java:791) ~[stash-service-impl-3.7.0-SNAPSHOT.jar:na] {noformat}

    Atlassian JIRA | 2 years ago | Pierre-Etienne Poirot [Atlassian]
    java.lang.IllegalArgumentException: duplicate key: likedBy
  2. 0

    {{FlatteningCommentPropertyProvider}} does not deduplicate the comments when 'flattening' the {{CommentPropertyContext}}. As a result, descendants of that SPI class can provide properties for the same comments multiple times which creates {{IllegalArgumentException: duplicate key}} when the properties are added to the comment. For example: {noformat} java.lang.IllegalArgumentException: duplicate key: likedBy at com.google.common.base.Preconditions.checkArgument(Preconditions.java:115) ~[guava-11.0.2-atlassian-02.jar:na] at com.google.common.collect.RegularImmutableMap.<init>(RegularImmutableMap.java:72) ~[guava-11.0.2-atlassian-02.jar:na] at com.google.common.collect.ImmutableMap$Builder.fromEntryList(ImmutableMap.java:245) ~[guava-11.0.2-atlassian-02.jar:na] at com.google.common.collect.ImmutableMap$Builder.build(ImmutableMap.java:231) ~[guava-11.0.2-atlassian-02.jar:na] at com.atlassian.stash.property.PropertyMap$Builder.build(PropertyMap.java:160) ~[stash-api-3.7.0-SNAPSHOT.jar:na] at com.atlassian.stash.internal.content.AbstractProviderContext.getPropertiesFor(AbstractProviderContext.java:56) ~[stash-service-impl-3.7.0-SNAPSHOT.jar:na] at com.atlassian.stash.internal.comment.PluginCommentPostProcessor$Enricher.apply(PluginCommentPostProcessor.java:163) ~[stash-service-impl-3.7.0-SNAPSHOT.jar:na] at com.atlassian.stash.internal.comment.PluginCommentPostProcessor$Enricher.apply(PluginCommentPostProcessor.java:152) ~[stash-service-impl-3.7.0-SNAPSHOT.jar:na] at com.atlassian.stash.internal.comment.PluginCommentPostProcessor$Enricher.apply(PluginCommentPostProcessor.java:143) ~[stash-service-impl-3.7.0-SNAPSHOT.jar:na] at com.google.common.collect.Lists$TransformingRandomAccessList.get(Lists.java:451) ~[guava-11.0.2-atlassian-02.jar:na] at java.util.AbstractList$Itr.next(AbstractList.java:358) ~[na:1.8.0_31] at java.util.AbstractCollection.toArray(AbstractCollection.java:141) ~[na:1.8.0_31] at com.google.common.collect.ImmutableList.copyFromCollection(ImmutableList.java:290) ~[guava-11.0.2-atlassian-02.jar:na] at com.google.common.collect.ImmutableList.copyOf(ImmutableList.java:247) ~[guava-11.0.2-atlassian-02.jar:na] at com.atlassian.stash.internal.comment.PluginCommentPostProcessor.processAll(PluginCommentPostProcessor.java:79) ~[stash-service-impl-3.7.0-SNAPSHOT.jar:na] at com.atlassian.stash.internal.pull.comment.CompositeCommentPostProcessor.processAll(CompositeCommentPostProcessor.java:45) ~[stash-service-impl-3.7.0-SNAPSHOT.jar:na] at com.atlassian.stash.internal.pull.comment.CommentPullRequestActivityEnricher.enrich(CommentPullRequestActivityEnricher.java:96) ~[stash-service-impl-3.7.0-SNAPSHOT.jar:na] at com.atlassian.stash.internal.pull.DefaultPullRequestService.enrichActivities(DefaultPullRequestService.java:1207) ~[stash-service-impl-3.7.0-SNAPSHOT.jar:na] at com.atlassian.stash.internal.pull.DefaultPullRequestService.enrichActivities(DefaultPullRequestService.java:1200) ~[stash-service-impl-3.7.0-SNAPSHOT.jar:na] at com.atlassian.stash.internal.pull.DefaultPullRequestService.searchActivities(DefaultPullRequestService.java:791) ~[stash-service-impl-3.7.0-SNAPSHOT.jar:na] {noformat}

    Atlassian JIRA | 2 years ago | Pierre-Etienne Poirot [Atlassian]
    java.lang.IllegalArgumentException: duplicate key: likedBy
  3. 0

    Use AssetBundle on /

    GitHub | 5 years ago | jamesward
    java.lang.IllegalArgumentException: duplicate key: /*
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    GitHub comment 29#3911949

    GitHub | 5 years ago | tinkerware
    java.lang.IllegalArgumentException: duplicate key: /*
  6. 0

    Richfaces 4.3.1 weblogic 10.3.5.0 duplicate key on deploy

    Stack Overflow | 4 years ago | Joel Pearson
    java.lang.IllegalArgumentException: duplicate key: class javax.faces.validator.LongRangeValidator

  1. arturgajowy 1 times, last 2 months ago
1 unregistered visitors
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. java.lang.IllegalArgumentException

    duplicate key: likedBy

    at com.google.common.base.Preconditions.checkArgument()
  2. Guava
    ImmutableMap$Builder.build
    1. com.google.common.base.Preconditions.checkArgument(Preconditions.java:115)[guava-11.0.2-atlassian-02.jar:na]
    2. com.google.common.collect.RegularImmutableMap.<init>(RegularImmutableMap.java:72)[guava-11.0.2-atlassian-02.jar:na]
    3. com.google.common.collect.ImmutableMap$Builder.fromEntryList(ImmutableMap.java:245)[guava-11.0.2-atlassian-02.jar:na]
    4. com.google.common.collect.ImmutableMap$Builder.build(ImmutableMap.java:231)[guava-11.0.2-atlassian-02.jar:na]
    4 frames
  3. com.atlassian.stash
    PluginCommentPostProcessor$Enricher.apply
    1. com.atlassian.stash.property.PropertyMap$Builder.build(PropertyMap.java:160)[stash-api-3.7.0-SNAPSHOT.jar:na]
    2. com.atlassian.stash.internal.content.AbstractProviderContext.getPropertiesFor(AbstractProviderContext.java:56)[stash-service-impl-3.7.0-SNAPSHOT.jar:na]
    3. com.atlassian.stash.internal.comment.PluginCommentPostProcessor$Enricher.apply(PluginCommentPostProcessor.java:163)[stash-service-impl-3.7.0-SNAPSHOT.jar:na]
    4. com.atlassian.stash.internal.comment.PluginCommentPostProcessor$Enricher.apply(PluginCommentPostProcessor.java:152)[stash-service-impl-3.7.0-SNAPSHOT.jar:na]
    5. com.atlassian.stash.internal.comment.PluginCommentPostProcessor$Enricher.apply(PluginCommentPostProcessor.java:143)[stash-service-impl-3.7.0-SNAPSHOT.jar:na]
    5 frames
  4. Guava
    Lists$TransformingRandomAccessList.get
    1. com.google.common.collect.Lists$TransformingRandomAccessList.get(Lists.java:451)[guava-11.0.2-atlassian-02.jar:na]
    1 frame
  5. Java RT
    AbstractCollection.toArray
    1. java.util.AbstractList$Itr.next(AbstractList.java:358)[na:1.8.0_31]
    2. java.util.AbstractCollection.toArray(AbstractCollection.java:141)[na:1.8.0_31]
    2 frames
  6. Guava
    ImmutableList.copyOf
    1. com.google.common.collect.ImmutableList.copyFromCollection(ImmutableList.java:290)[guava-11.0.2-atlassian-02.jar:na]
    2. com.google.common.collect.ImmutableList.copyOf(ImmutableList.java:247)[guava-11.0.2-atlassian-02.jar:na]
    2 frames
  7. com.atlassian.stash
    DefaultPullRequestService.searchActivities
    1. com.atlassian.stash.internal.comment.PluginCommentPostProcessor.processAll(PluginCommentPostProcessor.java:79)[stash-service-impl-3.7.0-SNAPSHOT.jar:na]
    2. com.atlassian.stash.internal.pull.comment.CompositeCommentPostProcessor.processAll(CompositeCommentPostProcessor.java:45)[stash-service-impl-3.7.0-SNAPSHOT.jar:na]
    3. com.atlassian.stash.internal.pull.comment.CommentPullRequestActivityEnricher.enrich(CommentPullRequestActivityEnricher.java:96)[stash-service-impl-3.7.0-SNAPSHOT.jar:na]
    4. com.atlassian.stash.internal.pull.DefaultPullRequestService.enrichActivities(DefaultPullRequestService.java:1207)[stash-service-impl-3.7.0-SNAPSHOT.jar:na]
    5. com.atlassian.stash.internal.pull.DefaultPullRequestService.enrichActivities(DefaultPullRequestService.java:1200)[stash-service-impl-3.7.0-SNAPSHOT.jar:na]
    6. com.atlassian.stash.internal.pull.DefaultPullRequestService.searchActivities(DefaultPullRequestService.java:791)[stash-service-impl-3.7.0-SNAPSHOT.jar:na]
    6 frames