#[error]java.lang.IllegalStateException: Duplicate key

Must-share information (formatted with Markdown):

  • Sonarqube 8.6.1.40680
  • Running code analysis as part of azure devops build for .net application

Getting error

##[error]08:25:07.408 ERROR: Error during SonarScanner execution
##[debug]Processed: ##vso[task.logissue type=error;]08:25:07.408 ERROR: Error during SonarScanner execution
08:25:07.408 ERROR: Error during SonarScanner execution
##[error]java.lang.IllegalStateException: Duplicate key XXX.XX.ServiceManager.Directory.MicrosoftGraph.UserService.SearchUserAsync(Microsoft.Graph.IGraphServiceClient, string)
at java.util.stream.Collectors.lambda$throwingMerger$0(Unknown Source)
at java.util.HashMap.merge(Unknown Source)
at java.util.stream.Collectors.lambda$toMap$58(Unknown Source)
at java.util.stream.ReduceOps$3ReducingSink.accept(Unknown Source)
at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(Unknown Source)
at java.util.stream.AbstractPipeline.copyInto(Unknown Source)
at java.util.stream.AbstractPipeline.wrapAndCopyInto(Unknown Source)
at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(Unknown Source)
at java.util.stream.AbstractPipeline.evaluate(Unknown Source)
at java.util.stream.ReferencePipeline.collect(Unknown Source)
at com.sonar.B.A.A(na:666)
at com.sonar.B.A.A(na:2985)
at com.sonar.security.D.readTypeHierarchy(na:2739)
at com.sonar.security.D.execute(na:2241)
at org.sonar.scanner.sensor.AbstractSensorWrapper.analyse(AbstractSensorWrapper.java:48)
at org.sonar.scanner.sensor.ModuleSensorsExecutor.execute(ModuleSensorsExecutor.java:85)
##[debug]Processed: ##vso[task.logissue type=error;]java.lang.IllegalStateException: Duplicate key XXX.XXX.ServiceManager.Directory.MicrosoftGraph.UserService.SearchUserAsync(Microsoft.Graph.IGraphServiceClient, string)%0D%0A at java.util.stream.Collectors.lambda$throwingMerger$0(Unknown Source)%0D%0A at java.util.HashMap.merge(Unknown Source)%0D%0A at java.util.stream.Collectors.lambda$toMap$58(Unknown Source)%0D%0A at java.util.stream.ReduceOps$3ReducingSink.accept(Unknown Source)%0D%0A at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(Unknown Source)%0D%0A at java.util.stream.AbstractPipeline.copyInto(Unknown Source)%0D%0A at java.util.stream.AbstractPipeline.wrapAndCopyInto(Unknown Source)%0D%0A at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(Unknown Source)%0D%0A at java.util.stream.AbstractPipeline.evaluate(Unknown Source)%0D%0A at java.util.stream.ReferencePipeline.collect(Unknown Source)%0D%0A at com.sonar.B.A.A(na:666)%0D%0A at com.sonar.B.A.A(na:2985)%0D%0A at com.sonar.security.D.readTypeHierarchy(na:2739)%0D%0A at com.sonar.security.D.execute(na:2241)%0D%0A at org.sonar.scanner.sensor.AbstractSensorWrapper.analyse(AbstractSensorWrapper.java:48)%0D%0A at org.sonar.scanner.sensor.ModuleSensorsExecutor.execute(ModuleSensorsExecutor.java:85)
java.lang.IllegalStateException: Duplicate key XXX.xx.ServiceManager.Directory.MicrosoftGraph.UserService.SearchUserAsync(Microsoft.Graph.IGraphServiceClient, string)
at java.util.stream.Collectors.lambda$throwingMerger$0(Unknown Source)

I am not sure what extra information needs to be provided.

2021-04-09T18:17:25.5613062Z 13:17:25.559 INFO: EXECUTION FAILURE
2021-04-09T18:17:25.5613702Z 13:17:25.559 INFO: ------------------------------------------------------------------------
2021-04-09T18:17:25.5614340Z 13:17:25.559 INFO: Total time: 10.722s
2021-04-09T18:17:25.6357172Z 13:17:25.634 INFO: Final Memory: 19M/60M
2021-04-09T18:17:25.6364160Z ##[error]13:17:25.634 ERROR: Error during SonarScanner execution
2021-04-09T18:17:25.6365343Z ##[debug]Processed: ##vso[task.logissue type=error;]13:17:25.634 ERROR: Error during SonarScanner execution
2021-04-09T18:17:25.6366020Z 13:17:25.634 ERROR: Error during SonarScanner execution
2021-04-09T18:17:25.6366603Z 13:17:25.634 INFO: ------------------------------------------------------------------------
2021-04-09T18:17:25.6374638Z ##[error]java.lang.IllegalStateException: Duplicate key FHLB.UMI.ServiceManager.Directory.MicrosoftGraph.UserService.SearchUserAsync(Microsoft.Graph.IGraphServiceClient, string)
> at java.util.stream.Collectors.lambda$throwingMerger$0(Unknown Source)

at java.util.HashMap.merge(Unknown Source)
at java.util.stream.Collectors.lambda$toMap$58(Unknown Source)
at java.util.stream.ReduceOps$3ReducingSink.accept(Unknown Source)
at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(Unknown Source)
at java.util.stream.AbstractPipeline.copyInto(Unknown Source)
at java.util.stream.AbstractPipeline.wrapAndCopyInto(Unknown Source)
at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(Unknown Source)
at java.util.stream.AbstractPipeline.evaluate(Unknown Source)
at java.util.stream.ReferencePipeline.collect(Unknown Source)
at com.sonar.B.A.A(na:666)
at com.sonar.B.A.A(na:2985)
at com.sonar.security.D.readTypeHierarchy(na:2739)
at com.sonar.security.D.execute(na:2241)
at org.sonar.scanner.sensor.AbstractSensorWrapper.analyse(AbstractSensorWrapper.java:48)

2021-04-09T18:17:25.6380023Z ##[debug]Processed: ##vso[task.logissue type=error;]java.lang.IllegalStateException: Duplicate key FHLB.UMI.ServiceManager.Directory.MicrosoftGraph.UserService.SearchUserAsync(Microsoft.Graph.IGraphServiceClient, string)%0D%0A at java.util.stream.Collectors.lambda$throwingMerger$0(Unknown Source)%0D%0A at java.util.HashMap.merge(Unknown Source)%0D%0A at java.util.stream.Collectors.lambda$toMap$58(Unknown Source)%0D%0A at java.util.stream.ReduceOps$3ReducingSink.accept(Unknown Source)%0D%0A at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(Unknown Source)%0D%0A at java.util.stream.AbstractPipeline.copyInto(Unknown Source)%0D%0A at java.util.stream.AbstractPipeline.wrapAndCopyInto(Unknown Source)%0D%0A at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(Unknown Source)%0D%0A at java.util.stream.AbstractPipeline.evaluate(Unknown Source)%0D%0A at java.util.stream.ReferencePipeline.collect(Unknown Source)%0D%0A at com.sonar.B.A.A(na:666)%0D%0A at com.sonar.B.A.A(na:2985)%0D%0A at com.sonar.security.D.readTypeHierarchy(na:2739)%0D%0A at com.sonar.security.D.execute(na:2241)%0D%0A at org.sonar.scanner.sensor.AbstractSensorWrapper.analyse(AbstractSensorWrapper.java:48)

2021-04-09T18:17:25.6383316Z java.lang.IllegalStateException: Duplicate key FHLB.UMI.ServiceManager.Directory.MicrosoftGraph.UserService.SearchUserAsync(Microsoft.Graph.IGraphServiceClient, string)
2021-04-09T18:17:25.6384633Z at java.util.stream.Collectors.lambda$throwingMerger$0(Unknown Source)
2021-04-09T18:17:25.6385000Z at java.util.HashMap.merge(Unknown Source)
2021-04-09T18:17:25.6385390Z at java.util.stream.Collectors.lambda$toMap$58(Unknown Source)
2021-04-09T18:17:25.6385807Z at java.util.stream.ReduceOps$3ReducingSink.accept(Unknown Source)
2021-04-09T18:17:25.6386270Z at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(Unknown Source)
2021-04-09T18:17:25.6386721Z at java.util.stream.AbstractPipeline.copyInto(Unknown Source)
2021-04-09T18:17:25.6387064Z at java.util.stream.AbstractPipeline.wrapAndCopyInto(Unknown Source)
2021-04-09T18:17:25.6387385Z at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(Unknown Source)
2021-04-09T18:17:25.6387717Z at java.util.stream.AbstractPipeline.evaluate(Unknown Source)
2021-04-09T18:17:25.6388017Z at java.util.stream.ReferencePipeline.collect(Unknown Source)
2021-04-09T18:17:25.6388920Z at com.sonar.B.A.A(na:666)
2021-04-09T18:17:25.6389568Z at com.sonar.B.A.A(na:2985)
2021-04-09T18:17:25.6389856Z at com.sonar.security.D.readTypeHierarchy(na:2739)
2021-04-09T18:17:25.6390181Z at com.sonar.security.D.execute(na:2241)
2021-04-09T18:17:25.6390571Z at org.sonar.scanner.sensor.AbstractSensorWrapper.analyse(AbstractSensorWrapper.java:48)

2021-04-09T18:17:25.6392805Z ##[error]at org.sonar.scanner.sensor.ModuleSensorsExecutor.execute(ModuleSensorsExecutor.java:85)
> at org.sonar.scanner.sensor.ModuleSensorsExecutor.execute(ModuleSensorsExecutor.java:62)
> at org.sonar.scanner.scan.ModuleScanContainer.doAfterStart(ModuleScanContainer.java:82)
> at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:137)
2021-04-09T18:17:25.6395541Z ##[debug]Processed: ##vso[task.logissue type=error;]at org.sonar.scanner.sensor.ModuleSensorsExecutor.execute(ModuleSensorsExecutor.java:85)%0D%0A at org.sonar.scanner.sensor.ModuleSensorsExecutor.execute(ModuleSensorsExecutor.java:62)%0D%0A at org.sonar.scanner.scan.ModuleScanContainer.doAfterStart(ModuleScanContainer.java:82)%0D%0A at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:137)

2021-04-09T18:17:25.6396754Z at org.sonar.scanner.sensor.ModuleSensorsExecutor.execute(ModuleSensorsExecutor.java:85)
2021-04-09T18:17:25.6397243Z at org.sonar.scanner.sensor.ModuleSensorsExecutor.execute(ModuleSensorsExecutor.java:62)
2021-04-09T18:17:25.6397749Z at org.sonar.scanner.scan.ModuleScanContainer.doAfterStart(ModuleScanContainer.java:82)
2021-04-09T18:17:25.6398294Z at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:137)
2021-04-09T18:17:25.6401461Z ##[error]at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:123)
at org.sonar.scanner.scan.ProjectScanContainer.scan(ProjectScanContainer.java:393)
at org.sonar.scanner.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:389)

2021-04-09T18:17:25.6403770Z ##[debug]Processed: ##vso[task.logissue type=error;]at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:123)%0D%0A at org.sonar.scanner.scan.ProjectScanContainer.scan(ProjectScanContainer.java:393)%0D%0A at org.sonar.scanner.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:389)

2021-04-09T18:17:25.6405037Z at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:123)
2021-04-09T18:17:25.6405621Z at org.sonar.scanner.scan.ProjectScanContainer.scan(ProjectScanContainer.java:393)
2021-04-09T18:17:25.6406253Z at org.sonar.scanner.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:389)

2021-04-09T18:17:25.6408959Z ##[error]at org.sonar.scanner.scan.ProjectScanContainer.doAfterStart(ProjectScanContainer.java:358)

at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:137)
at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:123)
at org.sonar.scanner.bootstrap.GlobalContainer.doAfterStart(GlobalContainer.java:144)

2021-04-09T18:17:25.6412779Z ##[debug]Processed: ##vso[task.logissue type=error;]at org.sonar.scanner.scan.ProjectScanContainer.doAfterStart(ProjectScanContainer.java:358)%0D%0A at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:137)%0D%0A at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:123)%0D%0A at org.sonar.scanner.bootstrap.GlobalContainer.doAfterStart(GlobalContainer.java:144)

2021-04-09T18:17:25.6415344Z at org.sonar.scanner.scan.ProjectScanContainer.doAfterStart(ProjectScanContainer.java:358)
2021-04-09T18:17:25.6416440Z at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:137)
2021-04-09T18:17:25.6417747Z at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:123)
2021-04-09T18:17:25.6418820Z at org.sonar.scanner.bootstrap.GlobalContainer.doAfterStart(GlobalContainer.java:144)

**2021-04-09T18:17:25.6421872Z ##[error]at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:137)

at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:123)
at org.sonar.batch.bootstrapper.Batch.doExecute(Batch.java:72)

2021-04-09T18:17:25.6425394Z ##[debug]Processed: ##vso[task.logissue type=error;]at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:137)%0D%0A at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:123)%0D%0A at org.sonar.batch.bootstrapper.Batch.doExecute(Batch.java:72)

2021-04-09T18:17:25.6427417Z at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:137)
2021-04-09T18:17:25.6429494Z at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:123)
2021-04-09T18:17:25.6430494Z > at org.sonar.batch.bootstrapper.Batch.doExecute(Batch.java:72)

2021-04-09T18:17:25.6432052Z ##[error]at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:66)
2021-04-09T18:17:25.6433755Z ##[debug]Processed: ##vso[task.logissue type=error;]at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:66)
2021-04-09T18:17:25.6434757Z > at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:66)
2021-04-09T18:17:25.6436585Z ##[error]at org.sonarsource.scanner.api.internal.batch.BatchIsolatedLauncher.execute(BatchIsolatedLauncher.java:46)
2021-04-09T18:17:25.6438657Z ##[debug]Processed: ##vso[task.logissue type=error;]at org.sonarsource.scanner.api.internal.batch.BatchIsolatedLauncher.execute(BatchIsolatedLauncher.java:46)

2021-04-09T18:17:25.6440021Z at org.sonarsource.scanner.api.internal.batch.BatchIsolatedLauncher.execute(BatchIsolatedLauncher.java:46)

2021-04-09T18:17:25.6442553Z ##[error]at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

2021-04-09T18:17:25.6445069Z ##[debug]Processed: ##vso[task.logissue type=error;]at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)%0D%0A at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)%0D%0A at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

2021-04-09T18:17:25.6446378Z at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
2021-04-09T18:17:25.6447044Z at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
-04-09T18:17:25.6447696Z at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

2021-04-09T18:17:25.6451525Z ##[error]at java.lang.reflect.Method.invoke(Unknown Source)

at org.sonarsource.scanner.api.internal.IsolatedLauncherProxy.invoke(IsolatedLauncherProxy.java:60)
at com.sun.proxy.$Proxy0.execute(Unknown Source)
**2021-04-09T18:17:25.6453823Z ##[debug]Processed: ##vso[task.logissue type=error;]at java.lang.reflect.Method.invoke(Unknown Source)%0D%0A at org.sonarsource.scanner.api.internal.IsolatedLauncherProxy.invoke(IsolatedLauncherProxy.java:60)%0D%0A at com.sun.proxy.$Proxy0.execute(Unknown Source) **
2021-04-09T18:17:25.6455475Z at java.lang.reflect.Method.invoke(Unknown Source)
2021-04-09T18:17:25.6456173Z at org.sonarsource.scanner.api.internal.IsolatedLauncherProxy.invoke(IsolatedLauncherProxy.java:60)
2021-04-09T18:17:25.6456838Z at com.sun.proxy.$Proxy0.execute(Unknown Source)

**2021-04-09T18:17:25.6458952Z ##[error]at org.sonarsource.scanner.api.EmbeddedScanner.doExecute(EmbeddedScanner.java:189) **

at org.sonarsource.scanner.api.EmbeddedScanner.execute(EmbeddedScanner.java:138)
at org.sonarsource.scanner.cli.Main.execute(Main.java:112)

2021-04-09T18:17:25.6460685Z ##[debug]Processed: ##vso[task.logissue type=error;]at org.sonarsource.scanner.api.EmbeddedScanner.doExecute(EmbeddedScanner.java:189)%0D%0A at org.sonarsource.scanner.api.EmbeddedScanner.execute(EmbeddedScanner.java:138)%0D%0A at org.sonarsource.scanner.cli.Main.execute(Main.java:112)

2021-04-09T18:17:25.6461575Z at org.sonarsource.scanner.api.EmbeddedScanner.doExecute(EmbeddedScanner.java:189)
2021-04-09T18:17:25.6462037Z at org.sonarsource.scanner.api.EmbeddedScanner.execute(EmbeddedScanner.java:138)
2021-04-09T18:17:25.6462418Z at org.sonarsource.scanner.cli.Main.execute(Main.java:112)
2021-04-09T18:17:25.6463349Z ##[error]at org.sonarsource.scanner.cli.Main.execute(Main.java:75)
at org.sonarsource.scanner.cli.Main.main(Main.java:61)

2021-04-09T18:17:25.6464396Z ##[debug]Processed: ##vso[task.logissue type=error;]at org.sonarsource.scanner.cli.Main.execute(Main.java:75)%0D%0A at org.sonarsource.scanner.cli.Main.main(Main.java:61)

2021-04-09T18:17:25.6464961Z at org.sonarsource.scanner.cli.Main.execute(Main.java:75)
2021-04-09T18:17:25.6465885Z at org.sonarsource.scanner.cli.Main.main(Main.java:61)
2021-04-09T18:17:25.6768633Z Process returned exit code 1

2021-04-09T18:17:25.6771395Z ##[error]The SonarScanner did not complete successfully
2021-04-09T18:17:25.6772346Z ##[debug]Processed: ##vso[task.logissue type=error;]The SonarScanner did not complete successfully
2021-04-09T18:17:25.6772768Z The SonarScanner did not complete successfully
2021-04-09T18:17:25.6778331Z ##[error]13:17:25.674 Post-processing failed. Exit code: 1
2021-04-09T18:17:25.6779642Z ##[debug]Processed: ##vso[task.logissue type=error;]13:17:25.674 Post-processing failed. Exit code: 1
2021-04-09T18:17:25.6780457Z 13:17:25.674 Post-processing failed. Exit code: 1
2021-04-09T18:17:25.6898635Z ##[debug]Exit code 1 received from tool ‘G:\C-1\BD\B-2_work_tasks\SonarQubePrepare_15b84ca1-b62f-4a2a-a403-89b77a063157\4.19.0\classic-sonar-scanner-msbuild\SonarScanner.MSBuild.exe’
2021-04-09T18:17:25.6909593Z ##[debug]STDIO streams have closed for tool ‘G:\C-1\BD\B-2_work_tasks\SonarQubePrepare_15b84ca1-b62f-4a2a-a403-89b77a063157\4.19.0\classic-sonar-scanner-msbuild\SonarScanner.MSBuild.exe’
2021-04-09T18:17:25.7017289Z ##[debug]task result: Failed
2021-04-09T18:17:25.7018890Z ##[error]The process ‘G:\C-1\BD\B-2_work_tasks\SonarQubePrepare_15b84ca1-b62f-4a2a-a403-89b77a063157\4.19.0\classic-sonar-scanner-msbuild\SonarScanner.MSBuild.exe’ failed with exit code 1
2021-04-09T18:17:25.7020775Z ##[debug]Processed: ##vso[task.issue type=error;]The process ‘G:\C-1\BD\B-2_work_tasks\SonarQubePrepare_15b84ca1-b62f-4a2a-a403-89b77a063157\4.19.0\classic-sonar-scanner-msbuild\SonarScanner.MSBuild.exe’ failed with exit code 1
2021-04-09T18:17:25.7024282Z ##[debug]Processed: ##vso[task.complete result=Failed;]The process ‘G:\C-1\BD\B-2_work_tasks\SonarQubePrepare_15b84ca1-b62f-4a2a-a403-89b77a063157\4.19.0\classic-sonar-scanner-msbuild\SonarScanner.MSBuild.exe’ failed with exit code 1
2021-04-09T18:17:25.7099949Z ##[section]Finishing: Run Code Analysis