Unable to load components interface org.sonar.api.batch.sensor.Sensor

Must-share information (formatted with Markdown):

  • which versions are you using (SonarQube, Scanner, Plugin, and any relevant extension)
    SonarQube 10.1.0.73491
  • how is SonarQube deployed: zip, Docker, Helm
    Server is running on a standalone AWS EC2 instance connected to an AWS RDS instance
    sonar-scanner runs in gitlab jobs as part of our deploy process (this is what’s failing…logs appended)
  • what are you trying to achieve
    Get our gitlab sonarqube jobs to stop failing when sonar-scanner runs
  • what have you tried so far to achieve this
    Tried resetting the gitlab token in Devops Platform Integration
    Tried an earlier version of sonar-scanner-cli docker image instead of :latest
    Do not share screenshots of logs – share the text itself (bonus points for being well-formatted)!
Running with gitlab-runner 17.0.0 (44feccdf)
  on i-0fc3c0f9bda2faad4-in-644007585526-at-us-east-1 ZLxi24skp, system ID: s_da3b333f98aa
Resolving secrets
Preparing the "docker" executor
00:01
Using Docker executor with image sonarsource/sonar-scanner-cli:latest ...
Using locally found image version due to "if-not-present" pull policy
Using docker image sha256:380051b07dba0e5872ee9343d59479a82d2c6586b1e8e8aeac6aca2a476378c4 for sonarsource/sonar-scanner-cli:latest with digest sonarsource/sonar-scanner-cli@sha256:866f32d840223c8178778ed7a28556fbe3cac00dd74aac8290d7af93debcfcb2 ...
Preparing environment
00:01
Running on runner-zlxi24skp-project-34290234-concurrent-0 via ip-10-6-0-151.ec2.internal...
Getting source from Git repository
00:01
Fetching changes...
Reinitialized existing Git repository in /builds/redacted-development/redacted/redacted-ui/.git/
Checking out cedc9aaf as detached HEAD (ref is DO-739)...
Removing .scannerwork/
Removing .sonar/
Skipping Git submodules setup
Restoring cache
00:05
Checking cache for sonarqube-check-non_protected...
cache.zip is up to date                           
 
Successfully extracted cache
Executing "step_script" stage of the job script
00:13
Using docker image sha256:380051b07dba0e5872ee9343d59479a82d2c6586b1e8e8aeac6aca2a476378c4 for sonarsource/sonar-scanner-cli:latest with digest sonarsource/sonar-scanner-cli@sha256:866f32d840223c8178778ed7a28556fbe3cac00dd74aac8290d7af93debcfcb2 ...
$ sonar-scanner -X
16:20:23.487 INFO: Scanner configuration file: /opt/sonar-scanner/conf/sonar-scanner.properties
16:20:23.504 INFO: Project root configuration file: /builds/redacted-development/redacted/redacted-ui/sonar-project.properties
16:20:23.538 INFO: SonarScanner 5.0.1.3006
16:20:23.539 INFO: Java 17.0.11 Alpine (64-bit)
16:20:23.539 INFO: Linux 4.14.343-260.564.amzn2.x86_64 amd64
16:20:23.703 DEBUG: keyStore is : 
16:20:23.703 DEBUG: keyStore type is : pkcs12
16:20:23.703 DEBUG: keyStore provider is : 
16:20:23.703 DEBUG: init keystore
16:20:23.704 DEBUG: init keymanager of type SunX509
16:20:23.862 DEBUG: Create: /builds/redacted-development/redacted/redacted-ui/.sonar/cache
16:20:23.863 INFO: User cache: /builds/redacted-development/redacted/redacted-ui/.sonar/cache
16:20:23.863 DEBUG: Create: /builds/redacted-development/redacted/redacted-ui/.sonar/cache/_tmp
16:20:23.870 DEBUG: Extract sonar-scanner-api-batch in temp...
16:20:23.874 DEBUG: Get bootstrap index...
16:20:23.874 DEBUG: Download: https://sonar.corp.redacted.net/batch/index
16:20:24.136 DEBUG: Get bootstrap completed
16:20:24.142 DEBUG: Create isolated classloader...
16:20:24.155 DEBUG: Start temp cleaning...
16:20:24.160 DEBUG: Temp cleaning done
16:20:24.160 DEBUG: Execution getVersion
16:20:24.179 INFO: Analyzing on SonarQube server 10.1.0.73491
16:20:24.180 INFO: Default locale: "en_US", source code encoding: "UTF-8" (analysis is platform dependent)
16:20:24.180 DEBUG: Work directory: /builds/redacted-development/redacted/redacted-ui/.scannerwork
16:20:24.181 DEBUG: Execution execute
16:20:24.549 DEBUG: Developer 10.1.0.73491
16:20:24.792 INFO: Load global settings
16:20:24.948 DEBUG: GET 200 https://sonar.corp.redacted.net/api/settings/values.protobuf | time=155ms
16:20:24.980 INFO: Load global settings (done) | time=188ms
16:20:24.982 INFO: Server id: 
16:20:24.986 DEBUG: Create : /builds/redacted-development/redacted/redacted-ui/.sonar/_tmp
16:20:24.987 INFO: User cache: /builds/redacted-development/redacted/redacted-ui/.sonar/cache
16:20:24.990 INFO: Load/download plugins
16:20:24.990 INFO: Load plugins index
16:20:25.010 DEBUG: GET 200 https://sonar.corp.redacted.net/api/plugins/installed | time=19ms
16:20:25.060 INFO: Load plugins index (done) | time=70ms
16:20:25.344 INFO: Load/download plugins (done) | time=354ms
16:20:25.530 DEBUG: Plugins:
16:20:25.530 DEBUG:   * Clean as You Code 2.0.0.334 (cayc)
16:20:25.531 DEBUG:   * IaC Code Quality and Security 1.17.0.3976 (iac)
16:20:25.531 DEBUG:   * PL/SQL Code Quality and Security 3.9.0.5181 (plsql)
16:20:25.531 DEBUG:   * Scala Code Quality and Security 1.13.0.4374 (sonarscala)
16:20:25.531 DEBUG:   * C# Code Quality and Security 9.3.0.71466 (csharp)
16:20:25.531 DEBUG:   * Vulnerability Analysis 10.1.0.21056 (security)
16:20:25.531 DEBUG:   * Java Code Quality and Security 7.20.0.31692 (java)
16:20:25.532 DEBUG:   * HTML Code Quality and Security 3.8.0.3510 (web)
16:20:25.532 DEBUG:   * Flex Code Quality and Security 2.9.0.3375 (flex)
16:20:25.532 DEBUG:   * XML Code Quality and Security 2.8.1.4006 (xml)
16:20:25.532 DEBUG:   * Text Code Quality and Security 2.1.0.1163 (text)
16:20:25.532 DEBUG:   * VB.NET Code Quality and Security 9.3.0.71466 (vbnet)
16:20:25.532 DEBUG:   * Swift Code Quality and Security 4.9.0.5915 (swift)
16:20:25.532 DEBUG:   * CFamily Code Quality and Security 6.45.0.62016 (cpp)
16:20:25.533 DEBUG:   * Python Code Quality and Security 4.3.0.11660 (python)
16:20:25.533 DEBUG:   * Dataflow Bug Detection Rules for Python 1.16.0.4300 (dbdpythonfrontend)
16:20:25.533 DEBUG:   * Dataflow Bug Detection 1.16.0.4300 (dbd)
16:20:25.533 DEBUG:   * Go Code Quality and Security 1.13.0.4374 (go)
16:20:25.533 DEBUG:   * JaCoCo 1.3.0.1538 (jacoco)
16:20:25.533 DEBUG:   * Kotlin Code Quality and Security 2.15.0.2579 (kotlin)
16:20:25.533 DEBUG:   * Dataflow Bug Detection Rules for Java 1.16.0.4300 (dbdjavafrontend)
16:20:25.534 DEBUG:   * T-SQL Code Quality and Security 1.9.0.5692 (tsql)
16:20:25.534 DEBUG:   * JavaScript/TypeScript/CSS Code Quality and Security 10.3.1.21905 (javascript)
16:20:25.534 DEBUG:   * Ruby Code Quality and Security 1.13.0.4374 (ruby)
16:20:25.534 DEBUG:   * Vulnerability Rules for C# 10.1.0.21056 (securitycsharpfrontend)
16:20:25.534 DEBUG:   * Vulnerability Rules for Java 10.1.0.21056 (securityjavafrontend)
16:20:25.534 DEBUG:   * Vulnerability Rules for JS 10.1.0.21056 (securityjsfrontend)
16:20:25.534 DEBUG:   * Vulnerability Rules for Python 10.1.0.21056 (securitypythonfrontend)
16:20:25.535 DEBUG:   * PHP Code Quality and Security 3.30.0.9766 (php)
16:20:25.535 DEBUG:   * ABAP Code Quality and Security 3.12.0.4303 (abap)
16:20:25.535 DEBUG:   * Configuration detection fot Code Quality and Security 1.2.0.267 (config)
16:20:25.535 DEBUG:   * Vulnerability Rules for PHP 10.1.0.21056 (securityphpfrontend)
16:20:25.595 INFO: Loaded core extensions: developer-scanner
16:20:25.612 DEBUG: Installed core extension: developer-scanner
16:20:26.403 INFO: Process project properties
16:20:26.404 INFO: Process project properties (done) | time=1ms
16:20:26.407 INFO: Execute project builders
16:20:26.408 DEBUG: Execute project builder: org.sonar.plugins.csharp.CSharpGlobalProtobufFileProcessor
16:20:26.409 DEBUG: Execute project builder: org.sonar.plugins.vbnet.VbNetGlobalProtobufFileProcessor
16:20:26.410 INFO: Execute project builders (done) | time=3ms
16:20:26.413 INFO: Project key: redacteddev_an-redacted-portal-ui
16:20:26.413 INFO: Base dir: /builds/redacted-development/redacted/redacted-ui
16:20:26.413 INFO: Working dir: /builds/redacted-development/redacted/redacted-ui/.scannerwork
16:20:26.413 DEBUG: Project global encoding: UTF-8, default locale: en_US
16:20:26.427 INFO: Load project settings for component key: 'redacteddev_an-redacted-portal-ui'
16:20:26.454 DEBUG: GET 200 https://sonar.corp.redacted.net/api/settings/values.protobuf?component=redacteddev_an-redacted-portal-ui | time=27ms
16:20:26.457 INFO: Load project settings for component key: 'some_project_name' (done) | time=30ms
16:20:26.579 INFO: Load project branches
16:20:26.602 DEBUG: GET 200 https://sonar.corp.redacted.net/api/project_branches/list?project=some_project_name | time=21ms
16:20:26.610 INFO: Load project branches (done) | time=31ms
16:20:26.611 INFO: Load branch configuration
16:20:26.613 INFO: Detected branch/PR in 'GitLab'
16:20:26.614 INFO: Auto-configuring branch 'DO-739'
16:20:26.616 INFO: Load branch configuration (done) | time=5ms
16:20:26.628 DEBUG: Creating module hierarchy
16:20:26.628 DEBUG:   Init module 'some_project_name'
16:20:26.628 DEBUG:     Base dir: redacted
16:20:26.629 DEBUG:     Working dir: redacted
16:20:26.631 DEBUG:     Module global encoding: UTF-8, default locale: en_US
16:20:26.667 DEBUG: Available languages:
16:20:26.668 DEBUG:   * Terraform => "terraform"
16:20:26.668 DEBUG:   * CloudFormation => "cloudformation"
16:20:26.669 DEBUG:   * Kubernetes => "kubernetes"
16:20:26.669 DEBUG:   * Docker => "docker"
16:20:26.670 DEBUG:   * PL/SQL => "plsql"
16:20:26.670 DEBUG:   * Scala => "scala"
16:20:26.670 DEBUG:   * C# => "cs"
16:20:26.671 DEBUG:   * Java => "java"
16:20:26.671 DEBUG:   * HTML => "web"
16:20:26.671 DEBUG:   * JSP => "jsp"
16:20:26.671 DEBUG:   * Flex => "flex"
16:20:26.672 DEBUG:   * XML => "xml"
16:20:26.672 DEBUG:   * Text => "text"
16:20:26.672 DEBUG:   * Secrets => "secrets"
16:20:26.672 DEBUG:   * VB.NET => "vbnet"
16:20:26.673 DEBUG:   * Swift => "swift"
16:20:26.673 DEBUG:   * C => "c"
16:20:26.674 DEBUG:   * C++ => "cpp"
16:20:26.674 DEBUG:   * Objective-C => "objc"
16:20:26.674 DEBUG:   * Python => "py"
16:20:26.675 DEBUG:   * Go => "go"
16:20:26.675 DEBUG:   * Kotlin => "kotlin"
16:20:26.675 DEBUG:   * T-SQL => "tsql"
16:20:26.675 DEBUG:   * JavaScript => "js"
16:20:26.677 DEBUG:   * TypeScript => "ts"
16:20:26.677 DEBUG:   * CSS => "css"
16:20:26.677 DEBUG:   * Ruby => "ruby"
16:20:26.677 DEBUG:   * PHP => "php"
16:20:26.678 DEBUG:   * ABAP => "abap"
16:20:26.678 DEBUG:   * YAML => "yaml"
16:20:26.683 DEBUG:   * JSON => "json"
16:20:26.751 INFO: Auto-configuring with CI 'Gitlab CI'
16:20:26.755 INFO: Load quality profiles
16:20:26.791 DEBUG: GET 200 https://sonar.corp.redacted.net/api/qualityprofiles/search.protobuf?project=redacteddev_an-redacted-portal-ui | time=36ms
16:20:26.816 INFO: Load quality profiles (done) | time=62ms
16:20:26.823 INFO: Load active rules
16:20:26.856 DEBUG: GET 200 https://sonar.corp.redacted.net/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt,updatedAt,deprecatedKeys&activation=true&qprofile=AYoiWWQidUucx8t8kE9a&ps=500&p=1 | time=31ms
16:20:27.026 DEBUG: GET 200 https://sonar.corp.redacted.net/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt,updatedAt,deprecatedKeys&activation=true&qprofile=AX75Vi58eRd9E7krPvKn&ps=500&p=1 | time=45ms
16:20:27.083 DEBUG: GET 200 https://sonar.corp.redacted.net/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt,updatedAt,deprecatedKeys&activation=true&qprofile=AX75Vi8MeRd9E7krPvME&ps=500&p=1 | time=39ms
16:20:27.111 DEBUG: GET 200 https://sonar.corp.redacted.net/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt,updatedAt,deprecatedKeys&activation=true&qprofile=AX75Vi9eeRd9E7krPvMk&ps=500&p=1 | time=18ms
16:20:27.254 DEBUG: GET 200 https://sonar.corp.redacted.net/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt,updatedAt,deprecatedKeys&activation=true&qprofile=AX75VjCjeRd9E7krPvYH&ps=500&p=1 | time=142ms
16:20:27.401 DEBUG: GET 200 https://sonar.corp.redacted.net/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt,updatedAt,deprecatedKeys&activation=true&qprofile=AX75VjGMeRd9E7krPvf6&ps=500&p=1 | time=95ms
16:20:27.464 DEBUG: GET 200 https://sonar.corp.redacted.net/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt,updatedAt,deprecatedKeys&activation=true&qprofile=AYoiWX7SdUucx8t8kFCH&ps=500&p=1 | time=29ms
16:20:27.532 DEBUG: GET 200 https://sonar.corp.redacted.net/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt,updatedAt,deprecatedKeys&activation=true&qprofile=AX8img40_hLAjDbQn-bV&ps=500&p=1 | time=65ms
16:20:27.749 DEBUG: GET 200 https://sonar.corp.redacted.net/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt,updatedAt,deprecatedKeys&activation=true&qprofile=AX75VjPueRd9E7krPv-t&ps=500&p=1 | time=191ms
16:20:27.849 DEBUG: GET 200 https://sonar.corp.redacted.net/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt,updatedAt,deprecatedKeys&activation=true&qprofile=AX75VjPueRd9E7krPv-t&ps=500&p=2 | time=63ms
16:20:27.894 DEBUG: GET 200 https://sonar.corp.redacted.net/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt,updatedAt,deprecatedKeys&activation=true&qprofile=AX75VjTLeRd9E7krPwG1&ps=500&p=1 | time=41ms
16:20:27.930 DEBUG: GET 200 https://sonar.corp.redacted.net/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt,updatedAt,deprecatedKeys&activation=true&qprofile=AX75VjW_eRd9E7krPwKE&ps=500&p=1 | time=35ms
16:20:27.959 DEBUG: GET 200 https://sonar.corp.redacted.net/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt,updatedAt,deprecatedKeys&activation=true&qprofile=AX75VjUueRd9E7krPwIF&ps=500&p=1 | time=27ms
16:20:27.974 DEBUG: GET 200 https://sonar.corp.redacted.net/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt,updatedAt,deprecatedKeys&activation=true&qprofile=AX75VjY1eRd9E7krPwK1&ps=500&p=1 | time=13ms
16:20:27.993 DEBUG: GET 200 https://sonar.corp.redacted.net/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt,updatedAt,deprecatedKeys&activation=true&qprofile=AX75VjhDeRd9E7krPwWx&ps=500&p=1 | time=19ms
16:20:28.083 DEBUG: GET 200 https://sonar.corp.redacted.net/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt,updatedAt,deprecatedKeys&activation=true&qprofile=AX75VjiZeRd9E7krPwak&ps=500&p=1 | time=89ms
16:20:28.118 DEBUG: GET 200 https://sonar.corp.redacted.net/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt,updatedAt,deprecatedKeys&activation=true&qprofile=AX75VjjxeRd9E7krPwdM&ps=500&p=1 | time=30ms
16:20:28.155 DEBUG: GET 200 https://sonar.corp.redacted.net/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt,updatedAt,deprecatedKeys&activation=true&qprofile=AX8im11Sx2pg_tkKaIIh&ps=500&p=1 | time=35ms
16:20:28.171 DEBUG: GET 200 https://sonar.corp.redacted.net/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt,updatedAt,deprecatedKeys&activation=true&qprofile=AX75Vjk9eRd9E7krPwdo&ps=500&p=1 | time=13ms
16:20:28.359 DEBUG: GET 200 https://sonar.corp.redacted.net/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt,updatedAt,deprecatedKeys&activation=true&qprofile=AX8im2HAx2pg_tkKaIWp&ps=500&p=1 | time=187ms
16:20:28.467 DEBUG: GET 200 https://sonar.corp.redacted.net/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt,updatedAt,deprecatedKeys&activation=true&qprofile=AX8im2ZAx2pg_tkKaIjt&ps=500&p=1 | time=93ms
16:20:28.503 DEBUG: GET 200 https://sonar.corp.redacted.net/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt,updatedAt,deprecatedKeys&activation=true&qprofile=AX75VjAVeRd9E7krPvRm&ps=500&p=1 | time=31ms
16:20:28.559 DEBUG: GET 200 https://sonar.corp.redacted.net/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt,updatedAt,deprecatedKeys&activation=true&qprofile=AX75Vi-ieRd9E7krPvPX&ps=500&p=1 | time=54ms
16:20:28.600 DEBUG: GET 200 https://sonar.corp.redacted.net/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt,updatedAt,deprecatedKeys&activation=true&qprofile=AX8im2kxx2pg_tkKaIo3&ps=500&p=1 | time=38ms
16:20:28.624 DEBUG: GET 200 https://sonar.corp.redacted.net/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt,updatedAt,deprecatedKeys&activation=true&qprofile=AYoiWZSidUucx8t8kFG1&ps=500&p=1 | time=22ms
16:20:28.652 DEBUG: GET 200 https://sonar.corp.redacted.net/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt,updatedAt,deprecatedKeys&activation=true&qprofile=AX75VjIyeRd9E7krPvjS&ps=500&p=1 | time=27ms
16:20:28.779 DEBUG: GET 200 https://sonar.corp.redacted.net/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt,updatedAt,deprecatedKeys&activation=true&qprofile=AX75VjK6eRd9E7krPvr7&ps=500&p=1 | time=125ms
16:20:28.878 DEBUG: GET 200 https://sonar.corp.redacted.net/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt,updatedAt,deprecatedKeys&activation=true&qprofile=AX75VjbUeRd9E7krPwP7&ps=500&p=1 | time=90ms
16:20:28.946 DEBUG: GET 200 https://sonar.corp.redacted.net/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt,updatedAt,deprecatedKeys&activation=true&qprofile=AX75VjgAeRd9E7krPwWK&ps=500&p=1 | time=63ms
16:20:28.995 DEBUG: GET 200 https://sonar.corp.redacted.net/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt,updatedAt,deprecatedKeys&activation=true&qprofile=AX8im20lx2pg_tkKaItm&ps=500&p=1 | time=48ms
16:20:29.085 DEBUG: GET 200 https://sonar.corp.redacted.net/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt,updatedAt,deprecatedKeys&activation=true&qprofile=AX8im29ix2pg_tkKaI2D&ps=500&p=1 | time=88ms
16:20:29.206 DEBUG: GET 200 https://sonar.corp.redacted.net/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt,updatedAt,deprecatedKeys&activation=true&qprofile=AX75Vjl3eRd9E7krPwjc&ps=500&p=1 | time=113ms
16:20:29.230 INFO: Load active rules (done) | time=2407ms
16:20:29.236 INFO: Load analysis cache
16:20:29.421 DEBUG: GET 200 https://sonar.corp.redacted.net/api/analysis_cache/get?project=redacteddev_an-redacted-portal-ui&branch=master | time=184ms
16:20:29.941 INFO: Load analysis cache | time=705ms
16:20:30.008 INFO: Branch name: DO-739
16:20:30.034 INFO: Load project repositories
16:20:30.112 DEBUG: GET 200 https://sonar.corp.redacted.net/batch/project.protobuf?key=redacteddev_an-redacted-portal-ui&branch=master | time=77ms
16:20:30.131 INFO: Load project repositories (done) | time=97ms
16:20:30.183 DEBUG: Declared patterns of language Terraform were converted to sonar.lang.patterns.terraform : **/*.tf
16:20:30.184 DEBUG: Declared patterns of language CloudFormation were converted to sonar.lang.patterns.cloudformation : 
16:20:30.184 DEBUG: Declared patterns of language Kubernetes were converted to sonar.lang.patterns.kubernetes : 
16:20:30.184 DEBUG: Declared patterns of language Docker were converted to sonar.lang.patterns.docker : 
16:20:30.185 DEBUG: Declared patterns of language PL/SQL were converted to sonar.lang.patterns.plsql : **/*.sql,**/*.pks,**/*.pkb
16:20:30.185 DEBUG: Declared patterns of language Scala were converted to sonar.lang.patterns.scala : **/*.scala
16:20:30.185 DEBUG: Declared patterns of language C# were converted to sonar.lang.patterns.cs : **/*.cs
16:20:30.186 DEBUG: Declared patterns of language Java were converted to sonar.lang.patterns.java : **/*.java,**/*.jav
16:20:30.189 DEBUG: Declared patterns of language HTML were converted to sonar.lang.patterns.web : **/*.html,**/*.xhtml,**/*.cshtml,**/*.vbhtml,**/*.aspx,**/*.ascx,**/*.rhtml,**/*.erb,**/*.shtm,**/*.shtml,**/*.cmp,**/*.twig
16:20:30.190 DEBUG: Declared patterns of language JSP were converted to sonar.lang.patterns.jsp : **/*.jsp,**/*.jspf,**/*.jspx
16:20:30.190 DEBUG: Declared patterns of language Flex were converted to sonar.lang.patterns.flex : **/*.as
16:20:30.191 DEBUG: Declared patterns of language XML were converted to sonar.lang.patterns.xml : **/*.xml,**/*.xsd,**/*.xsl
16:20:30.191 DEBUG: Declared patterns of language Text were converted to sonar.lang.patterns.text : 
16:20:30.191 DEBUG: Declared patterns of language Secrets were converted to sonar.lang.patterns.secrets : 
16:20:30.191 DEBUG: Declared patterns of language VB.NET were converted to sonar.lang.patterns.vbnet : **/*.vb
16:20:30.192 DEBUG: Declared patterns of language Swift were converted to sonar.lang.patterns.swift : **/*.swift
16:20:30.192 DEBUG: Declared patterns of language C were converted to sonar.lang.patterns.c : **/*.c,**/*.h
16:20:30.196 DEBUG: Declared patterns of language C++ were converted to sonar.lang.patterns.cpp : **/*.cc,**/*.cpp,**/*.cxx,**/*.c++,**/*.hh,**/*.hpp,**/*.hxx,**/*.h++,**/*.ipp
16:20:30.197 DEBUG: Declared patterns of language Objective-C were converted to sonar.lang.patterns.objc : **/*.m
16:20:30.197 DEBUG: Declared patterns of language Python were converted to sonar.lang.patterns.py : **/*.py
16:20:30.197 DEBUG: Declared patterns of language Go were converted to sonar.lang.patterns.go : **/*.go
16:20:30.198 DEBUG: Declared patterns of language Kotlin were converted to sonar.lang.patterns.kotlin : **/*.kt
16:20:30.198 DEBUG: Declared patterns of language T-SQL were converted to sonar.lang.patterns.tsql : **/*.tsql
16:20:30.198 DEBUG: Declared patterns of language JavaScript were converted to sonar.lang.patterns.js : **/*.js,**/*.jsx,**/*.cjs,**/*.mjs,**/*.vue
16:20:30.199 DEBUG: Declared patterns of language TypeScript were converted to sonar.lang.patterns.ts : **/*.ts,**/*.tsx,**/*.cts,**/*.mts
16:20:30.200 DEBUG: Declared patterns of language CSS were converted to sonar.lang.patterns.css : **/*.css,**/*.less,**/*.scss
16:20:30.204 DEBUG: Declared patterns of language Ruby were converted to sonar.lang.patterns.ruby : **/*.rb
16:20:30.205 DEBUG: Declared patterns of language PHP were converted to sonar.lang.patterns.php : **/*.php,**/*.php3,**/*.php4,**/*.php5,**/*.phtml,**/*.inc
16:20:30.205 DEBUG: Declared patterns of language ABAP were converted to sonar.lang.patterns.abap : **/*.abap,**/*.ab4,**/*.flow,**/*.asprog
16:20:30.205 DEBUG: Declared patterns of language YAML were converted to sonar.lang.patterns.yaml : **/*.yaml,**/*.yml
16:20:30.206 DEBUG: Declared patterns of language JSON were converted to sonar.lang.patterns.json : **/*.json
16:20:30.210 DEBUG: Will ignore generated code
16:20:30.211 DEBUG: Will ignore generated code
16:20:30.227 INFO: Indexing files...
16:20:30.228 INFO: Project configuration:
16:20:30.244 DEBUG: loading config FileBasedConfig[/tmp/jgit/config]
16:20:30.245 DEBUG: readpipe [/usr/bin/git, --version],/usr/bin
16:20:30.255 DEBUG: readpipe may return 'git version 2.43.4'
16:20:30.255 DEBUG: remaining output:
16:20:30.255 DEBUG: readpipe [/usr/bin/git, config, --system, --show-origin, --list, -z],/usr/bin
16:20:30.260 DEBUG: readpipe may return 'null'
16:20:30.260 DEBUG: remaining output:
16:20:30.279 DEBUG: readpipe rc=128
16:20:30.279 DEBUG: Exception caught during execution of command '[/usr/bin/git, config, --system, --show-origin, --list, -z]' in '/usr/bin', return code '128', error message 'fatal: unable to read config file '/etc/gitconfig': No such file or directory
'
16:20:30.281 DEBUG: loading config FileBasedConfig[/home/scanner-cli/.gitconfig]
16:20:30.529 DEBUG: 787 non excluded files in this Git repository
16:20:30.545 DEBUG: 'CODEOWNERS' indexed with no language
16:20:30.556 DEBUG: 'README.md' indexed with no language
16:20:30.577 DEBUG: 'config-overrides.js' generated metadata with charset 'UTF-8'
16:20:30.577 DEBUG: Average line length for config-overrides.js is 23
16:20:30.586 DEBUG: 'config-overrides.js' indexed with language 'js'
giant list of indexed file removed
16:20:32.800 INFO: 743 files indexed
16:20:32.801 INFO: 1 file ignored because of scm ignore settings
16:20:32.803 INFO: Quality profile for css: Sonar way
16:20:32.803 INFO: Quality profile for js: Sonar way
16:20:32.803 INFO: Quality profile for json: Sonar way
16:20:32.803 INFO: Quality profile for ts: Sonar way
16:20:32.803 INFO: Quality profile for web: Sonar way
16:20:32.803 INFO: ------------- Run sensors on module redacteddev_an-redacted-portal-ui
16:20:32.983 INFO: Load metrics repository
16:20:33.002 DEBUG: GET 200 https://sonar.corp.redacted.net/api/metrics/search?ps=500&p=1 | time=17ms
16:20:33.016 INFO: Load metrics repository (done) | time=33ms
16:20:35.862 DEBUG: Added 238 checks for language='ts', repository='typescript'
16:20:35.871 DEBUG: Added 15 checks for language='ts', repository='tssecurity'
16:20:35.873 DEBUG: Added 237 checks for language='js', repository='javascript'
16:20:35.876 DEBUG: Added 15 checks for language='js', repository='jssecurity'
16:20:35.967 INFO: ------------------------------------------------------------------------
16:20:35.968 INFO: EXECUTION FAILURE
16:20:35.968 INFO: ------------------------------------------------------------------------
16:20:35.968 INFO: Total time: 12.491s
16:20:36.058 INFO: Final Memory: 25M/90M
16:20:36.059 INFO: ------------------------------------------------------------------------
16:20:36.059 ERROR: Error during SonarScanner execution
java.lang.IllegalStateException: Unable to load components interface org.sonar.api.batch.sensor.Sensor
	at org.sonar.core.platform.SpringComponentContainer.getComponentsByType(SpringComponentContainer.java:156)
	at org.sonar.scanner.bootstrap.AbstractExtensionDictionary.completeScannerExtensions(AbstractExtensionDictionary.java:82)
	at org.sonar.scanner.bootstrap.AbstractExtensionDictionary.getExtensions(AbstractExtensionDictionary.java:77)
	at org.sonar.scanner.bootstrap.AbstractExtensionDictionary.getFilteredExtensions(AbstractExtensionDictionary.java:67)
	at org.sonar.scanner.sensor.ModuleSensorExtensionDictionary.selectSensors(ModuleSensorExtensionDictionary.java:47)
	at org.sonar.scanner.sensor.ModuleSensorsExecutor.lambda$execute$0(ModuleSensorsExecutor.java:54)
	at org.sonar.scanner.sensor.ModuleSensorsExecutor.withModuleStrategy(ModuleSensorsExecutor.java:79)
	at org.sonar.scanner.sensor.ModuleSensorsExecutor.execute(ModuleSensorsExecutor.java:54)
	at org.sonar.scanner.scan.SpringModuleScanContainer.doAfterStart(SpringModuleScanContainer.java:82)
	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:403)
	at org.sonar.scanner.scan.SpringProjectScanContainer.scanRecursively(SpringProjectScanContainer.java:399)
	at org.sonar.scanner.scan.SpringProjectScanContainer.doAfterStart(SpringProjectScanContainer.java:368)
	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:137)
	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:71)
	at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:65)
	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(NativeMethodAccessorImpl.java:77)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:568)
	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: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'ClassRealm{securitypythonfrontend}-com.sonar.security.frontend.python.A': Lookup method resolution failed; nested exception is java.lang.IllegalStateException: Failed to introspect Class [com.sonar.security.frontend.python.A] from ClassLoader [ClassRealm{securitypythonfrontend}]
	at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.determineCandidateConstructors(AutowiredAnnotationBeanPostProcessor.java:289)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.determineConstructorsFromBeanPostProcessors(AbstractAutowireCapableBeanFactory.java:1302)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1219)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:582)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542)
	at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335)
	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)
	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333)
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208)
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeansOfType(DefaultListableBeanFactory.java:673)
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeansOfType(DefaultListableBeanFactory.java:661)
	at org.springframework.context.support.AbstractApplicationContext.getBeansOfType(AbstractApplicationContext.java:1302)
	at org.sonar.core.platform.SpringComponentContainer.getComponentsByType(SpringComponentContainer.java:154)
	... 32 more
Caused by: java.lang.IllegalStateException: Failed to introspect Class [com.sonar.security.frontend.python.A] from ClassLoader [ClassRealm{securitypythonfrontend}]
	at org.springframework.util.ReflectionUtils.getDeclaredMethods(ReflectionUtils.java:485)
	at org.springframework.util.ReflectionUtils.doWithLocalMethods(ReflectionUtils.java:321)
	at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.determineCandidateConstructors(AutowiredAnnotationBeanPostProcessor.java:267)
	... 44 more
Caused by: java.lang.NoClassDefFoundError: org/sonar/sslr/grammar/GrammarRuleKey
	at java.base/java.lang.Class.getDeclaredMethods0(Native Method)
	at java.base/java.lang.Class.privateGetDeclaredMethods(Class.java:3402)
	at java.base/java.lang.Class.getDeclaredMethods(Class.java:2504)
	at org.springframework.util.ReflectionUtils.getDeclaredMethods(ReflectionUtils.java:467)
	... 46 more
Caused by: java.lang.ClassNotFoundException: org.sonar.sslr.grammar.GrammarRuleKey
	at org.sonar.classloader.ParentFirstStrategy.loadClass(ParentFirstStrategy.java:39)
	at org.sonar.classloader.ClassRealm.loadClass(ClassRealm.java:87)
	at org.sonar.classloader.ClassRealm.loadClass(ClassRealm.java:76)
	... 50 more
Cleaning up project directory and file based variables
00:01
ERROR: Job failed: exit code 1

I Got the same error.

The 05/21/2024 it was working with the latest version.
The 05/27/2024 it was no more working.
I’ve checked last docker releases of the sonnar-cli, and a latest has been released the 05/23/2024.

So I’ve fixed the version of the sonnar-cli to : sonarsource/sonar-scanner-cli:5.0.1

It’s working well now.

I’ve just seen there is a new sonarqube version.
I’ll try to update it and try a new scanner with the latest.
I’ll let you know

EDIT:
Even after upgrading sonarqube to the latest version 10.5.x, the latest scanner cli image is failing with the same error as mentioned above.

Need to set it back to sonarsource/sonar-scanner-cli:5.0.1

Hey @Drew_Morone and @JayPe69

Can you please provide DEBUG level analysis logs (sonar-scanner -X) that end with this error?

Thanks,
I did try a previous version, not sure if it was this exact one. I’ll give it a try and let you know.
Thanks

Hey Jean-Philippe,
I tried this, and it seemed to work! Thanks! I have a question though, what is the host OS of your Docker instances? We’re using SonarQube in our Gitlab env. and noticed that when our runner instances updated from v16.11.1 to 17.0.0, this error started occurring. sonar-scanner is still working on the runners that have not updated to 17.0.0.
Not quite sure why the host OS for the docker image would matter, but it’s another pattern I’m noticing.

Hey Colin, that’s in the original post, unless you mean something else?

Just want to add, regardless of whether I used:
sonarsource/sonar-scanner-cli:5.0.1
or
sonarsource/sonar-scanner-cli:latest
The logs will show
INFO: SonarScanner 5.0.1.3006

however, if I use the “latest” tag, the job fails. If I use the :5.0.1 tag, it works. I’m totally confused now.

You’re right, I didn’t realize they were at DEBUG mode.

I’ve flagged this for attention.

We recently changed the versioning strategy to decouple the two versions (scanner version and the docker image version) so that we can introduce changes to the docker image without changing an existing tag. For example, we recently started to run the scanner as non-root within the docker image, which has broken a few things :confused:

Thanks for your patience.

Hi,

The issue you described feel similar to the side effect of the Root user change:

If this does not solve, could you please send me how you use the image within your GitLab workflow? Maybe a reproducer would be nice if possible.

Thanks
Csaba

Having the same issue here with sonarsource/sonar-scanner-cli:10.0, running in Gitlab CI, with gitlab-runner 17.0.0

RROR: Error during SonarScanner execution
java.lang.IllegalStateException: Unable to load components interface org.sonar.api.batch.sensor.Sensor
	at org.sonar.core.platform.SpringComponentContainer.getComponentsByType(SpringComponentContainer.java:191)
	at org.sonar.scanner.bootstrap.AbstractExtensionDictionary.completeScannerExtensions(AbstractExtensionDictionary.java:81)
	at org.sonar.scanner.bootstrap.AbstractExtensionDictionary.getExtensions(AbstractExtensionDictionary.java:76)
	at org.sonar.scanner.bootstrap.AbstractExtensionDictionary.getFilteredExtensions(AbstractExtensionDictionary.java:66)
	at org.sonar.scanner.sensor.ModuleSensorExtensionDictionary.selectSensors(ModuleSensorExtensionDictionary.java:46)
	at org.sonar.scanner.sensor.ModuleSensorsExecutor.lambda$execute$0(ModuleSensorsExecutor.java:54)
	at org.sonar.scanner.sensor.ModuleSensorsExecutor.withModuleStrategy(ModuleSensorsExecutor.java:79)
	at org.sonar.scanner.sensor.ModuleSensorsExecutor.execute(ModuleSensorsExecutor.java:54)
	at org.sonar.scanner.scan.SpringModuleScanContainer.doAfterStart(SpringModuleScanContainer.java:82)
	at org.sonar.core.platform.SpringComponentContainer.startComponents(SpringComponentContainer.java:223)
	at org.sonar.core.platform.SpringComponentContainer.execute(SpringComponentContainer.java:202)
	at org.sonar.scanner.scan.SpringProjectScanContainer.scan(SpringProjectScanContainer.java:197)
	at org.sonar.scanner.scan.SpringProjectScanContainer.scanRecursively(SpringProjectScanContainer.java:193)
	at org.sonar.scanner.scan.SpringProjectScanContainer.doAfterStart(SpringProjectScanContainer.java:166)
	at org.sonar.core.platform.SpringComponentContainer.startComponents(SpringComponentContainer.java:223)
	at org.sonar.core.platform.SpringComponentContainer.execute(SpringComponentContainer.java:202)
	at org.sonar.scanner.bootstrap.SpringScannerContainer.doAfterStart(SpringScannerContainer.java:351)
	at org.sonar.core.platform.SpringComponentContainer.startComponents(SpringComponentContainer.java:223)
	at org.sonar.core.platform.SpringComponentContainer.execute(SpringComponentContainer.java:202)
	at org.sonar.scanner.bootstrap.SpringGlobalContainer.doAfterStart(SpringGlobalContainer.java:138)
	at org.sonar.core.platform.SpringComponentContainer.startComponents(SpringComponentContainer.java:223)
	at org.sonar.core.platform.SpringComponentContainer.execute(SpringComponentContainer.java:202)
	at org.sonar.batch.bootstrapper.Batch.doExecute(Batch.java:71)
	at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:65)
	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(NativeMethodAccessorImpl.java:77)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:568)
	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: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'ClassRealm{securitypythonfrontend}-com.sonar.security.frontend.python.A': Lookup method resolution failed; nested exception is java.lang.IllegalStateException: Failed to introspect Class [com.sonar.security.frontend.python.A] from ClassLoader [ClassRealm{securitypythonfrontend}]
	at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.determineCandidateConstructors(AutowiredAnnotationBeanPostProcessor.java:289)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.determineConstructorsFromBeanPostProcessors(AbstractAutowireCapableBeanFactory.java:1302)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1219)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:582)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542)
	at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335)
	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)
	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333)
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208)
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeansOfType(DefaultListableBeanFactory.java:673)
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeansOfType(DefaultListableBeanFactory.java:661)
	at org.springframework.context.support.AbstractApplicationContext.getBeansOfType(AbstractApplicationContext.java:1302)
	at org.sonar.core.platform.SpringComponentContainer.getComponentsByType(SpringComponentContainer.java:189)
	... 35 more
Caused by: java.lang.IllegalStateException: Failed to introspect Class [com.sonar.security.frontend.python.A] from ClassLoader [ClassRealm{securitypythonfrontend}]
	at org.springframework.util.ReflectionUtils.getDeclaredMethods(ReflectionUtils.java:485)
	at org.springframework.util.ReflectionUtils.doWithLocalMethods(ReflectionUtils.java:321)
	at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.determineCandidateConstructors(AutowiredAnnotationBeanPostProcessor.java:267)
	... 47 more
Caused by: java.lang.NoClassDefFoundError: org/sonar/sslr/grammar/GrammarRuleKey
	at java.base/java.lang.Class.getDeclaredMethods0(Native Method)
	at java.base/java.lang.Class.privateGetDeclaredMethods(Class.java:3402)
	at java.base/java.lang.Class.getDeclaredMethods(Class.java:2504)
	at org.springframework.util.ReflectionUtils.getDeclaredMethods(ReflectionUtils.java:467)
	... 49 more
Caused by: java.lang.ClassNotFoundException: org.sonar.sslr.grammar.GrammarRuleKey
	at org.sonar.classloader.ParentFirstStrategy.loadClass(ParentFirstStrategy.java:39)
	at org.sonar.classloader.ClassRealm.loadClass(ClassRealm.java:97)
	at org.sonar.classloader.ClassRealm.loadClass(ClassRealm.java:86)
	... 53 more

Hey Csaba,
I don’t think it’s related since I’m not using any plugins, which seems to be the issue with the linked article.
The issue, for us, is resolved by just using a specific release as opposed to :latest.

I think sonarqube changed the way they numbered their releases. Maybe try:
sonarsource/sonar-scanner-cli:5.0.1

I’m affected the same way as everyone else.

Since SonarQube’s pipeline template (eg: for gitlab-ci) specifies using tag sonarsource/sonar-scanner-cli:latest (at least as of 9.9 LTS) - it seems that there should be some expectation that this image is “working”.

1 Like

This beats the purpose. We want to use the latest version of the image.

The risk you take with using :latest. This is the third time in a month we’ve been bitten by a :latest docker instance, eg. alpine:latest removing aws-client from the distro because it didn’t support the latest python libs.

1 Like

I wish I knew what was going on with Sonar’s release artifacts. It’s not just the docker tags which are breaking. They’ve also been breaking the downloads for sonar-scanner zip files as well. Per the suggestion from Sonar Source, I updated my pipelines to point to a static release URL - which not even 1 week later become a 404 because they decided to rename the artifact.

Hey all. Are you still facing the issue?

Other reports of this issue have been solved by clearing the cache folder.

1 Like