Duplicate key message

  • IntelliJ IDEA 2020.2; SonarLint 6.5.1.43866

  • I am trying to install & configure SonarLint via Server. I followed below steps but getting errors.

  • In IntelliJ IDEA, I went to File > Settings > Tools > SonarLint > Project Settings > Selected CheckBox for Bind project to SonarQube/SonarCloud > Created a new connection with Token > Clicked on Update binding > Got below error message.

  • Error
    Server started on 64120
    Plugin ‘secrets’ embeds dependencies. This will be deprecated soon. Plugin should be updated.
    Plugin ‘swift’ embeds dependencies. This will be deprecated soon. Plugin should be updated.
    Sync quality profiles…
    Downloaded plugin list in 54ms
    [SYNC] Synchronizing analyzer configuration for project ‘com.mycompanyname’
    Downloaded settings in 52ms
    [SYNC] Fetching rule set for ‘java’
    [SYNC] Fetching rule set for ‘js’
    [SYNC] Fetching rule set for ‘kotlin’
    [SYNC] Fetching rule set for ‘php’
    [SYNC] Fetching rule set for ‘py’
    [SYNC] Fetching rule set for ‘ruby’
    [SYNC] Fetching rule set for ‘scala’
    [SYNC] Fetching rule set for ‘swift’
    [SYNC] Fetching rule set for ‘ts’
    [SYNC] Fetching rule set for ‘web’
    [SYNC] Fetching rule set for ‘xml’
    Error updating the storage for connection ‘TestSonarQube1’
    java.lang.IllegalStateException: Duplicate key message (attempted merging values Spring component-scan element has an invalid base-package attribute value and Spring component-scan element has an invalid base-package attribute value)
    at java.base/java.util.stream.Collectors.duplicateKeyException(Collectors.java:133)
    at java.base/java.util.stream.Collectors.lambda$uniqKeysMapAccumulator$1(Collectors.java:180)
    at java.base/java.util.stream.ReduceOps$3ReducingSink.accept(ReduceOps.java:169)
    at java.base/java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1655)
    at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:484)
    at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474)
    at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:913)
    at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
    at java.base/java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:578)

Hello @ppat7046,

Thanks for raising this. By any chance would you have a more complete stacktrace ? This one looks truncated. Also could you check if there are some third-party plugins installed on the server ?