SonarQube Server - Developer Edition

I have upgraded SonarQube -developer edition v2025.1. When running the command “SonarScanner.MSBuild.exe end” with sonar.token, it is throwing the below error.

WARN: The Data Dictionary is not configured for the PLSQL analyzer, which prevents rule(s) S3641, S3921, S3618, S3651 from raising issues. See https://docs.sonarqube.org/latest/analysis/languages/plsql/
INFO: 2 source files to be analyzed
WARN: 
WARN: Unable to fully parse: D:/Jenkins/workspace/OAPFlex_Sonar/BuildTools/dropDB.sql
WARN: Parse error starting from line 10
WARN: 
INFO: 2/2 source files have been analyzed
INFO: Sensor PL/SQL Sensor [plsql] (done) | time=156ms
INFO: Sensor HTML [web]
INFO: Sensor HTML [web] (done) | time=2702ms
INFO: Sensor IaC Docker Sensor [iac]
INFO: 0 source files to be analyzed
INFO: 0/0 source files have been analyzed
INFO: Sensor IaC Docker Sensor [iac] (done) | time=9ms
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=0ms
INFO: Sensor AWS SAM template file sensor [security]
INFO: Sensor AWS SAM template file sensor [security] (done) | time=0ms
INFO: Sensor AWS SAM Inline template file sensor [security]
INFO: Sensor AWS SAM Inline template file sensor [security] (done) | time=0ms
INFO: Sensor CFamily [cpp]
INFO: CFamily plugin version: 6.62.0.78645 (829eaa25b0b1054f587bbeeb168e51409c72f905)
INFO: CFamily analysis configuration mode: Build-Wrapper
INFO: Using build-wrapper output: D:\Jenkins\workspace\OAPFlex_Sonar\bfw_output\build-wrapper-dump.json
INFO: Available processors: 4
INFO: Using 4 threads for analysis.
INFO: Found empty cache on server
INFO: Time spent writing ucfgs 703ms
INFO: ------------------------------------------------------------------------
INFO: EXECUTION FAILURE
INFO: ------------------------------------------------------------------------
INFO: Total time: 2:02.267s
INFO: Final Memory: 39M/148M
INFO: ------------------------------------------------------------------------
ERROR: Error during SonarScanner execution
java.lang.IllegalStateException: java.nio.file.NoSuchFileException: D:\Jenkins\workspace\OAPFlex_Sonar\bfw_output\build-wrapper-dump.json
        at com.sonar.cpp.plugin.BuildWrapperJsonReader.readCaptures(BuildWrapperJsonReader.java:125)
        at com.sonar.cpp.plugin.CFamilySensor.process(CFamilySensor.java:594)
        at com.sonar.cpp.plugin.CFamilySensor.processConfigurationReader(CFamilySensor.java:504)
        at com.sonar.cpp.plugin.CFamilySensor.lambda$process$3(CFamilySensor.java:246)
        at java.base/java.lang.Iterable.forEach(Unknown Source)
        at com.sonar.cpp.plugin.CFamilySensor.process(CFamilySensor.java:246)
        at com.sonar.cpp.plugin.CFamilySensor.execute(CFamilySensor.java:190)
        at org.sonar.scanner.sensor.AbstractSensorWrapper.analyse(AbstractSensorWrapper.java:64)
        at org.sonar.scanner.sensor.ModuleSensorsExecutor.execute(ModuleSensorsExecutor.java:88)
        at org.sonar.scanner.sensor.ModuleSensorsExecutor.execute(ModuleSensorsExecutor.java:64)
        at org.sonar.scanner.scan.SpringModuleScanContainer.doAfterStart(SpringModuleScanContainer.java:82)
        at org.sonar.core.platform.SpringComponentContainer.startComponents(SpringComponentContainer.java:226)
        at org.sonar.core.platform.SpringComponentContainer.execute(SpringComponentContainer.java:205)
        at org.sonar.scanner.scan.SpringProjectScanContainer.scan(SpringProjectScanContainer.java:201)
        at org.sonar.scanner.scan.SpringProjectScanContainer.scanRecursively(SpringProjectScanContainer.java:197)
        at org.sonar.scanner.scan.SpringProjectScanContainer.doAfterStart(SpringProjectScanContainer.java:170)
        at org.sonar.core.platform.SpringComponentContainer.startComponents(SpringComponentContainer.java:226)
        at org.sonar.core.platform.SpringComponentContainer.execute(SpringComponentContainer.java:205)
        at org.sonar.scanner.bootstrap.SpringScannerContainer.doAfterStart(SpringScannerContainer.java:350)
        at org.sonar.core.platform.SpringComponentContainer.startComponents(SpringComponentContainer.java:226)
        at org.sonar.core.platform.SpringComponentContainer.execute(SpringComponentContainer.java:205)
        at org.sonar.scanner.bootstrap.SpringGlobalContainer.doAfterStart(SpringGlobalContainer.java:142)
        at org.sonar.core.platform.SpringComponentContainer.startComponents(SpringComponentContainer.java:226)
        at org.sonar.core.platform.SpringComponentContainer.execute(SpringComponentContainer.java:205)
        at org.sonar.batch.bootstrapper.Batch.doExecute(Batch.java:73)
        at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:67)
        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 jdk.proxy1/jdk.proxy1.$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:126)
        at org.sonarsource.scanner.cli.Main.execute(Main.java:81)
        at org.sonarsource.scanner.cli.Main.main(Main.java:62)
Caused by: java.nio.file.NoSuchFileException: D:\Jenkins\workspace\OAPFlex_Sonar\bfw_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:130)
        at com.sonar.cpp.plugin.BuildWrapperJsonReader.readCaptures(BuildWrapperJsonReader.java:68)
        ... 37 more
ERROR:
The SonarScanner did not complete successfully
22:33:49.927  Post-processing failed. Exit code: 1

Hi,

It seems that you’ve configured analysis with a Compilation Database file that doesn’t exist (with sonar.cfamily.compile-commands).

Does your project actually contain C or C++?

 
Ann

Yes Ann. This project contains C++ code.

Hi,

And are you creating a compilation database? Where is it output to?

 
Ann

Hi Ann,
Below is the complete scan log by running the below commands.

SonarScanner.MSBuild.exe begin /key:OAP_Flex_Release /d:sonar.host.url=http://ffcsonarqube.corp.xerox.com:9000 /d:sonar.token=squ_xxx /d:sonar.dotnet.excludeTestProjects=true /d:sonar.cfamily.build-wrapper-output="bfw_output"
call build-wrapper-win-x86-64.exe --out-dir bw_output msb.bat buildall > "D:\Jenkins\workspace\OAPFlex_Sonar\Log\OAP_build.log"
SonarScanner.MSBuild.exe end /d:sonar.token=squ_xxx

SonarScanner for MSBuild 9.2.1
Using the .NET Framework version of the Scanner for MSBuild
Pre-processing started.
Preparing working directories…
00:54:35.939 Updating build integration targets…
00:54:36.573 Using SonarQube v2025.1.0.102418.
00:54:36.669 Fetching analysis configuration settings…
00:54:37.386 Provisioning analyzer assemblies for cs…
00:54:37.393 Installing required Roslyn analyzers…
00:54:37.394 Processing plugin: securitycsharpfrontend version 10.11.0.34915
00:54:38.673 Processing plugin: csharpenterprise version 10.4.0.108396
00:54:39.196 Provisioning analyzer assemblies for vbnet…
00:54:39.201 Installing required Roslyn analyzers…
00:54:39.202 Processing plugin: vbnetenterprise version 10.4.0.108396
00:54:39.396 Incremental PR analysis: Base branch parameter was not provided.
00:54:39.402 Cache data is empty. A full analysis will be performed.
00:54:39.455 WARNING: Multi-Language analysis is enabled. If this was not intended and you have issues such as hitting your LOC limit or analyzing unwanted files, please set “/d:sonar.scanner.scanAll=false” in the begin step.
00:54:39.481 Pre-processing succeeded.

I am not explicitly creating any compilation database.

Hi,

First, the post with your commands contained both your full SQ URL and an unredacted analysis token. I’ve edited the token out, but the internet never forgets. So you need to revoke that token immediately and replace it with a new one in your pipelines.

Regarding the content of your posts, you seem to be using SonarScanner for .NET. Is there C# in your project?

 
Ann

I changed the token.
yes Ann. It contains C# also.

Hi,

Thanks for that confirmation. You seem to be mainly running your steps per the docs.

Now, it seems that we have different locations for the build wrapper output file. From your error message:

If I assume that OAPFlex_Sonar is the project root, then the relative directory becomes
bfw_output\build-wrapper-dump.json

That matches where you tell analysis to look for the file in the begin step:

But it’s actually output to a different directory:

 
HTH,
Ann

Hi Ann,
Thanks for your input. I resolved the build-wrapper-output issue. After that, below error is occurring.

Property 'sonar.cfamily.build-wrapper-output' is deprecated; build-wrapper now generates a compilation database.
Please use the property 'sonar.cfamily.compile-commands' instead to specify the path of the 'compile_commands.json' file generated inside the build-wrapper output directory.
Visit the documentation for more up-to-date information on analysis using build-wrapper https://docs.sonarsource.com/sonarqube/2025.1/analyzing-source-code/languages/c-family/prerequisites/

WARN: Microsoft extension activated by "/clr:nostdlib" compiler option is not supported, skip analysis of files: [D:/Jenkins/workspace/OAPFlex_Sonar/Services/Imposition/src/xdprend/XDPRendiTextCtx/stdafx.cpp]
WARN: Microsoft extension activated by "/clr:nostdlib" compiler option is not supported, skip analysis of files: [D:/Jenkins/workspace/OAPFlex_Sonar/Services/Imposition/src/xdprend/XDPRendiTextCtx/PDFiTextCtx.cpp, D:/Jenkins/workspace/OAPFlex_Sonar/Services/Imposition/src/xdprend/XDPRendiTextCtx/XDPRendiTextCtxDll.cpp]
WARN: Microsoft extension activated by "/clr:nostdlib" compiler option is not supported, skip analysis of files: [D:/Jenkins/workspace/OAPFlex_Sonar/Services/Imposition/src/xdprend/XDPRendiTextCtx/Release/.NETFramework,Version=v4.8.AssemblyAttributes.cpp]
INFO: Detected compilers: cl=3
INFO: Detected standards:
INFO: 0/472 files marked as unchanged
INFO: Analysis cache: 0/0 hits, 125 bytes
INFO: Time spent writing ucfgs 624ms
INFO: ------------------------------------------------------------------------
INFO: EXECUTION FAILURE
INFO: ------------------------------------------------------------------------
INFO: Total time: 2:51.902s
INFO: Final Memory: 43M/160M
INFO: ------------------------------------------------------------------------
ERROR: Error during SonarScanner execution
java.lang.IllegalStateException: The "build-wrapper-dump.json" file was found but 0 C/C++/Objective-C files were analyzed. Please make sure that:
  * you are using the latest version of the build-wrapper and the CFamily analyzer
  * you are correctly invoking the scanner with correct configuration
  * your compiler is supported
  * you are wrapping your build correctly
  * you are wrapping a full/clean build
  * you are providing the path to the correct build-wrapper output directory
  * you are building and analyzing the same source checkout, absolute paths must be identical in build and analysis steps
        at com.sonar.cpp.plugin.CFamilySensor.process(CFamilySensor.java:314)
        at com.sonar.cpp.plugin.CFamilySensor.execute(CFamilySensor.java:190)
        at org.sonar.scanner.sensor.AbstractSensorWrapper.analyse(AbstractSensorWrapper.java:64)
        at org.sonar.scanner.sensor.ModuleSensorsExecutor.execute(ModuleSensorsExecutor.java:88)
        at org.sonar.scanner.sensor.ModuleSensorsExecutor.execute(ModuleSensorsExecutor.java:64)
        at org.sonar.scanner.scan.SpringModuleScanContainer.doAfterStart(SpringModuleScanContainer.java:82)
        at org.sonar.core.platform.SpringComponentContainer.startComponents(SpringComponentContainer.java:226)
        at org.sonar.core.platform.SpringComponentContainer.execute(SpringComponentContainer.java:205)
        at org.sonar.scanner.scan.SpringProjectScanContainer.scan(SpringProjectScanContainer.java:201)
        at org.sonar.scanner.scan.SpringProjectScanContainer.scanRecursively(SpringProjectScanContainer.java:197)
        at org.sonar.scanner.scan.SpringProjectScanContainer.doAfterStart(SpringProjectScanContainer.java:170)
        at org.sonar.core.platform.SpringComponentContainer.startComponents(SpringComponentContainer.java:226)
        at org.sonar.core.platform.SpringComponentContainer.execute(SpringComponentContainer.java:205)
        at org.sonar.scanner.bootstrap.SpringScannerContainer.doAfterStart(SpringScannerContainer.java:350)
        at org.sonar.core.platform.SpringComponentContainer.startComponents(SpringComponentContainer.java:226)
        at org.sonar.core.platform.SpringComponentContainer.execute(SpringComponentContainer.java:205)
        at org.sonar.scanner.bootstrap.SpringGlobalContainer.doAfterStart(SpringGlobalContainer.java:142)
        at org.sonar.core.platform.SpringComponentContainer.startComponents(SpringComponentContainer.java:226)
        at org.sonar.core.platform.SpringComponentContainer.execute(SpringComponentContainer.java:205)
        at org.sonar.batch.bootstrapper.Batch.doExecute(Batch.java:73)
        at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:67)
        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 jdk.proxy1/jdk.proxy1.$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:126)
        at org.sonarsource.scanner.cli.Main.execute(Main.java:81)
        at org.sonarsource.scanner.cli.Main.main(Main.java:62)
ERROR:
The SonarScanner did not complete successfully
03:06:48.775  Post-processing failed. Exit code: 1

Hi,

The error message gives you a list of things to check. Have you checked them?

 
Ann

Hi Ann,
Thanks for your support. I have checked everything and they are latest and correct only. After that I ran the sonar scan and it got succeeded.

INFO: Time spent writing ucfgs 600ms
INFO: Analysis total time: 20:45.427 s
INFO: ------------------------------------------------------------------------
INFO: EXECUTION SUCCESS
INFO: ------------------------------------------------------------------------
INFO: Total time: 20:53.304s
INFO: Final Memory: 95M/336M
INFO: ------------------------------------------------------------------------
The SonarScanner CLI has finished
04:12:39.081 Post-processing succeeded.

1 Like