# Jgit Error during SonarScanner execution

**URL:** <https://community.sonarsource.com/t/jgit-error-during-sonarscanner-execution/103579>\
**Category:** SonarQube Cloud\
**Tags:** scanner, sonarqube-cloud\
**Created:** [October 31, 2023, 4:07pm UTC](https://community.sonarsource.com/t/jgit-error-during-sonarscanner-execution/103579 "2023-10-31T16:07:37Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![bherger](https://avatars.discourse-cdn.com/v4/letter/b/54ee81/32.png) [@bherger](https://community.sonarsource.com/u/bherger)\
**Post date:** [October 31, 2023, 4:07pm UTC](https://community.sonarsource.com/t/jgit-error-during-sonarscanner-execution/103579/1 "2023-10-31T16:07:37Z")

</div>

## 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

```auto
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](https://community.sonarsource.com/uploads/short-url/6cOfsxNTgru6ZMqJBJIklNK2O2D.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

```auto
sonar.projectKey=***
sonar.projectName=***
sonar.sources=src
sonar.exclusions=\
    external/**/*, \
    Core/**/*, \
    Drivers/**/*, \
    Debug/**/*, \
    src/Template.*, \
    .settings/**/*, \
    .metadata/**/*, \
    tools/**/*

```

## CLI

```auto
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:

```auto
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:

```auto
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

```

---

<div class="post-metadata">

**Author:** ![ezrabrooks](https://avatars.discourse-cdn.com/v4/letter/e/e8c25b/32.png) [@ezrabrooks](https://community.sonarsource.com/u/ezrabrooks)\
**Post date:** [October 31, 2023, 8:09pm UTC](https://community.sonarsource.com/t/jgit-error-during-sonarscanner-execution/103579/2 "2023-10-31T20:09:28Z")

</div>

I’m seeing this issue as well. No Sonar scans are completing, and my team is stuck just having to override our CI pipeline and merge past failures.

---

<div class="post-metadata">

**Author:** ![bherger](https://avatars.discourse-cdn.com/v4/letter/b/54ee81/32.png) [@bherger](https://community.sonarsource.com/u/bherger)\
**Post date:** [November 1, 2023, 1:06pm UTC](https://community.sonarsource.com/t/jgit-error-during-sonarscanner-execution/103579/3 "2023-11-01T13:06:41Z")

</div>

Ezra, do you happen to have a recursive submodules in your repo? That seems to be a notable difference between repos which scan fine for us, versus those that do not.

```auto
<repo root>
|_ submodule A
   |_ submodule Z (recursive)
|_ submodule B
   |_ submodule Z (recursive)
|_ submodule Z (in root)

```

---

<div class="post-metadata">

**Author:** ![ezrabrooks](https://avatars.discourse-cdn.com/v4/letter/e/e8c25b/32.png) [@ezrabrooks](https://community.sonarsource.com/u/ezrabrooks)\
**Post date:** [November 1, 2023, 2:11pm UTC](https://community.sonarsource.com/t/jgit-error-during-sonarscanner-execution/103579/4 "2023-11-01T14:11:59Z")

</div>

Yes, we do.

---

<div class="post-metadata">

**Author:** ![william-keen-aptitud](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/william-keen-aptitud/32/51123_2.png) [@william-keen-aptitud](https://community.sonarsource.com/u/william-keen-aptitud)\
**Post date:** [November 1, 2023, 4:02pm UTC](https://community.sonarsource.com/t/jgit-error-during-sonarscanner-execution/103579/5 "2023-11-01T16:02:59Z")

</div>

We’re having a similar issue. The TextAndSecrets scanner from the sonar-text plugin appears to be missing the class org.eclipse.jgit.util.FS$ExecutionResult in version 2.6.1.1316  
Other classes from org.eclipse.jgit.util.FS are present in the jar, just not ExecutionResult

This is blocking all of our sonar scans on sonarcloud using this version of the plugin, and as the plugin goes into the users sonar cache I don’t see an obvious way to force a downgrade of the version used, or to even skip the scanner temporarily.

---

<div class="post-metadata">

**Author:** ![dmeneses](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/dmeneses/32/2933_2.png) [@dmeneses](https://community.sonarsource.com/u/dmeneses)\
**Post date:** [November 1, 2023, 4:39pm UTC](https://community.sonarsource.com/t/jgit-error-during-sonarscanner-execution/103579/7 "2023-11-01T16:39:28Z")

</div>

Hi @william-keen-aptitud  
Just to confirm, are you experiencing this problem today?

---

<div class="post-metadata">

**Author:** ![ezrabrooks](https://avatars.discourse-cdn.com/v4/letter/e/e8c25b/32.png) [@ezrabrooks](https://community.sonarsource.com/u/ezrabrooks)\
**Post date:** [November 1, 2023, 4:45pm UTC](https://community.sonarsource.com/t/jgit-error-during-sonarscanner-execution/103579/8 "2023-11-01T16:45:57Z")

</div>

I can confirm I just experienced it like two minutes ago in a CI job on my project.

---

<div class="post-metadata">

**Author:** ![ganncamp](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/ganncamp/32/1261_2.png) [@ganncamp](https://community.sonarsource.com/u/ganncamp)\
**Post date:** [November 1, 2023, 4:59pm UTC](https://community.sonarsource.com/t/jgit-error-during-sonarscanner-execution/103579/9 "2023-11-01T16:59:06Z")

</div>

Hi,

Thanks for the confirmation. We did release a new version of that sensor yesterday. We’re starting the rollback now. It should be done in a few hours.

&nbsp;  
Ann

---

<div class="post-metadata">

**Author:** ![matt.bulwan](https://avatars.discourse-cdn.com/v4/letter/m/ee7513/32.png) [@matt.bulwan](https://community.sonarsource.com/u/matt.bulwan)\
**Post date:** [November 1, 2023, 8:11pm UTC](https://community.sonarsource.com/t/jgit-error-during-sonarscanner-execution/103579/10 "2023-11-01T20:11:07Z")

</div>

Hi,  
We completed the rollback and restored the serving of the ‘sonar-text-plugin-2.5.0.2293.jar’ version. You should no longer see the issue once you re-run the CI pipeline.

---

<div class="post-metadata">

**Author:** ![ganncamp](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/ganncamp/32/1261_2.png) [@ganncamp](https://community.sonarsource.com/u/ganncamp)\
**Post date:** [November 2, 2023, 12:48pm UTC](https://community.sonarsource.com/t/jgit-error-during-sonarscanner-execution/103579/11 "2023-11-02T12:48:44Z")

</div>

Hi all,

Can anyone confirm whether they’re still seeing the problem or not?

&nbsp;  
Thx,  
Ann

---

<div class="post-metadata">

**Author:** ![bherger](https://avatars.discourse-cdn.com/v4/letter/b/54ee81/32.png) [@bherger](https://community.sonarsource.com/u/bherger)\
**Post date:** [November 2, 2023, 2:10pm UTC](https://community.sonarsource.com/t/jgit-error-during-sonarscanner-execution/103579/12 "2023-11-02T14:10:01Z")

</div>

I have confirmed it is working for us as it did before.  
Thank you Ann, Matt, and Duarte.

---

<div class="post-metadata">

**Author:** ![ganncamp](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/ganncamp/32/1261_2.png) [@ganncamp](https://community.sonarsource.com/u/ganncamp)\
**Post date:** [November 2, 2023, 2:28pm UTC](https://community.sonarsource.com/t/jgit-error-during-sonarscanner-execution/103579/13 "2023-11-02T14:28:28Z")

</div>

Hi @bherger,

Thanks for the confirmation!

&nbsp;  
Ann

---

<div class="post-metadata">

**Author:** ![william-keen-aptitud](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/william-keen-aptitud/32/51123_2.png) [@william-keen-aptitud](https://community.sonarsource.com/u/william-keen-aptitud)\
**Post date:** [November 2, 2023, 3:29pm UTC](https://community.sonarsource.com/t/jgit-error-during-sonarscanner-execution/103579/16 "2023-11-02T15:29:46Z")

</div>

I can also confirm, we’re functional again. Thank you for the quick response
