JaCoCo error since today

Hi,

Since this afternoon we are having issues on multiple projects using JaCoCo.

The coverage does not show up on SonarCloud. When looking at the logs of the github action, we get this error message for all the modules in the project:

In our pom.xml file, we the xml report paths are defined like this:


We also have a special package with an extra jacoco profile:

Until today, we did not have any issue with seeing the coverage on SonarCloud and the error did not show up in the actions’ logs.
The issue is likely linked to this recent change: JACOCO-74 Import coverage for files whose name and package clashes across different nested modules by dorian-burihabwa-sonarsource · Pull Request #156 · SonarSource/sonar-jacoco · GitHub

3 Likes
  • ALM used: GitHub

  • CI system used: Jenkins

  • Languages of the repository: Java 21, JavaScript/TypeScript, JSP

  • Error observed:

[ERROR] Coverage report '/home/****/workspace/ETECH_eTech_PR-21895/etech-webapp/../jacoco-report/jacoco.xml' could not be read/imported. Error: {}
java.lang.NullPointerException: Cannot invoke "org.sonar.plugins.jacoco.ProjectCoverageContext.getModuleContexts()" because "this.projectCoverageContext" is null
	at org.sonar.plugins.jacoco.FileLocator.getInputFileForProject(FileLocator.java:92)
	at org.sonar.plugins.jacoco.FileLocator.getInputFile(FileLocator.java:73)
	at org.sonar.plugins.jacoco.SensorUtils.importReport(SensorUtils.java:35)
	at org.sonar.plugins.jacoco.JacocoSensor.importReports(JacocoSensor.java:69)
	at org.sonar.plugins.jacoco.JacocoSensor.execute(JacocoSensor.java:60)
	at org.sonar.scanner.sensor.AbstractSensorWrapper.analyse(AbstractSensorWrapper.java:68)
	at org.sonar.scanner.sensor.ModuleSensorsExecutor.execute(ModuleSensorsExecutor.java:75)
	at org.sonar.scanner.sensor.ModuleSensorsExecutor.lambda$execute$1(ModuleSensorsExecutor.java:48)
	at org.sonar.scanner.sensor.ModuleSensorsExecutor.withModuleStrategy(ModuleSensorsExecutor.java:66)
	at org.sonar.scanner.sensor.ModuleSensorsExecutor.execute(ModuleSensorsExecutor.java:48)
	at org.sonar.scanner.scan.SpringModuleScanContainer.doAfterStart(SpringModuleScanContainer.java:66)
	at org.sonar.core.platform.SpringComponentContainer.startComponents(SpringComponentContainer.java:210)
	at org.sonar.core.platform.SpringComponentContainer.execute(SpringComponentContainer.java:189)
	at org.sonar.scanner.scan.SpringProjectScanContainer.scan(SpringProjectScanContainer.java:197)
	at org.sonar.scanner.scan.SpringProjectScanContainer.scanRecursively(SpringProjectScanContainer.java:192)
	at org.sonar.scanner.scan.SpringProjectScanContainer.scanRecursively(SpringProjectScanContainer.java:190)
	at org.sonar.scanner.scan.SpringProjectScanContainer.doAfterStart(SpringProjectScanContainer.java:160)
	at org.sonar.core.platform.SpringComponentContainer.startComponents(SpringComponentContainer.java:210)
	at org.sonar.core.platform.SpringComponentContainer.execute(SpringComponentContainer.java:189)
	at org.sonar.scanner.bootstrap.SpringScannerContainer.doAfterStart(SpringScannerContainer.java:471)
	at org.sonar.core.platform.SpringComponentContainer.startComponents(SpringComponentContainer.java:210)
	at org.sonar.core.platform.SpringComponentContainer.execute(SpringComponentContainer.java:189)
	at org.sonar.scanner.bootstrap.SpringGlobalContainer.doAfterStart(SpringGlobalContainer.java:146)
	at org.sonar.core.platform.SpringComponentContainer.startComponents(SpringComponentContainer.java:210)
	at org.sonar.core.platform.SpringComponentContainer.execute(SpringComponentContainer.java:189)
	at org.sonar.scanner.bootstrap.ScannerMain.runScannerEngine(ScannerMain.java:143)
	at org.sonar.scanner.bootstrap.ScannerMain.run(ScannerMain.java:58)
	at org.sonar.scanner.bootstrap.ScannerMain.main(ScannerMain.java:42)

This error occurs for every module in our multi-module Maven project. This also happens to other projects in our organization. We reverted to working versions of the code and this did not fix the issue. Is this happening to someone else ?

3 Likes

Same problem on our end.
We also started seeing these in our logs.
Coverage is being reported as 0.

CI system used: GitHub Actions
Java 25
Build tool: Maven

Hi all,

Thanks for these reports! I’ve merged two threads together here.

We’re rolling this change back. It should hit in a couple of a few hours. Sorry for the inconvenience.

 
Ann

2 Likes

Phew… thanks! I didn’t understand what was going on…

I’m still experiencing this, but only 1 hour has passed.

1 Like

Hi all,

The rollback is complete. Thanks for your patience!

 
Ann

3 Likes