Error
We started seeing this error this morning (2023.10.31) during execution of sonar-scanner. It is preventing CI from passing and impacting development
error 31-Oct-2023 14:35:31 at org.eclipse.jgit.util.FS.execute(FS.java:2346)
error 31-Oct-2023 14:35:31 at org.eclipse.jgit.treewalk.WorkingTreeIterator.filterClean(WorkingTreeIterator.java:514)
error 31-Oct-2023 14:35:31 at org.eclipse.jgit.treewalk.WorkingTreeIterator.possiblyFilteredInputStream(WorkingTreeIterator.java:452)
error 31-Oct-2023 14:35:31 at org.eclipse.jgit.treewalk.WorkingTreeIterator.idBufferBlob(WorkingTreeIterator.java:389)
error 31-Oct-2023 14:35:31 at org.eclipse.jgit.treewalk.WorkingTreeIterator.idBuffer(WorkingTreeIterator.java:311)
error 31-Oct-2023 14:35:31 at org.eclipse.jgit.treewalk.AbstractTreeIterator.getEntryObjectId(AbstractTreeIterator.java:408)
error 31-Oct-2023 14:35:31 at org.eclipse.jgit.treewalk.WorkingTreeIterator.contentCheck(WorkingTreeIterator.java:1073)
error 31-Oct-2023 14:35:31 at org.eclipse.jgit.treewalk.WorkingTreeIterator.isModified(WorkingTreeIterator.java:982)
error 31-Oct-2023 14:35:31 at org.eclipse.jgit.treewalk.filter.IndexDiffFilter.include(IndexDiffFilter.java:204)
error 31-Oct-2023 14:35:31 at org.eclipse.jgit.treewalk.filter.TreeFilter.matchFilter(TreeFilter.java:195)
error 31-Oct-2023 14:35:31 at org.eclipse.jgit.treewalk.filter.AndTreeFilter$Binary.matchFilter(AndTreeFilter.java:110)
error 31-Oct-2023 14:35:31 at org.eclipse.jgit.treewalk.TreeWalk.next(TreeWalk.java:917)
error 31-Oct-2023 14:35:31 at org.eclipse.jgit.lib.IndexDiff.diff(IndexDiff.java:485)
error 31-Oct-2023 14:35:31 at org.eclipse.jgit.lib.IndexDiff.diff(IndexDiff.java:384)
error 31-Oct-2023 14:35:31 at org.eclipse.jgit.lib.IndexDiff.diff(IndexDiff.java:614)
error 31-Oct-2023 14:35:31 at org.eclipse.jgit.lib.IndexDiff.diff(IndexDiff.java:384)
error 31-Oct-2023 14:35:31 at org.eclipse.jgit.lib.IndexDiff.diff(IndexDiff.java:614)
error 31-Oct-2023 14:35:31 at org.eclipse.jgit.lib.IndexDiff.diff(IndexDiff.java:384)
error 31-Oct-2023 14:35:31 at org.eclipse.jgit.lib.IndexDiff.diff(IndexDiff.java:358)
error 31-Oct-2023 14:35:31 at org.eclipse.jgit.api.StatusCommand.call(StatusCommand.java:122)
error 31-Oct-2023 14:35:31 at org.sonar.plugins.common.GitTrackedFilePredicate.<init>(GitTrackedFilePredicate.java:41)
error 31-Oct-2023 14:35:31 at org.sonar.plugins.common.TextAndSecretsSensor.constructFilePredicate(TextAndSecretsSensor.java:112)
error 31-Oct-2023 14:35:31 at org.sonar.plugins.common.TextAndSecretsSensor.execute(TextAndSecretsSensor.java:93)
error 31-Oct-2023 14:35:31 at org.sonar.scanner.sensor.AbstractSensorWrapper.analyse(AbstractSensorWrapper.java:62)
error 31-Oct-2023 14:35:31 at org.sonar.scanner.sensor.ModuleSensorsExecutor.execute(ModuleSensorsExecutor.java:75)
error 31-Oct-2023 14:35:31 at org.sonar.scanner.sensor.ModuleSensorsExecutor.lambda$execute$1(ModuleSensorsExecutor.java:48)
error 31-Oct-2023 14:35:31 at org.sonar.scanner.sensor.ModuleSensorsExecutor.withModuleStrategy(ModuleSensorsExecutor.java:66)
error 31-Oct-2023 14:35:31 at org.sonar.scanner.sensor.ModuleSensorsExecutor.execute(ModuleSensorsExecutor.java:48)
error 31-Oct-2023 14:35:31 at org.sonar.scanner.scan.ModuleScanContainer.doAfterStart(ModuleScanContainer.java:64)
error 31-Oct-2023 14:35:31 at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:123)
error 31-Oct-2023 14:35:31 at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:109)
error 31-Oct-2023 14:35:31 at org.sonar.scanner.scan.ProjectScanContainer.scan(ProjectScanContainer.java:173)
error 31-Oct-2023 14:35:31 at org.sonar.scanner.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:169)
error 31-Oct-2023 14:35:31 at org.sonar.scanner.scan.ProjectScanContainer.doAfterStart(ProjectScanContainer.java:140)
error 31-Oct-2023 14:35:31 at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:123)
error 31-Oct-2023 14:35:31 at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:109)
error 31-Oct-2023 14:35:31 at org.sonar.scanner.bootstrap.ScannerContainer.doAfterStart(ScannerContainer.java:398)
error 31-Oct-2023 14:35:31 at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:123)
error 31-Oct-2023 14:35:31 at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:109)
error 31-Oct-2023 14:35:31 at org.sonar.scanner.bootstrap.GlobalContainer.doAfterStart(GlobalContainer.java:128)
error 31-Oct-2023 14:35:31 at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:123)
error 31-Oct-2023 14:35:31 at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:109)
error 31-Oct-2023 14:35:31 at org.sonar.batch.bootstrapper.Batch.doExecute(Batch.java:57)
error 31-Oct-2023 14:35:31 at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:51)
error 31-Oct-2023 14:35:31 at org.sonarsource.scanner.api.internal.batch.BatchIsolatedLauncher.execute(BatchIsolatedLauncher.java:46)
error 31-Oct-2023 14:35:31 at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
error 31-Oct-2023 14:35:31 at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
error 31-Oct-2023 14:35:31 at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
error 31-Oct-2023 14:35:31 at java.base/java.lang.reflect.Method.invoke(Unknown Source)
error 31-Oct-2023 14:35:31 at org.sonarsource.scanner.api.internal.IsolatedLauncherProxy.invoke(IsolatedLauncherProxy.java:60)
error 31-Oct-2023 14:35:31 at jdk.proxy1/jdk.proxy1.$Proxy0.execute(Unknown Source)
error 31-Oct-2023 14:35:31 at org.sonarsource.scanner.api.EmbeddedScanner.doExecute(EmbeddedScanner.java:189)
error 31-Oct-2023 14:35:31 at org.sonarsource.scanner.api.EmbeddedScanner.execute(EmbeddedScanner.java:138)
error 31-Oct-2023 14:35:31 at org.sonarsource.scanner.cli.Main.execute(Main.java:126)
error 31-Oct-2023 14:35:31 at org.sonarsource.scanner.cli.Main.execute(Main.java:81)
error 31-Oct-2023 14:35:31 at org.sonarsource.scanner.cli.Main.main(Main.java:62)
error 31-Oct-2023 14:35:31 Caused by: java.lang.ClassNotFoundException: org.eclipse.jgit.util.FS$ExecutionResult
error 31-Oct-2023 14:35:31 at org.sonar.classloader.ParentFirstStrategy.loadClass(ParentFirstStrategy.java:25)
error 31-Oct-2023 14:35:31 at org.sonar.classloader.ClassRealm.loadClass(ClassRealm.java:83)
error 31-Oct-2023 14:35:31 at org.sonar.classloader.ClassRealm.loadClass(ClassRealm.java:72)
error 31-Oct-2023 14:35:31 ... 56 more
Extended log:
jgit_error.txt (1.5 MB)
Environment
- Sonar: SonarCloud
- ALM: Bitbucket Cloud
- CI system: Bamboo (sonar-scanner from cli)
- sonar-scanner: 5.0.1.3006
- using a Docker image which did not change between pass/fail to execute the scan
- running the docker image from an AWS Elastic agent which did not change between pass/fail
Repo
- Languages of the repository: C
- Notable: this repository has submodules
Config
sonar.projectKey=***
sonar.projectName=***
sonar.sources=src
sonar.exclusions=\
external/**/*, \
Core/**/*, \
Drivers/**/*, \
Debug/**/*, \
src/Template.*, \
.settings/**/*, \
.metadata/**/*, \
tools/**/*
CLI
sonar-scanner \
-Dsonar.projectVersion=0.0.${bamboo_buildNumber} \
-Dsonar.verbose=true \
-Dsonar.cfamily.compile-commands=build/compile_commands.json \
-Dsonar.coverageReportPaths=build/Artifacts/cov/sonarqube/ss.cov.sonarqube.xml \
-Dsonar.host.url=${bamboo_sonar_cloud_host_url} \
-Dsonar.organization=${bamboo_sonar_cloud_organization} \
-Dsonar.token=${bamboo_sonar_cloud_token_secret} \
-Dsonar.branch.name=develop \
-X
Other
We noticed a plugin change was released between builds which seems to add a jgit depenedency.
No issues:
build 30-Oct-2023 17:43:05 17:43:05.581 DEBUG: GET 200 https://scanner.sonarcloud.io/plugins/text/versions/1e105b6a689399faa429b0cc82ba3560.jar | time=15ms
Issue present:
build 31-Oct-2023 13:11:10 13:11:10.734 DEBUG: GET 200 https://scanner.sonarcloud.io/plugins/text/versions/b24d5dd4fb39549b777ccbca432ff77b.jar | time=14ms