Skip to content
This repository has been archived by the owner on Jan 30, 2023. It is now read-only.

Issue when pushing to upstream branch due to OverlappingFileLockException #94

Open
Adenedo opened this issue Mar 3, 2020 · 4 comments

Comments

@Adenedo
Copy link

Adenedo commented Mar 3, 2020

Hi,

I am currently working on implementing SonarQube quality gates on the pipelines of multiple projects to ensure that it's not possible to push code upstream or merge to master unless the new code is covered by tests. I am running sonarScan against an aggregate project that contains all of the projects to be assessed, and there is a sonar scan stage in the pipeline that performs that check.

The current implementation of the quality gate runs sonar scan against all projects separately, as well as against an aggregated project that is used for the gate check. Currently there is an issue that is occurring on the pipeline where running sonarScan results in an OverlappingFileLockException It runs sonarScan against all of the projects in the aggregated project, and this error is thrown on the second project, regardless as to which project this is.

Any help on this matter would be much appreciated.

@mwz
Copy link
Member

mwz commented Mar 3, 2020

Hi, I've never run into this issue before, but it would useful if you could you share a stack trace. I'm curious to see where this exception originates from.

@joshserrin
Copy link

I'm running into the same issue. My sbt project has 18 subprojects and is running in gitlab-ci. I only get this exception on 5 of the subprojects. Not all of them. Is there a way to run sonarScan sequentially opposed to concurrently?

Here's my stacktrace:

[error] java.lang.IllegalStateException: Fail to open plugin [web]: /root/.sonar/cache/16aa0f649cd407d844968bcf80a8be6e/sonar-web-plugin.jar
[error] 	at org.sonar.scanner.bootstrap.ScannerPluginJarExploder.explode(ScannerPluginJarExploder.java:47)
[error] 	at org.sonar.scanner.bootstrap.ScannerPluginRepository.lambda$start$0(ScannerPluginRepository.java:64)
[error] 	at org.sonar.scanner.bootstrap.ScannerPluginRepository$$Lambda$4709.00000000A02D20D0.apply(Unknown Source)
[error] 	at java.util.stream.Collectors.lambda$toMap$58(Collectors.java:1321)
[error] 	at java.util.stream.Collectors$$Lambda$4705.000000009443D2A0.accept(Unknown Source)
[error] 	at java.util.stream.ReduceOps$3ReducingSink.accept(ReduceOps.java:169)
[error] 	at java.util.HashMap$EntrySpliterator.forEachRemaining(HashMap.java:1699)
[error] 	at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:497)
[error] 	at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:487)
[error] 	at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708)
[error] 	at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:241)
[error] 	at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:566)
[error] 	at org.sonar.scanner.bootstrap.ScannerPluginRepository.start(ScannerPluginRepository.java:64)
[error] 	at org.sonar.core.platform.StartableCloseableSafeLifecyleStrategy.start(StartableCloseableSafeLifecyleStrategy.java:40)
[error] 	at org.picocontainer.injectors.AbstractInjectionFactory$LifecycleAdapter.start(AbstractInjectionFactory.java:84)
[error] 	at org.picocontainer.behaviors.AbstractBehavior.start(AbstractBehavior.java:169)
[error] 	at org.picocontainer.behaviors.Stored$RealComponentLifecycle.start(Stored.java:132)
[error] 	at org.picocontainer.behaviors.Stored.start(Stored.java:110)
[error] 	at org.picocontainer.DefaultPicoContainer.potentiallyStartAdapter(DefaultPicoContainer.java:1016)
[error] 	at org.picocontainer.DefaultPicoContainer.startAdapters(DefaultPicoContainer.java:1009)
[error] 	at org.picocontainer.DefaultPicoContainer.start(DefaultPicoContainer.java:767)
[error] 	at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:136)
[error] 	at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:123)
[error] 	at org.sonar.batch.bootstrapper.Batch.doExecute(Batch.java:72)
[error] 	at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:66)
[error] 	at org.sonarsource.scanner.api.internal.batch.BatchIsolatedLauncher.execute(BatchIsolatedLauncher.java:46)
[error] 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[error] 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
[error] 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[error] 	at java.lang.reflect.Method.invoke(Method.java:498)
[error] 	at org.sonarsource.scanner.api.internal.IsolatedLauncherProxy.invoke(IsolatedLauncherProxy.java:60)
[error] 	at com.sun.proxy.$Proxy3.execute(Unknown Source)
[error] 	at org.sonarsource.scanner.api.EmbeddedScanner.doExecute(EmbeddedScanner.java:189)
[error] 	at org.sonarsource.scanner.api.EmbeddedScanner.execute(EmbeddedScanner.java:138)
[error] 	at sbtsonar.SonarPlugin$.useEmbeddedScanner(SonarPlugin.scala:254)
[error] 	at sbtsonar.SonarPlugin$.$anonfun$projectSettings$5(SonarPlugin.scala:111)
[error] 	at sbtsonar.SonarPlugin$.$anonfun$projectSettings$5$adapted(SonarPlugin.scala:85)
[error] 	at sbtsonar.SonarPlugin$$$Lambda$3814.000000009A7CECD0.apply(Unknown Source)
[error] 	at scala.Function1.$anonfun$compose$1(Function1.scala:49)
[error] 	at scala.Function1$$Lambda$416.000000001C5A2A60.apply(Unknown Source)
[error] 	at sbt.internal.util.$tilde$greater.$anonfun$$u2219$1(TypeFunctions.scala:62)
[error] 	at sbt.internal.util.$tilde$greater$$Lambda$2713.0000000099AAD5C0.apply(Unknown Source)
[error] 	at sbt.std.Transform$$anon$4.work(Transform.scala:68)
[error] 	at sbt.Execute.$anonfun$submit$2(Execute.scala:282)
[error] 	at sbt.Execute$$Lambda$2738.00000000D0002D50.apply(Unknown Source)
[error] 	at sbt.internal.util.ErrorHandling$.wideConvert(ErrorHandling.scala:23)
[error] 	at sbt.Execute.work(Execute.scala:291)
[error] 	at sbt.Execute.$anonfun$submit$1(Execute.scala:282)
[error] 	at sbt.Execute$$Lambda$2723.0000000099AB65A0.apply(Unknown Source)
[error] 	at sbt.ConcurrentRestrictions$$anon$4.$anonfun$submitValid$1(ConcurrentRestrictions.scala:265)
[error] 	at sbt.ConcurrentRestrictions$$anon$4$$Lambda$2736.0000000099AB8750.apply(Unknown Source)
[error] 	at sbt.CompletionService$$anon$2.call(CompletionService.scala:64)
[error] 	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
[error] 	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
[error] 	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
[error] 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
[error] 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
[error] 	at java.lang.Thread.run(Thread.java:819)
[error] Caused by: java.nio.channels.OverlappingFileLockException
[error] 	at sun.nio.ch.SharedFileLockTable.checkList(FileLockTable.java:255)
[error] 	at sun.nio.ch.SharedFileLockTable.add(FileLockTable.java:152)
[error] 	at sun.nio.ch.FileChannelImpl.lock(FileChannelImpl.java:1062)
[error] 	at java.nio.channels.FileChannel.lock(FileChannel.java:1053)
[error] 	at org.sonar.scanner.bootstrap.ScannerPluginJarExploder.unzipFile(ScannerPluginJarExploder.java:57)
[error] 	at org.sonar.scanner.bootstrap.ScannerPluginJarExploder.explode(ScannerPluginJarExploder.java:44)
[error] 	at org.sonar.scanner.bootstrap.ScannerPluginRepository.lambda$start$0(ScannerPluginRepository.java:64)
[error] 	at org.sonar.scanner.bootstrap.ScannerPluginRepository$$Lambda$4709.00000000A02D20D0.apply(Unknown Source)
[error] 	at java.util.stream.Collectors.lambda$toMap$58(Collectors.java:1321)
[error] 	at java.util.stream.Collectors$$Lambda$4705.000000009443D2A0.accept(Unknown Source)
[error] 	at java.util.stream.ReduceOps$3ReducingSink.accept(ReduceOps.java:169)
[error] 	at java.util.HashMap$EntrySpliterator.forEachRemaining(HashMap.java:1699)
[error] 	at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:497)
[error] 	at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:487)
[error] 	at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708)
[error] 	at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:241)
[error] 	at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:566)
[error] 	at org.sonar.scanner.bootstrap.ScannerPluginRepository.start(ScannerPluginRepository.java:64)
[error] 	at org.sonar.core.platform.StartableCloseableSafeLifecyleStrategy.start(StartableCloseableSafeLifecyleStrategy.java:40)
[error] 	at org.picocontainer.injectors.AbstractInjectionFactory$LifecycleAdapter.start(AbstractInjectionFactory.java:84)
[error] 	at org.picocontainer.behaviors.AbstractBehavior.start(AbstractBehavior.java:169)
[error] 	at org.picocontainer.behaviors.Stored$RealComponentLifecycle.start(Stored.java:132)
[error] 	at org.picocontainer.behaviors.Stored.start(Stored.java:110)
[error] 	at org.picocontainer.DefaultPicoContainer.potentiallyStartAdapter(DefaultPicoContainer.java:1016)
[error] 	at org.picocontainer.DefaultPicoContainer.startAdapters(DefaultPicoContainer.java:1009)
[error] 	at org.picocontainer.DefaultPicoContainer.start(DefaultPicoContainer.java:767)
[error] 	at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:136)
[error] 	at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:123)
[error] 	at org.sonar.batch.bootstrapper.Batch.doExecute(Batch.java:72)
[error] 	at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:66)
[error] 	at org.sonarsource.scanner.api.internal.batch.BatchIsolatedLauncher.execute(BatchIsolatedLauncher.java:46)
[error] 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[error] 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
[error] 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[error] 	at java.lang.reflect.Method.invoke(Method.java:498)
[error] 	at org.sonarsource.scanner.api.internal.IsolatedLauncherProxy.invoke(IsolatedLauncherProxy.java:60)
[error] 	at com.sun.proxy.$Proxy3.execute(Unknown Source)
[error] 	at org.sonarsource.scanner.api.EmbeddedScanner.doExecute(EmbeddedScanner.java:189)
[error] 	at org.sonarsource.scanner.api.EmbeddedScanner.execute(EmbeddedScanner.java:138)
[error] 	at sbtsonar.SonarPlugin$.useEmbeddedScanner(SonarPlugin.scala:254)
[error] 	at sbtsonar.SonarPlugin$.$anonfun$projectSettings$5(SonarPlugin.scala:111)
[error] 	at sbtsonar.SonarPlugin$.$anonfun$projectSettings$5$adapted(SonarPlugin.scala:85)
[error] 	at sbtsonar.SonarPlugin$$$Lambda$3814.000000009A7CECD0.apply(Unknown Source)
[error] 	at scala.Function1.$anonfun$compose$1(Function1.scala:49)
[error] 	at scala.Function1$$Lambda$416.000000001C5A2A60.apply(Unknown Source)
[error] 	at sbt.internal.util.$tilde$greater.$anonfun$$u2219$1(TypeFunctions.scala:62)
[error] 	at sbt.internal.util.$tilde$greater$$Lambda$2713.0000000099AAD5C0.apply(Unknown Source)
[error] 	at sbt.std.Transform$$anon$4.work(Transform.scala:68)
[error] 	at sbt.Execute.$anonfun$submit$2(Execute.scala:282)
[error] 	at sbt.Execute$$Lambda$2738.00000000D0002D50.apply(Unknown Source)
[error] 	at sbt.internal.util.ErrorHandling$.wideConvert(ErrorHandling.scala:23)
[error] 	at sbt.Execute.work(Execute.scala:291)
[error] 	at sbt.Execute.$anonfun$submit$1(Execute.scala:282)
[error] 	at sbt.Execute$$Lambda$2723.0000000099AB65A0.apply(Unknown Source)
[error] 	at sbt.ConcurrentRestrictions$$anon$4.$anonfun$submitValid$1(ConcurrentRestrictions.scala:265)
[error] 	at sbt.ConcurrentRestrictions$$anon$4$$Lambda$2736.0000000099AB8750.apply(Unknown Source)
[error] 	at sbt.CompletionService$$anon$2.call(CompletionService.scala:64)
[error] 	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
[error] 	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
[error] 	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
[error] 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
[error] 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
[error] 	at java.lang.Thread.run(Thread.java:819)
[error] java.lang.IllegalStateException: Fail to open plugin [dependencycheck]: /root/.sonar/cache/c35f43426994b858e53a73ac5d7f3d04/sonar-dependencycheck-plugin.jar
[error] 	at org.sonar.scanner.bootstrap.ScannerPluginJarExploder.explode(ScannerPluginJarExploder.java:47)
[error] 	at org.sonar.scanner.bootstrap.ScannerPluginRepository.lambda$start$0(ScannerPluginRepository.java:64)
[error] 	at org.sonar.scanner.bootstrap.ScannerPluginRepository$$Lambda$4719.000000008C4642C0.apply(Unknown Source)
[error] 	at java.util.stream.Collectors.lambda$toMap$58(Collectors.java:1321)
[error] 	at java.util.stream.Collectors$$Lambda$4705.000000009443D2A0.accept(Unknown Source)
[error] 	at java.util.stream.ReduceOps$3ReducingSink.accept(ReduceOps.java:169)
[error] 	at java.util.HashMap$EntrySpliterator.forEachRemaining(HashMap.java:1699)
[error] 	at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:497)
[error] 	at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:487)
[error] 	at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708)
[error] 	at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:241)
[error] 	at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:566)
[error] 	at org.sonar.scanner.bootstrap.ScannerPluginRepository.start(ScannerPluginRepository.java:64)
[error] 	at org.sonar.core.platform.StartableCloseableSafeLifecyleStrategy.start(StartableCloseableSafeLifecyleStrategy.java:40)
[error] 	at org.picocontainer.injectors.AbstractInjectionFactory$LifecycleAdapter.start(AbstractInjectionFactory.java:84)
[error] 	at org.picocontainer.behaviors.AbstractBehavior.start(AbstractBehavior.java:169)
[error] 	at org.picocontainer.behaviors.Stored$RealComponentLifecycle.start(Stored.java:132)
[error] 	at org.picocontainer.behaviors.Stored.start(Stored.java:110)
[error] 	at org.picocontainer.DefaultPicoContainer.potentiallyStartAdapter(DefaultPicoContainer.java:1016)
[error] 	at org.picocontainer.DefaultPicoContainer.startAdapters(DefaultPicoContainer.java:1009)
[error] 	at org.picocontainer.DefaultPicoContainer.start(DefaultPicoContainer.java:767)
[error] 	at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:136)
[error] 	at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:123)
[error] 	at org.sonar.batch.bootstrapper.Batch.doExecute(Batch.java:72)
[error] 	at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:66)
[error] 	at org.sonarsource.scanner.api.internal.batch.BatchIsolatedLauncher.execute(BatchIsolatedLauncher.java:46)
[error] 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[error] 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
[error] 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[error] 	at java.lang.reflect.Method.invoke(Method.java:498)
[error] 	at org.sonarsource.scanner.api.internal.IsolatedLauncherProxy.invoke(IsolatedLauncherProxy.java:60)
[error] 	at com.sun.proxy.$Proxy13.execute(Unknown Source)
[error] 	at org.sonarsource.scanner.api.EmbeddedScanner.doExecute(EmbeddedScanner.java:189)
[error] 	at org.sonarsource.scanner.api.EmbeddedScanner.execute(EmbeddedScanner.java:138)
[error] 	at sbtsonar.SonarPlugin$.useEmbeddedScanner(SonarPlugin.scala:254)
[error] 	at sbtsonar.SonarPlugin$.$anonfun$projectSettings$5(SonarPlugin.scala:111)
[error] 	at sbtsonar.SonarPlugin$.$anonfun$projectSettings$5$adapted(SonarPlugin.scala:85)
[error] 	at sbtsonar.SonarPlugin$$$Lambda$3814.000000009A7CECD0.apply(Unknown Source)
[error] 	at scala.Function1.$anonfun$compose$1(Function1.scala:49)
[error] 	at scala.Function1$$Lambda$416.000000001C5A2A60.apply(Unknown Source)
[error] 	at sbt.internal.util.$tilde$greater.$anonfun$$u2219$1(TypeFunctions.scala:62)
[error] 	at sbt.internal.util.$tilde$greater$$Lambda$2713.0000000099AAD5C0.apply(Unknown Source)
[error] 	at sbt.std.Transform$$anon$4.work(Transform.scala:68)
[error] 	at sbt.Execute.$anonfun$submit$2(Execute.scala:282)
[error] 	at sbt.Execute$$Lambda$2738.00000000D0002D50.apply(Unknown Source)
[error] 	at sbt.internal.util.ErrorHandling$.wideConvert(ErrorHandling.scala:23)
[error] 	at sbt.Execute.work(Execute.scala:291)
[error] 	at sbt.Execute.$anonfun$submit$1(Execute.scala:282)
[error] 	at sbt.Execute$$Lambda$2723.0000000099AB65A0.apply(Unknown Source)
[error] 	at sbt.ConcurrentRestrictions$$anon$4.$anonfun$submitValid$1(ConcurrentRestrictions.scala:265)
[error] 	at sbt.ConcurrentRestrictions$$anon$4$$Lambda$2736.0000000099AB8750.apply(Unknown Source)
[error] 	at sbt.CompletionService$$anon$2.call(CompletionService.scala:64)
[error] 	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
[error] 	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
[error] 	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
[error] 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
[error] 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
[error] 	at java.lang.Thread.run(Thread.java:819)
[error] Caused by: java.nio.channels.OverlappingFileLockException
[error] 	at sun.nio.ch.SharedFileLockTable.checkList(FileLockTable.java:255)
[error] 	at sun.nio.ch.SharedFileLockTable.add(FileLockTable.java:152)
[error] 	at sun.nio.ch.FileChannelImpl.lock(FileChannelImpl.java:1062)
[error] 	at java.nio.channels.FileChannel.lock(FileChannel.java:1053)
[error] 	at org.sonar.scanner.bootstrap.ScannerPluginJarExploder.unzipFile(ScannerPluginJarExploder.java:57)
[error] 	at org.sonar.scanner.bootstrap.ScannerPluginJarExploder.explode(ScannerPluginJarExploder.java:44)
[error] 	at org.sonar.scanner.bootstrap.ScannerPluginRepository.lambda$start$0(ScannerPluginRepository.java:64)
[error] 	at org.sonar.scanner.bootstrap.ScannerPluginRepository$$Lambda$4719.000000008C4642C0.apply(Unknown Source)
[error] 	at java.util.stream.Collectors.lambda$toMap$58(Collectors.java:1321)
[error] 	at java.util.stream.Collectors$$Lambda$4705.000000009443D2A0.accept(Unknown Source)
[error] 	at java.util.stream.ReduceOps$3ReducingSink.accept(ReduceOps.java:169)
[error] 	at java.util.HashMap$EntrySpliterator.forEachRemaining(HashMap.java:1699)
[error] 	at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:497)
[error] 	at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:487)
[error] 	at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708)
[error] 	at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:241)
[error] 	at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:566)
[error] 	at org.sonar.scanner.bootstrap.ScannerPluginRepository.start(ScannerPluginRepository.java:64)
[error] 	at org.sonar.core.platform.StartableCloseableSafeLifecyleStrategy.start(StartableCloseableSafeLifecyleStrategy.java:40)
[error] 	at org.picocontainer.injectors.AbstractInjectionFactory$LifecycleAdapter.start(AbstractInjectionFactory.java:84)
[error] 	at org.picocontainer.behaviors.AbstractBehavior.start(AbstractBehavior.java:169)
[error] 	at org.picocontainer.behaviors.Stored$RealComponentLifecycle.start(Stored.java:132)
[error] 	at org.picocontainer.behaviors.Stored.start(Stored.java:110)
[error] 	at org.picocontainer.DefaultPicoContainer.potentiallyStartAdapter(DefaultPicoContainer.java:1016)
[error] 	at org.picocontainer.DefaultPicoContainer.startAdapters(DefaultPicoContainer.java:1009)
[error] 	at org.picocontainer.DefaultPicoContainer.start(DefaultPicoContainer.java:767)
[error] 	at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:136)
[error] 	at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:123)
[error] 	at org.sonar.batch.bootstrapper.Batch.doExecute(Batch.java:72)
[error] 	at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:66)
[error] 	at org.sonarsource.scanner.api.internal.batch.BatchIsolatedLauncher.execute(BatchIsolatedLauncher.java:46)
[error] 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[error] 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
[error] 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[error] 	at java.lang.reflect.Method.invoke(Method.java:498)
[error] 	at org.sonarsource.scanner.api.internal.IsolatedLauncherProxy.invoke(IsolatedLauncherProxy.java:60)
[error] 	at com.sun.proxy.$Proxy13.execute(Unknown Source)
[error] 	at org.sonarsource.scanner.api.EmbeddedScanner.doExecute(EmbeddedScanner.java:189)
[error] 	at org.sonarsource.scanner.api.EmbeddedScanner.execute(EmbeddedScanner.java:138)
[error] 	at sbtsonar.SonarPlugin$.useEmbeddedScanner(SonarPlugin.scala:254)
[error] 	at sbtsonar.SonarPlugin$.$anonfun$projectSettings$5(SonarPlugin.scala:111)
[error] 	at sbtsonar.SonarPlugin$.$anonfun$projectSettings$5$adapted(SonarPlugin.scala:85)
[error] 	at sbtsonar.SonarPlugin$$$Lambda$3814.000000009A7CECD0.apply(Unknown Source)
[error] 	at scala.Function1.$anonfun$compose$1(Function1.scala:49)
[error] 	at scala.Function1$$Lambda$416.000000001C5A2A60.apply(Unknown Source)
[error] 	at sbt.internal.util.$tilde$greater.$anonfun$$u2219$1(TypeFunctions.scala:62)
[error] 	at sbt.internal.util.$tilde$greater$$Lambda$2713.0000000099AAD5C0.apply(Unknown Source)
[error] 	at sbt.std.Transform$$anon$4.work(Transform.scala:68)
[error] 	at sbt.Execute.$anonfun$submit$2(Execute.scala:282)
[error] 	at sbt.Execute$$Lambda$2738.00000000D0002D50.apply(Unknown Source)
[error] 	at sbt.internal.util.ErrorHandling$.wideConvert(ErrorHandling.scala:23)
[error] 	at sbt.Execute.work(Execute.scala:291)
[error] 	at sbt.Execute.$anonfun$submit$1(Execute.scala:282)
[error] 	at sbt.Execute$$Lambda$2723.0000000099AB65A0.apply(Unknown Source)
[error] 	at sbt.ConcurrentRestrictions$$anon$4.$anonfun$submitValid$1(ConcurrentRestrictions.scala:265)
[error] 	at sbt.ConcurrentRestrictions$$anon$4$$Lambda$2736.0000000099AB8750.apply(Unknown Source)
[error] 	at sbt.CompletionService$$anon$2.call(CompletionService.scala:64)
[error] 	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
[error] 	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
[error] 	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
[error] 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
[error] 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
[error] 	at java.lang.Thread.run(Thread.java:819)

@mwz
Copy link
Member

mwz commented May 20, 2021

Hi, yes - what you probably want to do is to define an aggregate project across all of your subprojects and trigger the sonarScan job on that project with the aggregate in sonarScan := false setting so that running the scan across all of your subprojects gets delegated to the sonar scanner (it will run them sequentially which will prevent the lock exception from being thrown). Does that make sense?

@joshserrin
Copy link

Yes, makes sense. We'll give that a shot. Thanks for the speed response!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants