ERROR: Error during SonarScanner execution , java.nio.file.NoSuchFileException

Must-share information (formatted with Markdown):

  • sonarqube-developer-9.4.0.54424
  • normal to run sonar and get code Metrics data ,misrac 2012 for C language
  • Unable to locate the wrong target
The log is:
D:\bc_PRJ\B02\DeliveryBosch_V48_1210_checksum_test>sonar-scanner.bat -D"sonar.projectKey=test_p1" -D"sonar.sources=." -D"sonar.cfamily.build-wrapper-output=bw-output" -D"sonar.host.url=http://localhost:9000" -D"sonar.login=9776cd5b4c3b00565c35fc06622128fcb7f61abc"
INFO: Scanner configuration file: D:\bc_PRJ\B02\sonar-scanner\bin\..\conf\sonar-scanner.properties
INFO: Project root configuration file: D:\bc_PRJ\B02\DeliveryBosch_V48_1210_checksum_test\sonar-project.properties
INFO: SonarScanner 4.7.0.2747
INFO: Java 11.0.14.1 Eclipse Adoptium (64-bit)
INFO: Windows 10 10.0 amd64
INFO: User cache: C:\Users\user1\.sonar\cache
INFO: Scanner configuration file: D:\bc_PRJ\B02\sonar-scanner\bin\..\conf\sonar-scanner.properties
INFO: Project root configuration file: D:\bc_PRJ\B02\DeliveryBosch_V48_1210_checksum_test\sonar-project.properties
INFO: Analyzing on SonarQube server 9.4.0
INFO: Default locale: "zh_CN", source code encoding: "UTF-8"
INFO: Load global settings
INFO: Load global settings (done) | time=117ms
INFO: Server id: 147B411E-AYCyUxWJB9C9h0_wa8Fp
INFO: User cache: C:\Users\user1\.sonar\cache
INFO: Load/download plugins
INFO: Load plugins index
INFO: Load plugins index (done) | time=71ms
INFO: Load/download plugins (done) | time=793ms
INFO: Loaded core extensions: developer-scanner
INFO: Process project properties
INFO: Process project properties (done) | time=19ms
INFO: Execute project builders
INFO: Execute project builders (done) | time=3ms
INFO: Project key: test_p1
INFO: Base dir: D:\bc_PRJ\B02\DeliveryBosch_V48_1210_checksum_test
INFO: Working dir: D:\bc_PRJ\B02\DeliveryBosch_V48_1210_checksum_test\.scannerwork
INFO: Load project settings for component key: 'test_p1'
INFO: Load project settings for component key: 'test_p1' (done) | time=43ms
INFO: Load project branches
INFO: Load project branches (done) | time=39ms
INFO: Load project pull requests
INFO: Load project pull requests (done) | time=26ms
INFO: Load branch configuration
INFO: Load branch configuration (done) | time=5ms
INFO: Load quality profiles
INFO: Load quality profiles (done) | time=154ms
INFO: Load active rules
INFO: Load active rules (done) | time=2696ms
INFO: Load project repositories
INFO: Load project repositories (done) | time=26ms
INFO: Indexing files...
INFO: Project configuration:
INFO: 1094 files indexed
INFO: Quality profile for c: Sonar way
INFO: Quality profile for css: Sonar way
INFO: Quality profile for js: Sonar way
INFO: Quality profile for web: Sonar way
INFO: Quality profile for xml: Sonar way
INFO: ------------- Run sensors on module test_p1
INFO: Load metrics repository
INFO: Load metrics repository (done) | time=24ms
INFO: Sensor C# Project Type Information [csharp]
INFO: Sensor C# Project Type Information [csharp] (done) | time=5ms
INFO: Sensor C# Analysis Log [csharp]
INFO: Sensor C# Analysis Log [csharp] (done) | time=24ms
INFO: Sensor C# Properties [csharp]
INFO: Sensor C# Properties [csharp] (done) | time=0ms
INFO: Sensor HTML [web]
INFO: Sensor HTML [web] (done) | time=1127ms
INFO: Sensor XML Sensor [xml]
INFO: 11 source files to be analyzed
INFO: 11/11 source files have been analyzed
INFO: Sensor XML Sensor [xml] (done) | time=518ms
INFO: Sensor Text Sensor [text]
INFO: 276 source files to be analyzed
WARN: Invalid character encountered in file D:/bc_PRJ/B02/DeliveryBosch_V48_1210_checksum_test/Sources/motor_structure.h at line 186 for encoding UTF-8. Please fix file content or configure the encoding to be used using property 'sonar.sourceEncoding'.
WARN: Invalid character encountered in file D:/bc_PRJ/B02/DeliveryBosch_V48_1210_checksum_test/FreeMaster_S32xx/src_common/freemaster_protocol.h at line 108 for encoding UTF-8. Please fix file content or configure the encoding to be used using property 'sonar.sourceEncoding'.
WARN: Invalid character encountered in file D:/bc_PRJ/B02/DeliveryBosch_V48_1210_checksum_test/Sources/main.c at line 239 for encoding UTF-8. Please fix file content or configure the encoding to be used using property 'sonar.sourceEncoding'.
WARN: Invalid character encountered in file D:/bc_PRJ/B02/DeliveryBosch_V48_1210_checksum_test/Sources/actuate_s32k.c at line 136 for encoding UTF-8. Please fix file content or configure the encoding to be used using property 'sonar.sourceEncoding'.
INFO: 276/276 source files have been analyzed
INFO: Sensor Text Sensor [text] (done) | time=1685ms
INFO: Sensor VB.NET Project Type Information [vbnet]
INFO: Sensor VB.NET Project Type Information [vbnet] (done) | time=4ms
INFO: Sensor VB.NET Analysis Log [vbnet]
INFO: Sensor VB.NET Analysis Log [vbnet] (done) | time=22ms
INFO: Sensor VB.NET Properties [vbnet]
INFO: Sensor VB.NET Properties [vbnet] (done) | time=4ms
INFO: Sensor JaCoCo XML Report Importer [jacoco]
INFO: 'sonar.coverage.jacoco.xmlReportPaths' is not defined. Using default locations: target/site/jacoco/jacoco.xml,target/site/jacoco-it/jacoco.xml,build/reports/jacoco/test/jacocoTestReport.xml
INFO: No report imported, no coverage information will be imported by JaCoCo XML Report Importer
INFO: Sensor JaCoCo XML Report Importer [jacoco] (done) | time=8ms
INFO: Sensor JavaScript analysis [javascript]
INFO: Deploying custom rules bundle jar:file:/C:/Users/user1/.sonar/cache/407d827e66c5794ecc2c8947635359f7/sonar-securityjsfrontend-plugin.jar!/js-vulnerabilities-rules-1.0.0.tgz to D:\bc_PRJ\B02\DeliveryBosch_V48_1210_checksum_test\.scannerwork\.sonartmp\eslint-bridge-bundle\package\custom-rules5341140227442142069
INFO: 13 source files to be analyzed
INFO: 11/13 files analyzed, current file: D:/bc_PRJ/B02/DeliveryBosch_V48_1210_checksum_test/FreeMASTER_control/MCAT/src/JS_functions/inner_PoSpeBemfDQ.js
INFO: 13/13 source files have been analyzed
INFO: Sensor JavaScript analysis [javascript] (done) | time=41370ms
INFO: Sensor TypeScript analysis [javascript]
INFO: No input files found for analysis
INFO: Sensor TypeScript analysis [javascript] (done) | time=3ms
INFO: Sensor CSS Metrics [javascript]
INFO: Sensor CSS Metrics [javascript] (done) | time=69ms
INFO: Sensor CSS Rules [javascript]
INFO: 16 source files to be analyzed
INFO: 16/16 source files have been analyzed
INFO: Sensor CSS Rules [javascript] (done) | time=1717ms
INFO: Sensor ThymeLeaf template sensor [securityjavafrontend]
INFO: Sensor ThymeLeaf template sensor [securityjavafrontend] (done) | time=7ms
INFO: Sensor Serverless configuration file sensor [security]
INFO: 0 Serverless function entries were found in the project
INFO: 0 Serverless function handlers were kept as entrypoints
INFO: Sensor Serverless configuration file sensor [security] (done) | time=19ms
INFO: Sensor AWS SAM template file sensor [security]
INFO: Sensor AWS SAM template file sensor [security] (done) | time=3ms
INFO: Sensor CFamily [cpp]
INFO: CFamily plugin version: 6.32.0.44918
INFO: Using build-wrapper output: D:\bc_PRJ\B02\DeliveryBosch_V48_1210_checksum_test\bw-output\build-wrapper-dump.json
INFO: Available processors: 8
INFO: Using 8 threads for analysis according to value of "sonar.cfamily.threads" property.
WARN:
CFamily plugin supports incremental analysis with the use of a cache:

* if you do not want to enable cache
  please explicitly disable it
  by setting the following property to your analysis:
  sonar.cfamily.cache.enabled=false

* to enable cache please specify the following 2 options:
  sonar.cfamily.cache.enabled=true
  sonar.cfamily.cache.path=relative_or_absolute_path_to_cache_location

* visit the documentation page for more information
  http://localhost:9000/documentation/analysis/languages/cfamily/

INFO: ------------------------------------------------------------------------
INFO: EXECUTION FAILURE
INFO: ------------------------------------------------------------------------
INFO: Total time: 1:17.442s
INFO: Final Memory: 33M/120M
INFO: ------------------------------------------------------------------------
ERROR: Error during SonarScanner execution
java.lang.IllegalStateException: java.nio.file.NoSuchFileException: D:\bc_PRJ\B02\DeliveryBosch_V48_1210_checksum_test\bw-output\build-wrapper-dump.json
        at com.sonar.cpp.plugin.BuildWrapperJsonReader.readCaptures(BuildWrapperJsonReader.java:90)
        at com.sonar.cpp.plugin.CFamilySensor.process(CFamilySensor.java:645)
        at com.sonar.cpp.plugin.CFamilySensor.process(CFamilySensor.java:416)
        at com.sonar.cpp.plugin.CFamilySensor.execute(CFamilySensor.java:186)
        at org.sonar.scanner.sensor.AbstractSensorWrapper.analyse(AbstractSensorWrapper.java:64)
        at org.sonar.scanner.sensor.ModuleSensorsExecutor.execute(ModuleSensorsExecutor.java:85)
        at org.sonar.scanner.sensor.ModuleSensorsExecutor.execute(ModuleSensorsExecutor.java:62)
        at org.sonar.scanner.scan.SpringModuleScanContainer.doAfterStart(SpringModuleScanContainer.java:81)
        at org.sonar.core.platform.SpringComponentContainer.startComponents(SpringComponentContainer.java:188)
        at org.sonar.core.platform.SpringComponentContainer.execute(SpringComponentContainer.java:167)
        at org.sonar.scanner.scan.SpringProjectScanContainer.scan(SpringProjectScanContainer.java:392)
        at org.sonar.scanner.scan.SpringProjectScanContainer.scanRecursively(SpringProjectScanContainer.java:388)
        at org.sonar.scanner.scan.SpringProjectScanContainer.doAfterStart(SpringProjectScanContainer.java:357)
        at org.sonar.core.platform.SpringComponentContainer.startComponents(SpringComponentContainer.java:188)
        at org.sonar.core.platform.SpringComponentContainer.execute(SpringComponentContainer.java:167)
        at org.sonar.scanner.bootstrap.SpringGlobalContainer.doAfterStart(SpringGlobalContainer.java:134)
        at org.sonar.core.platform.SpringComponentContainer.startComponents(SpringComponentContainer.java:188)
        at org.sonar.core.platform.SpringComponentContainer.execute(SpringComponentContainer.java:167)
        at org.sonar.batch.bootstrapper.Batch.doExecute(Batch.java:72)
        at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:66)
        at org.sonarsource.scanner.api.internal.batch.BatchIsolatedLauncher.execute(BatchIsolatedLauncher.java:46)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.base/java.lang.reflect.Method.invoke(Unknown Source)
        at org.sonarsource.scanner.api.internal.IsolatedLauncherProxy.invoke(IsolatedLauncherProxy.java:60)
        at com.sun.proxy.$Proxy0.execute(Unknown Source)
        at org.sonarsource.scanner.api.EmbeddedScanner.doExecute(EmbeddedScanner.java:189)
        at org.sonarsource.scanner.api.EmbeddedScanner.execute(EmbeddedScanner.java:138)
        at org.sonarsource.scanner.cli.Main.execute(Main.java:112)
        at org.sonarsource.scanner.cli.Main.execute(Main.java:75)
        at org.sonarsource.scanner.cli.Main.main(Main.java:61)
Caused by: java.nio.file.NoSuchFileException: D:\bc_PRJ\B02\DeliveryBosch_V48_1210_checksum_test\bw-output\build-wrapper-dump.json
        at java.base/sun.nio.fs.WindowsException.translateToIOException(Unknown Source)
        at java.base/sun.nio.fs.WindowsException.rethrowAsIOException(Unknown Source)
        at java.base/sun.nio.fs.WindowsException.rethrowAsIOException(Unknown Source)
        at java.base/sun.nio.fs.WindowsFileSystemProvider.newByteChannel(Unknown Source)
        at java.base/java.nio.file.Files.newByteChannel(Unknown Source)
        at java.base/java.nio.file.Files.newByteChannel(Unknown Source)
        at java.base/java.nio.file.spi.FileSystemProvider.newInputStream(Unknown Source)
        at java.base/java.nio.file.Files.newInputStream(Unknown Source)
        at java.base/java.nio.file.Files.newBufferedReader(Unknown Source)
        at java.base/java.nio.file.Files.newBufferedReader(Unknown Source)
        at com.sonar.cpp.plugin.BuildWrapperJsonReader.getReader(BuildWrapperJsonReader.java:95)
        at com.sonar.cpp.plugin.BuildWrapperJsonReader.readCaptures(BuildWrapperJsonReader.java:56)
        ... 31 more
ERROR:
ERROR: Re-run SonarScanner using the -X switch to enable full debug logging.

Hey there.

Did you actually run the build with the build wrapper?