NullPointerException when sending to SonarCloud


(Miquel Labòria) #1

When we are sending info to SonarCloud we have this error:

	at com.sonar.cpp.N.A.A(na:2528)
	at com.sonar.cpp.N.A.A(na:1834)
	at java.base/java.util.HashMap.computeIfAbsent(
	at com.sonar.cpp.N.A.A(na:2468)
	at com.sonar.cpp.N.A.A(na:2506)
	at com.sonar.cpp.plugin.R.A(na:3517)
	at com.sonar.cpp.plugin.R.execute(na:1072)
	at org.sonar.scanner.sensor.SensorWrapper.analyse(
	at org.sonar.scanner.phases.SensorsExecutor.execute(
	at org.sonar.scanner.phases.SensorsExecutor.lambda$execute$1(
	at org.sonar.scanner.phases.SensorsExecutor.withGlobalStrategy(
	at org.sonar.scanner.phases.SensorsExecutor.execute(
	at org.sonar.scanner.phases.AbstractPhaseExecutor.execute(
	at org.sonar.scanner.scan.ModuleScanContainer.doAfterStart(
	at org.sonar.core.platform.ComponentContainer.startComponents(
	at org.sonar.core.platform.ComponentContainer.execute(
	at org.sonar.scanner.scan.ProjectScanContainer.scan(
	at org.sonar.scanner.scan.ProjectScanContainer.scanRecursively(
	at org.sonar.scanner.scan.ProjectScanContainer.doAfterStart(
	at org.sonar.core.platform.ComponentContainer.startComponents(
	at org.sonar.core.platform.ComponentContainer.execute(
	at org.sonar.scanner.task.ScanTask.execute(
	at org.sonar.scanner.task.TaskContainer.doAfterStart(
	at org.sonar.core.platform.ComponentContainer.startComponents(
	at org.sonar.core.platform.ComponentContainer.execute(
	at org.sonar.scanner.bootstrap.GlobalContainer.executeTask(
	at org.sonar.batch.bootstrapper.Batch.doExecuteTask(
	at org.sonar.batch.bootstrapper.Batch.execute(
	at org.sonarsource.scanner.api.internal.batch.BatchIsolatedLauncher.execute(
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(
	at java.base/java.lang.reflect.Method.invoke(
	at org.sonarsource.scanner.api.internal.IsolatedLauncherProxy.invoke(
	at com.sun.proxy.$Proxy0.execute(Unknown Source)
	at org.sonarsource.scanner.api.EmbeddedScanner.doExecute(
	at org.sonarsource.scanner.api.EmbeddedScanner.execute(
	at org.sonarsource.scanner.cli.Main.execute(
	at org.sonarsource.scanner.cli.Main.execute(
	at org.sonarsource.scanner.cli.Main.main(

¿Any idea?

(Loïc Joly) #3

Hello Miquel,

Could you please send us the full logs (including build wrapper logs), because it’s hard to get an idea just with this information?

By the way, could you also make sure that the version of build wrapper you use matches the CFamily plugin (you can do that just by downloading it from the server). This issue might be linked to the use of an outdated version of this tool.

Thank you,

(Miquel Labòria) #5

I think the problem is trying to send data to Github Pull Request, because if we launch a complete scan it works fine.

(Jean-Denis Coffre) #6


For your information Github Pull Request analysis makes you able to decorate Github pull requests. It does not make you able to analyze a peace of your project. Whatever if you are using this plugin or not, you should build and analyze the entire project.

If the problem persist when you are using n Github Pull Request analysis even if you are running a full build and analysis of the project, thank you for reproducing and for providing:

  • the logs of the scanner (console logs that are printed during the analysis)
  • the build-wrapper outputs (all that is included in the folder you are using to run the build wrapper)