Apex language scanning is not working

After installing the enterprise license on SonarQube. Apex language sensor is not working from sonar scanner. Due to this apex language code issues are not reported.

To validate, we installed the SonarQube on difference server and run the sonar scanner and its working as expected.

What might be the issue and how to resolve?

Not working:

Started by user <user name>
Running as SYSTEM
[EnvInject] - Loading node environment variables.
Building remotely on <server> in workspace d:\jenkins\workspace\Diabetes_Omni-Channel_Operations\SONARQUBE_TEST
[WS-CLEANUP] Deleting project workspace...
[WS-CLEANUP] Deferred wipeout is used...
[WS-CLEANUP] Done
using credential 344e19da-ca23-440d-9a02-2cab25220f35
Cloning the remote Git repository
Cloning repository <gitlab url>
 > git init d:\jenkins\workspace\Diabetes_Omni-Channel_Operations\SONARQUBE_TEST # timeout=10
Fetching upstream changes from <gitlab url>
 > git --version # timeout=10
using GIT_ASKPASS to set credentials Jenkins Service Account Credentials
 > git fetch --tags --progress -- <gitlab url> +refs/heads/*:refs/remotes/origin/*
 > git config remote.origin.url <gitlab url> # timeout=10
 > git config --add remote.origin.fetch +refs/heads/*:refs/remotes/origin/* # timeout=10
 > git config remote.origin.url <gitlab url> # timeout=10
Fetching upstream changes from <gitlab url>
using GIT_ASKPASS to set credentials Jenkins Service Account Credentials
 > git fetch --tags --progress -- <gitlab url> +refs/heads/*:refs/remotes/origin/*
 > git rev-parse "refs/remotes/origin/CI^{commit}" # timeout=10
 > git rev-parse "refs/remotes/origin/origin/CI^{commit}" # timeout=10
Checking out Revision 166c48bbd88eef601793a378f6bc576eec53b4e7 (refs/remotes/origin/CI)
 > git config core.sparsecheckout # timeout=10
 > git checkout -f 166c48bbd88eef601793a378f6bc576eec53b4e7
Commit message: "Merge branch 'DevelopmentCTS2' into 'CI'"
 > git rev-list --no-walk 166c48bbd88eef601793a378f6bc576eec53b4e7 # timeout=10
[SONARQUBE_TEST] $ D:\sonarscanner\bin\sonar-scanner.bat -Dsonar.host.url=http://10.0.20.80:9000/sonar/ ******** -Dsonar.login=fe73018d5fde0cc5f98ac5814eec01bf51095947 -Dsonar.sourceEncoding=UTF-8 -Dsonar.projectKey=mtest -Dsonar.host.url=http://10.0.20.80:9000/sonar -Dsonar.sources=src/classes -Dsonar.projectBaseDir=d:\jenkins\workspace\Diabetes_Omni-Channel_Operations\SONARQUBE_TEST
INFO: Scanner configuration file: D:\sonarscanner\bin\..\conf\sonar-scanner.properties
INFO: Project root configuration file: NONE
INFO: SonarScanner 4.3.0.2102
INFO: Java 11.0.3 AdoptOpenJDK (64-bit)
INFO: Windows Server 2016 10.0 amd64
INFO: User cache: C:\Windows\system32\config\systemprofile\.sonar\cache
INFO: Scanner configuration file: D:\sonarscanner\bin\..\conf\sonar-scanner.properties
INFO: Project root configuration file: NONE
INFO: Analyzing on SonarQube server 8.2.0
INFO: Default locale: "en_US", source code encoding: "UTF-8"
INFO: Load global settings
INFO: Load global settings (done) | time=95ms
INFO: Server id: 92D88F0A-AXFzyMaBYbb3PBekcSlt
INFO: User cache: C:\Windows\system32\config\systemprofile\.sonar\cache
INFO: Load/download plugins
INFO: Load plugins index
INFO: Load plugins index (done) | time=60ms
INFO: Load/download plugins (done) | time=357ms
INFO: Loaded core extensions: developer-scanner
INFO: Process project properties
INFO: Process project properties (done) | time=10ms
INFO: Execute project builders
INFO: Execute project builders (done) | time=4ms
INFO: Project key: mtest
INFO: Base dir: D:\jenkins\workspace\Diabetes_Omni-Channel_Operations\SONARQUBE_TEST
INFO: Working dir: d:\jenkins\workspace\Diabetes_Omni-Channel_Operations\SONARQUBE_TEST\.scannerwork
INFO: Load project settings for component key: 'mtest'
INFO: Load project settings for component key: 'mtest' (done) | time=56ms
INFO: Load project branches
INFO: Load project branches (done) | time=40ms
INFO: Load project pull requests
INFO: Load project pull requests (done) | time=26ms
INFO: Load branch configuration
INFO: Load branch configuration (done) | time=3ms
INFO: Load quality profiles
INFO: Load quality profiles (done) | time=81ms
INFO: Detected Jenkins
INFO: Load active rules
INFO: Load active rules (done) | time=1621ms
INFO: Indexing files...
INFO: Project configuration:
INFO: 3597 files indexed
INFO: Quality profile for xml: Sonar way
INFO: ------------- Run sensors on module mtest
INFO: Load metrics repository
INFO: Load metrics repository (done) | time=23ms
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by net.sf.cglib.core.ReflectUtils$1 (file:/C:/Windows/system32/config/systemprofile/.sonar/cache/a89f1943fc75b65becd9fb4ecab8d913/sonar-tsql-plugin.jar) to method java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int,java.security.ProtectionDomain)
WARNING: Please consider reporting this to the maintainers of net.sf.cglib.core.ReflectUtils$1
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
INFO: Sensor SonarCSS Rules [cssfamily]
INFO: No CSS, PHP, HTML or VueJS files are found in the project. CSS analysis is skipped.
INFO: Sensor SonarCSS Rules [cssfamily] (done) | time=8ms
INFO: Sensor JavaXmlSensor [java]
INFO: 1799 source files to be analyzed
INFO: Load project repositories
INFO: Load project repositories (done) | time=194ms
INFO: Sensor JavaXmlSensor [java] (done) | time=4968ms
INFO: 1799/1799 source files have been analyzed
INFO: Sensor HTML [web]
INFO: Sensor HTML [web] (done) | time=16ms
INFO: Sensor XML Sensor [xml]
INFO: 1799 source files to be analyzed
INFO: Sensor XML Sensor [xml] (done) | time=6000ms
INFO: Sensor JaCoCo XML Report Importer [jacoco]
INFO: 1799/1799 source files have been analyzed
INFO: Sensor JaCoCo XML Report Importer [jacoco] (done) | time=18ms
INFO: Sensor ThymeLeaf template sensor [securityjavafrontend]
INFO: Sensor ThymeLeaf template sensor [securityjavafrontend] (done) | time=14ms
INFO: Sensor JavaSecuritySensor [security]
INFO: Reading type hierarchy from: d:\jenkins\workspace\Diabetes_Omni-Channel_Operations\SONARQUBE_TEST\.scannerwork\ucfg2\java
INFO: Read 0 type definitions
INFO: Reading UCFGs from: d:\jenkins\workspace\Diabetes_Omni-Channel_Operations\SONARQUBE_TEST\.scannerwork\ucfg2\java
INFO: No UCFGs have been included for analysis.
INFO: Sensor JavaSecuritySensor [security] (done) | time=7ms
INFO: Sensor CSharpSecuritySensor [security]
INFO: Reading type hierarchy from: d:\jenkins\workspace\Diabetes_Omni-Channel_Operations\SONARQUBE_TEST\ucfg_cs2
INFO: Read 0 type definitions
INFO: Reading UCFGs from: d:\jenkins\workspace\Diabetes_Omni-Channel_Operations\SONARQUBE_TEST\ucfg_cs2
INFO: No UCFGs have been included for analysis.
INFO: Sensor CSharpSecuritySensor [security] (done) | time=1ms
INFO: Sensor PhpSecuritySensor [security]
INFO: Reading type hierarchy from: d:\jenkins\workspace\Diabetes_Omni-Channel_Operations\SONARQUBE_TEST\.scannerwork\ucfg2\php
INFO: Read 0 type definitions
INFO: Reading UCFGs from: d:\jenkins\workspace\Diabetes_Omni-Channel_Operations\SONARQUBE_TEST\.scannerwork\ucfg2\php
INFO: No UCFGs have been included for analysis.
INFO: Sensor PhpSecuritySensor [security] (done) | time=0ms
INFO: Sensor PythonSecuritySensor [security]
INFO: Reading type hierarchy from: d:\jenkins\workspace\Diabetes_Omni-Channel_Operations\SONARQUBE_TEST\.scannerwork\ucfg2\python
INFO: Read 0 type definitions
INFO: Reading UCFGs from: d:\jenkins\workspace\Diabetes_Omni-Channel_Operations\SONARQUBE_TEST\.scannerwork\ucfg2\python
INFO: No UCFGs have been included for analysis.
INFO: Sensor PythonSecuritySensor [security] (done) | time=0ms
INFO: ------------- Run sensors on project
INFO: Sensor Zero Coverage Sensor
INFO: Sensor Zero Coverage Sensor (done) | time=105ms
INFO: SCM Publisher is disabled
INFO: CPD Executor Calculating CPD for 0 files
INFO: CPD Executor CPD calculation finished (done) | time=0ms
INFO: Analysis report generated in 2468ms, dir size=1 MB
INFO: Analysis report compressed in 2863ms, zip size=1 MB
INFO: Analysis report uploaded in 149ms
INFO: ANALYSIS SUCCESSFUL, you can browse http://10.0.20.80:9000/sonar/dashboard?id=mtest
INFO: Note that you will be able to access the updated dashboard once the server has processed the submitted analysis report
INFO: More about the report processing at http://10.0.20.80:9000/sonar/api/ce/task?id=AXO-rYDQvx6am80H-ILI
INFO: Analysis total time: 29.799 s
INFO: ------------------------------------------------------------------------
INFO: EXECUTION SUCCESS
INFO: ------------------------------------------------------------------------
INFO: Total time: 31.578s
INFO: Final Memory: 7M/27M
INFO: ------------------------------------------------------------------------
Finished: SUCCESS

Working with installation- Log:

Started by user <user name>
Running as SYSTEM
[EnvInject] - Loading node environment variables.
Building remotely on <server> in workspace d:\jenkins\workspace\Diabetes_Omni-Channel_Operations\SONARQUBE_TEST
[WS-CLEANUP] Deleting project workspace...
[WS-CLEANUP] Deferred wipeout is used...
[WS-CLEANUP] Done
using credential 344e19da-ca23-440d-9a02-2cab25220f35
Cloning the remote Git repository
Cloning repository <gitlab url>
 > git init d:\jenkins\workspace\Diabetes_Omni-Channel_Operations\SONARQUBE_TEST # timeout=10
Fetching upstream changes from <gitlab url>
 > git --version # timeout=10
using GIT_ASKPASS to set credentials Jenkins Service Account Credentials
 > git fetch --tags --progress -- <gitlab url> +refs/heads/*:refs/remotes/origin/*
 > git config remote.origin.url <gitlab url> # timeout=10
 > git config --add remote.origin.fetch +refs/heads/*:refs/remotes/origin/* # timeout=10
 > git config remote.origin.url <gitlab url> # timeout=10
Fetching upstream changes from <gitlab url>
using GIT_ASKPASS to set credentials Jenkins Service Account Credentials
 > git fetch --tags --progress -- <gitlab url> +refs/heads/*:refs/remotes/origin/*
 > git rev-parse "refs/remotes/origin/CI^{commit}" # timeout=10
 > git rev-parse "refs/remotes/origin/origin/CI^{commit}" # timeout=10
Checking out Revision 166c48bbd88eef601793a378f6bc576eec53b4e7 (refs/remotes/origin/CI)
 > git config core.sparsecheckout # timeout=10
 > git checkout -f 166c48bbd88eef601793a378f6bc576eec53b4e7
Commit message: "Merge branch 'DevelopmentCTS2' into 'CI'"
 > git rev-list --no-walk 166c48bbd88eef601793a378f6bc576eec53b4e7 # timeout=10
[SONARQUBE_TEST] $ D:\sonarscanner\bin\sonar-scanner.bat -Dsonar.host.url=http://10.0.20.80:9000/sonar/ ******** -Dsonar.login=d64a8b53ca6f06a79b020ff91c05a92ea3fe243d -Dsonar.sourceEncoding=UTF-8 -Dsonar.projectKey=test -Dsonar.host.url=http://10.0.20.81:9000/sonar -Dsonar.sources=src/classes -Dsonar.projectBaseDir=d:\jenkins\workspace\Diabetes_Omni-Channel_Operations\SONARQUBE_TEST
INFO: Scanner configuration file: D:\sonarscanner\bin\..\conf\sonar-scanner.properties
INFO: Project root configuration file: NONE
INFO: SonarScanner 4.3.0.2102
INFO: Java 11.0.3 AdoptOpenJDK (64-bit)
INFO: Windows Server 2016 10.0 amd64
INFO: User cache: C:\Windows\system32\config\systemprofile\.sonar\cache
INFO: Scanner configuration file: D:\sonarscanner\bin\..\conf\sonar-scanner.properties
INFO: Project root configuration file: NONE
INFO: Analyzing on SonarQube server 8.2.0
INFO: Default locale: "en_US", source code encoding: "UTF-8"
INFO: Load global settings
INFO: Load global settings (done) | time=94ms
INFO: Server id: 3622C040-AXO-j1Tmi1jL84zthf1Y
INFO: User cache: C:\Windows\system32\config\systemprofile\.sonar\cache
INFO: Load/download plugins
INFO: Load plugins index
INFO: Load plugins index (done) | time=63ms
INFO: Load/download plugins (done) | time=328ms
INFO: Loaded core extensions: developer-scanner
INFO: Process project properties
INFO: Process project properties (done) | time=0ms
INFO: Execute project builders
INFO: Execute project builders (done) | time=15ms
INFO: Project key: test
INFO: Base dir: D:\jenkins\workspace\Diabetes_Omni-Channel_Operations\SONARQUBE_TEST
INFO: Working dir: d:\jenkins\workspace\Diabetes_Omni-Channel_Operations\SONARQUBE_TEST\.scannerwork
INFO: Load project settings for component key: 'test'
INFO: Load project settings for component key: 'test' (done) | time=32ms
INFO: Load project branches
INFO: Load project branches (done) | time=16ms
INFO: Load project pull requests
INFO: Load project pull requests (done) | time=15ms
INFO: Load branch configuration
INFO: Load branch configuration (done) | time=0ms
INFO: Load quality profiles
INFO: Load quality profiles (done) | time=78ms
INFO: Detected Jenkins
INFO: Load active rules
INFO: Load active rules (done) | time=1472ms
INFO: Indexing files...
INFO: Project configuration:
INFO: 3597 files indexed
INFO: 0 files ignored because of scm ignore settings
INFO: Quality profile for apex: Sonar way
INFO: Quality profile for xml: Sonar way
INFO: ------------- Run sensors on module test
INFO: Load metrics repository
INFO: Load metrics repository (done) | time=15ms
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by net.sf.cglib.core.ReflectUtils$1 (file:/C:/Windows/system32/config/systemprofile/.sonar/cache/a89f1943fc75b65becd9fb4ecab8d913/sonar-tsql-plugin.jar) to method java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int,java.security.ProtectionDomain)
WARNING: Please consider reporting this to the maintainers of net.sf.cglib.core.ReflectUtils$1
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
INFO: Sensor SonarCSS Rules [cssfamily]
INFO: No CSS, PHP, HTML or VueJS files are found in the project. CSS analysis is skipped.
INFO: Sensor SonarCSS Rules [cssfamily] (done) | time=0ms
INFO: Sensor JavaXmlSensor [java]
INFO: 1799 source files to be analyzed
INFO: Load project repositories
INFO: Load project repositories (done) | time=32ms
INFO: Sensor JavaXmlSensor [java] (done) | time=4422ms
INFO: 1799/1799 source files have been analyzed
INFO: Sensor HTML [web]
INFO: Sensor HTML [web] (done) | time=16ms
INFO: Sensor XML Sensor [xml]
INFO: 1799 source files to be analyzed
INFO: Sensor XML Sensor [xml] (done) | time=5188ms
INFO: Sensor JaCoCo XML Report Importer [jacoco]
INFO: 1799/1799 source files have been analyzed
INFO: Sensor JaCoCo XML Report Importer [jacoco] (done) | time=15ms
INFO: Sensor Apex Sensor [sonarapex]
INFO: 1798 source files to be analyzed
INFO: 286/1798 files analyzed, current file: src/classes/CCPM_ConsentData_OutboundApiDeltas.cls
WARN: Invalid character encountered in file D:/jenkins/workspace/Diabetes_Omni-Channel_Operations/SONARQUBE_TEST/src/classes/TestSupplyOrderQueue.cls at line 12 for encoding UTF-8. Please fix file content or configure the encoding to be used using property 'sonar.sourceEncoding'.
INFO: 690/1798 files analyzed, current file: src/classes/CtlrTransformerMyAccountDevice.cls
WARN: Invalid character encountered in file D:/jenkins/workspace/Diabetes_Omni-Channel_Operations/SONARQUBE_TEST/src/classes/InboundMPulseServiceTest.cls at line 55 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:/jenkins/workspace/Diabetes_Omni-Channel_Operations/SONARQUBE_TEST/src/classes/TestBatchPhysicianGeoUpdates.cls at line 94 for encoding UTF-8. Please fix file content or configure the encoding to be used using property 'sonar.sourceEncoding'.
INFO: 1154/1798 files analyzed, current file: src/classes/BcReviewControllerTest.cls
WARN: Invalid character encountered in file D:/jenkins/workspace/Diabetes_Omni-Channel_Operations/SONARQUBE_TEST/src/classes/TestSupplyOrderStatusEmailBatch.cls at line 13 for encoding UTF-8. Please fix file content or configure the encoding to be used using property 'sonar.sourceEncoding'.
INFO: 1555/1798 files analyzed, current file: src/classes/ImproveCodeCoverage.cls
INFO: Sensor Apex Sensor [sonarapex] (done) | time=46675ms
INFO: 1798/1798 source files have been analyzed
INFO: Sensor Test coverage Sensor for Apex [sonarapex]
INFO: Sensor Test coverage Sensor for Apex [sonarapex] (done) | time=0ms
INFO: Sensor ThymeLeaf template sensor [securityjavafrontend]
INFO: Sensor ThymeLeaf template sensor [securityjavafrontend] (done) | time=0ms
INFO: Sensor JavaSecuritySensor [security]
INFO: Reading type hierarchy from: d:\jenkins\workspace\Diabetes_Omni-Channel_Operations\SONARQUBE_TEST\.scannerwork\ucfg2\java
INFO: Read 0 type definitions
INFO: Reading UCFGs from: d:\jenkins\workspace\Diabetes_Omni-Channel_Operations\SONARQUBE_TEST\.scannerwork\ucfg2\java
INFO: No UCFGs have been included for analysis.
INFO: Sensor JavaSecuritySensor [security] (done) | time=16ms
INFO: Sensor CSharpSecuritySensor [security]
INFO: Reading type hierarchy from: d:\jenkins\workspace\Diabetes_Omni-Channel_Operations\SONARQUBE_TEST\ucfg_cs2
INFO: Read 0 type definitions
INFO: Reading UCFGs from: d:\jenkins\workspace\Diabetes_Omni-Channel_Operations\SONARQUBE_TEST\ucfg_cs2
INFO: No UCFGs have been included for analysis.
INFO: Sensor CSharpSecuritySensor [security] (done) | time=0ms
INFO: Sensor PhpSecuritySensor [security]
INFO: Reading type hierarchy from: d:\jenkins\workspace\Diabetes_Omni-Channel_Operations\SONARQUBE_TEST\.scannerwork\ucfg2\php
INFO: Read 0 type definitions
INFO: Reading UCFGs from: d:\jenkins\workspace\Diabetes_Omni-Channel_Operations\SONARQUBE_TEST\.scannerwork\ucfg2\php
INFO: No UCFGs have been included for analysis.
INFO: Sensor PhpSecuritySensor [security] (done) | time=0ms
INFO: Sensor PythonSecuritySensor [security]
INFO: Reading type hierarchy from: d:\jenkins\workspace\Diabetes_Omni-Channel_Operations\SONARQUBE_TEST\.scannerwork\ucfg2\python
INFO: Read 0 type definitions
INFO: Reading UCFGs from: d:\jenkins\workspace\Diabetes_Omni-Channel_Operations\SONARQUBE_TEST\.scannerwork\ucfg2\python
INFO: No UCFGs have been included for analysis.
INFO: Sensor PythonSecuritySensor [security] (done) | time=0ms
INFO: ------------- Run sensors on project
INFO: Sensor Zero Coverage Sensor
INFO: Sensor Zero Coverage Sensor (done) | time=1250ms
INFO: SCM Publisher SCM provider for this project is: git
INFO: SCM Publisher 3597 source files to be analyzed
INFO: 122/3597 source files have been analyzed
INFO: 276/3597 source files have been analyzed
INFO: 430/3597 source files have been analyzed
INFO: 584/3597 source files have been analyzed
INFO: 743/3597 source files have been analyzed
INFO: 904/3597 source files have been analyzed
INFO: 1065/3597 source files have been analyzed
INFO: 1217/3597 source files have been analyzed
INFO: 1376/3597 source files have been analyzed
INFO: 1539/3597 source files have been analyzed
INFO: 1697/3597 source files have been analyzed
INFO: 1856/3597 source files have been analyzed
INFO: 2012/3597 source files have been analyzed
INFO: 2172/3597 source files have been analyzed
INFO: 2327/3597 source files have been analyzed
INFO: 2484/3597 source files have been analyzed
INFO: 2640/3597 source files have been analyzed
INFO: 2793/3597 source files have been analyzed
INFO: 2948/3597 source files have been analyzed
INFO: 3112/3597 source files have been analyzed
INFO: 3276/3597 source files have been analyzed
INFO: 3438/3597 source files have been analyzed
INFO: 3588/3597 source files have been analyzed
INFO: SCM Publisher 3597/3597 source files have been analyzed (done) | time=232516ms
INFO: CPD Executor 145 files had no CPD blocks
INFO: CPD Executor Calculating CPD for 1653 files
WARN: Too many duplication groups on file src/classes/ec_ReviewControllerTest.cls. Keep only the first 100 groups.
WARN: Too many duplication references on file src/classes/OrdersTriggerHandler.cls for block at line 641. Keep only the first 100 references.
WARN: Too many duplication references on file src/classes/OrdersTriggerHandler.cls for block at line 630. Keep only the first 100 references.
WARN: Too many duplication references on file src/classes/OrdersTriggerHandler.cls for block at line 641. Keep only the first 100 references.
WARN: Too many duplication references on file src/classes/OrdersTriggerHandler.cls for block at line 641. Keep only the first 100 references.
WARN: Too many duplication references on file src/classes/OrdersTriggerHandler.cls for block at line 630. Keep only the first 100 references.
WARN: Too many duplication references on file src/classes/OrdersTriggerHandler.cls for block at line 641. Keep only the first 100 references.
WARN: Too many duplication references on file src/classes/OrdersTriggerHandler.cls for block at line 630. Keep only the first 100 references.
WARN: Too many duplication groups on file src/classes/BcReviewControllerTest.cls. Keep only the first 100 groups.
WARN: Too many duplication groups on file src/classes/EcReviewControllerTest.cls. Keep only the first 100 groups.
INFO: CPD Executor CPD calculation finished (done) | time=1494ms
INFO: Analysis report generated in 4517ms, dir size=35 MB
INFO: Analysis report compressed in 10226ms, zip size=11 MB
INFO: Analysis report uploaded in 1373ms
INFO: ANALYSIS SUCCESSFUL, you can browse http://10.0.20.81:9000/sonar/dashboard?id=test
INFO: Note that you will be able to access the updated dashboard once the server has processed the submitted analysis report
INFO: More about the report processing at http://10.0.20.81:9000/sonar/api/ce/task?id=AXO-mX8Pi1jL84zthjX_
INFO: Analysis total time: 5:26.916 s
INFO: ------------------------------------------------------------------------
INFO: EXECUTION SUCCESS
INFO: ------------------------------------------------------------------------
INFO: Total time: 5:28.804s
INFO: Final Memory: 35M/124M
INFO: ------------------------------------------------------------------------
Finished: SUCCESS

Hi,

Welcome to the community!

From your log, it seems that the Apex analysis is running successfully.

It looks like unrecognized characters were found in a handful of files, but otherwise this was successful.

To be clear, you’re seeing an empty Issues page in your project? What about the other metrics? Could you provide a screenshot of your project homepage & of the full issues page?

 
Ann

Hi,

I pasted 2 logs one from production(Apex is not working) and test environment (working with apex ).
you are referring test environment log(which is working) and we are facing issue with production server.

Below is the production server log:

Started by user Gajula, Mohan Raja [VPE]
Running as SYSTEM
[EnvInject] - Loading node environment variables.
Building remotely on LAXM1BAPPS650 (laxm1bapps650) in workspace d:\jenkins\workspace\Diabetes_Omni-Channel_Operations\SONARQUBE_TEST
[WS-CLEANUP] Deleting project workspace...
[WS-CLEANUP] Deferred wipeout is used...
[WS-CLEANUP] Done
using credential 344e19da-ca23-440d-9a02-2cab25220f35
Cloning the remote Git repository
Cloning repository <GITLAB url>
 > git init d:\jenkins\workspace\Diabetes_Omni-Channel_Operations\SONARQUBE_TEST # timeout=10
Fetching upstream changes from <GITLAB url>
 > git --version # timeout=10
using GIT_ASKPASS to set credentials Jenkins Service Account Credentials
 > git fetch --tags --progress -- <GITLAB url> +refs/heads/*:refs/remotes/origin/*
 > git config remote.origin.url <GITLAB url> # timeout=10
 > git config --add remote.origin.fetch +refs/heads/*:refs/remotes/origin/* # timeout=10
 > git config remote.origin.url <GITLAB url> # timeout=10
Fetching upstream changes from <GITLAB url>
using GIT_ASKPASS to set credentials Jenkins Service Account Credentials
 > git fetch --tags --progress -- <GITLAB url> +refs/heads/*:refs/remotes/origin/*
 > git rev-parse "refs/remotes/origin/CI^{commit}" # timeout=10
 > git rev-parse "refs/remotes/origin/origin/CI^{commit}" # timeout=10
Checking out Revision 166c48bbd88eef601793a378f6bc576eec53b4e7 (refs/remotes/origin/CI)
 > git config core.sparsecheckout # timeout=10
 > git checkout -f 166c48bbd88eef601793a378f6bc576eec53b4e7
Commit message: "Merge branch 'DevelopmentCTS2' into 'CI'"
 > git rev-list --no-walk 166c48bbd88eef601793a378f6bc576eec53b4e7 # timeout=10
[SONARQUBE_TEST] $ D:\sonarscanner\bin\sonar-scanner.bat -Dsonar.host.url=http://10.0.20.80:9000/sonar/ ******** -Dsonar.login=fe73018d5fde0cc5f98ac5814eec01bf51095947 -Dsonar.sourceEncoding=UTF-8 -Dsonar.projectKey=mtest -Dsonar.host.url=http://10.0.20.80:9000/sonar -Dsonar.sources=src/classes -Dsonar.projectBaseDir=d:\jenkins\workspace\Diabetes_Omni-Channel_Operations\SONARQUBE_TEST
INFO: Scanner configuration file: D:\sonarscanner\bin\..\conf\sonar-scanner.properties
INFO: Project root configuration file: NONE
INFO: SonarScanner 4.3.0.2102
INFO: Java 11.0.3 AdoptOpenJDK (64-bit)
INFO: Windows Server 2016 10.0 amd64
INFO: User cache: C:\Windows\system32\config\systemprofile\.sonar\cache
INFO: Scanner configuration file: D:\sonarscanner\bin\..\conf\sonar-scanner.properties
INFO: Project root configuration file: NONE
INFO: Analyzing on SonarQube server 8.2.0
INFO: Default locale: "en_US", source code encoding: "UTF-8"
INFO: Load global settings
INFO: Load global settings (done) | time=95ms
INFO: Server id: 92D88F0A-AXFzyMaBYbb3PBekcSlt
INFO: User cache: C:\Windows\system32\config\systemprofile\.sonar\cache
INFO: Load/download plugins
INFO: Load plugins index
INFO: Load plugins index (done) | time=60ms
INFO: Load/download plugins (done) | time=357ms
INFO: Loaded core extensions: developer-scanner
INFO: Process project properties
INFO: Process project properties (done) | time=10ms
INFO: Execute project builders
INFO: Execute project builders (done) | time=4ms
INFO: Project key: mtest
INFO: Base dir: D:\jenkins\workspace\Diabetes_Omni-Channel_Operations\SONARQUBE_TEST
INFO: Working dir: d:\jenkins\workspace\Diabetes_Omni-Channel_Operations\SONARQUBE_TEST\.scannerwork
INFO: Load project settings for component key: 'mtest'
INFO: Load project settings for component key: 'mtest' (done) | time=56ms
INFO: Load project branches
INFO: Load project branches (done) | time=40ms
INFO: Load project pull requests
INFO: Load project pull requests (done) | time=26ms
INFO: Load branch configuration
INFO: Load branch configuration (done) | time=3ms
INFO: Load quality profiles
INFO: Load quality profiles (done) | time=81ms
INFO: Detected Jenkins
INFO: Load active rules
INFO: Load active rules (done) | time=1621ms
INFO: Indexing files...
INFO: Project configuration:
INFO: 3597 files indexed
INFO: Quality profile for xml: Sonar way
INFO: ------------- Run sensors on module mtest
INFO: Load metrics repository
INFO: Load metrics repository (done) | time=23ms
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by net.sf.cglib.core.ReflectUtils$1 (file:/C:/Windows/system32/config/systemprofile/.sonar/cache/a89f1943fc75b65becd9fb4ecab8d913/sonar-tsql-plugin.jar) to method java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int,java.security.ProtectionDomain)
WARNING: Please consider reporting this to the maintainers of net.sf.cglib.core.ReflectUtils$1
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
INFO: Sensor SonarCSS Rules [cssfamily]
INFO: No CSS, PHP, HTML or VueJS files are found in the project. CSS analysis is skipped.
INFO: Sensor SonarCSS Rules [cssfamily] (done) | time=8ms
INFO: Sensor JavaXmlSensor [java]
INFO: 1799 source files to be analyzed
INFO: Load project repositories
INFO: Load project repositories (done) | time=194ms
INFO: Sensor JavaXmlSensor [java] (done) | time=4968ms
INFO: 1799/1799 source files have been analyzed
INFO: Sensor HTML [web]
INFO: Sensor HTML [web] (done) | time=16ms
INFO: Sensor XML Sensor [xml]
INFO: 1799 source files to be analyzed
INFO: Sensor XML Sensor [xml] (done) | time=6000ms
INFO: Sensor JaCoCo XML Report Importer [jacoco]
INFO: 1799/1799 source files have been analyzed
INFO: Sensor JaCoCo XML Report Importer [jacoco] (done) | time=18ms
INFO: Sensor ThymeLeaf template sensor [securityjavafrontend]
INFO: Sensor ThymeLeaf template sensor [securityjavafrontend] (done) | time=14ms
INFO: Sensor JavaSecuritySensor [security]
INFO: Reading type hierarchy from: d:\jenkins\workspace\Diabetes_Omni-Channel_Operations\SONARQUBE_TEST\.scannerwork\ucfg2\java
INFO: Read 0 type definitions
INFO: Reading UCFGs from: d:\jenkins\workspace\Diabetes_Omni-Channel_Operations\SONARQUBE_TEST\.scannerwork\ucfg2\java
INFO: No UCFGs have been included for analysis.
INFO: Sensor JavaSecuritySensor [security] (done) | time=7ms
INFO: Sensor CSharpSecuritySensor [security]
INFO: Reading type hierarchy from: d:\jenkins\workspace\Diabetes_Omni-Channel_Operations\SONARQUBE_TEST\ucfg_cs2
INFO: Read 0 type definitions
INFO: Reading UCFGs from: d:\jenkins\workspace\Diabetes_Omni-Channel_Operations\SONARQUBE_TEST\ucfg_cs2
INFO: No UCFGs have been included for analysis.
INFO: Sensor CSharpSecuritySensor [security] (done) | time=1ms
INFO: Sensor PhpSecuritySensor [security]
INFO: Reading type hierarchy from: d:\jenkins\workspace\Diabetes_Omni-Channel_Operations\SONARQUBE_TEST\.scannerwork\ucfg2\php
INFO: Read 0 type definitions
INFO: Reading UCFGs from: d:\jenkins\workspace\Diabetes_Omni-Channel_Operations\SONARQUBE_TEST\.scannerwork\ucfg2\php
INFO: No UCFGs have been included for analysis.
INFO: Sensor PhpSecuritySensor [security] (done) | time=0ms
INFO: Sensor PythonSecuritySensor [security]
INFO: Reading type hierarchy from: d:\jenkins\workspace\Diabetes_Omni-Channel_Operations\SONARQUBE_TEST\.scannerwork\ucfg2\python
INFO: Read 0 type definitions
INFO: Reading UCFGs from: d:\jenkins\workspace\Diabetes_Omni-Channel_Operations\SONARQUBE_TEST\.scannerwork\ucfg2\python
INFO: No UCFGs have been included for analysis.
INFO: Sensor PythonSecuritySensor [security] (done) | time=0ms
INFO: ------------- Run sensors on project
INFO: Sensor Zero Coverage Sensor
INFO: Sensor Zero Coverage Sensor (done) | time=105ms
INFO: SCM Publisher is disabled
INFO: CPD Executor Calculating CPD for 0 files
INFO: CPD Executor CPD calculation finished (done) | time=0ms
INFO: Analysis report generated in 2468ms, dir size=1 MB
INFO: Analysis report compressed in 2863ms, zip size=1 MB
INFO: Analysis report uploaded in 149ms
INFO: ANALYSIS SUCCESSFUL, you can browse http://10.0.20.80:9000/sonar/dashboard?id=mtest
INFO: Note that you will be able to access the updated dashboard once the server has processed the submitted analysis report
INFO: More about the report processing at http://10.0.20.80:9000/sonar/api/ce/task?id=AXO-rYDQvx6am80H-ILI
INFO: Analysis total time: 29.799 s
INFO: ------------------------------------------------------------------------
INFO: EXECUTION SUCCESS
INFO: ------------------------------------------------------------------------
INFO: Total time: 31.578s
INFO: Final Memory: 7M/27M
INFO: ------------------------------------------------------------------------
Finished: SUCCESS

Hi,

I edited your initial post to apply code formatting to the logs to make them readable without realizing that it was two different logs.

So okay, you have two environments: one where it works, one where it doesn’t. What’s different between the two?

 
Ann

Not working env: before i install enterprise license, code scan plugins are placed and removed in the environment. May be that the reason.

Sonarqube web connected to another database instance its working , Looks like from Db entries are corrupted. Please help me, how to correct?

Working env : Just its refresh sonarqube installation

Hi,

It’s quite likely this has something to do with it. Here’s the first difference I saw in your original 2 logs:

I think it’s notable that one of them doesn’t mention Apex at all, even from the start.

I suggest you reset your production environment by

  • shutting down the current server
  • re-exploding the distribution zip
  • re-configuring the new distribution
  • starting the new distribution

There is no need to manually manipulate the plugins. Just go with what’s pre-loaded and you should get what you need.

 
HTH,
Ann

  1. We are using windows server 2016 for sonarqube.
  2. Configured the new distribution and point the DB to production sonarqube DB.
  3. started the new distribution.

Still we are facing same issue.

Note : If i point the distribution to different sonarqube DB(refresh DB), Apex sensor is working.

Hi,

Sorry, but nothing springs to mind. Since the new install works with the test DB, this really does have to be about your environment. Unfortunately, I’m stumped about what the problem might be.

 
Ann

Its issue with database.

Only option i’m think create a new DB in the Production,Point the Sonarqube to new DB and transfer the license to new DB.

FYI, that may generate a new server ID and require a new license key. It should be no big deal to get one, just a little extra bureaucracy.

 
Ann