Execution default-cli of goal org.sonarsource.scanner.maven:sonar-maven-plugin:3.11.0.3922:sonar fai

Sonarqube Version 10.5 | Released April 2024
Maven Project

Execution default-cli of goal org.sonarsource.scanner.maven:sonar-maven-plugin:3.11.0.3922:sonar failed: A required class was missing while executing org.sonarsource.scanner.maven:sonar-maven-plugin:3.11.0.3922:sonar: org/sonar/plugins/java/api/CheckRegistrar

Hi,

Welcome to the community!

Can you provide the full analysis log?

The analysis / scanner log is what’s output from the analysis command. Hopefully, the log you provide - redacted as necessary - will include that command as well.

This guide will help you find them.

 
Ann

I am also facing a similar issue:

Error:  Failed to execute goal org.sonarsource.scanner.maven:sonar-maven-plugin:3.11.0.3922:sonar (default-cli) on project ********: Execution default-cli of goal org.sonarsource.scanner.maven:sonar-maven-plugin:3.11.0.3922:sonar failed: A required class was missing while executing org.sonarsource.scanner.maven:sonar-maven-plugin:3.11.0.3922:sonar: org/sonar/plugins/java/api/CheckRegistrar
Error:  -----------------------------------------------------
Error:  realm =    plugin>org.codehaus.mojo:sonar-maven-plugin:3.11.0.3922
Error:  strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy
Error:  urls[0] = file:/home/runner/.m2/repository/org/sonarsource/scanner/maven/sonar-maven-plugin/3.11.0.3922/sonar-maven-plugin-3.11.0.3922.jar
Error:  urls[1] = file:/home/runner/.m2/repository/org/codehaus/plexus/plexus-sec-dispatcher/2.0/plexus-sec-dispatcher-2.0.jar
Error:  urls[2] = file:/home/runner/.m2/repository/org/codehaus/plexus/plexus-utils/3.4.1/plexus-utils-3.4.1.jar
Error:  urls[3] = file:/home/runner/.m2/repository/org/codehaus/plexus/plexus-cipher/2.0/plexus-cipher-2.0.jar
Error:  urls[4] = file:/home/runner/.m2/repository/org/sonarsource/scanner/api/sonar-scanner-api/2.16.3.1081/sonar-scanner-api-2.16.3.1081.jar
Error:  urls[5] = file:/home/runner/.m2/repository/commons-lang/commons-lang/2.6/commons-lang-2.6.jar
Error:  Number of foreign imports: 1
Error:  import: Entry[import  from realm ClassRealm[maven.api, parent: null]]

Hi @Joao_Dias,

Welcome to the community!

I’m still looking for a full analysis log. See the link above, please.

 
Ann

Hi Ann,

I am getting same type of error only when using SonarQube 10.5.x. Is this this full analysis log you are looking for:

[INFO] 
[INFO] --- sonar:3.11.0.3922:sonar (default-cli) @ hanz ---
[DEBUG] Dependency collection stats {ConflictMarker.analyzeTime=25167, ConflictMarker.markTime=10750, ConflictMarker.nodeCount=8, ConflictIdSorter.graphTime=4250, ConflictIdSorter.topsortTime=5334, ConflictIdSorter.conflictIdCount=7, ConflictIdSorter.conflictIdCycleCount=0, ConflictResolver.totalTime=45708, ConflictResolver.conflictItemCount=8, DfDependencyCollector.collectTime=8127416, DfDependencyCollector.transformTime=98542}
[DEBUG] org.sonarsource.scanner.maven:sonar-maven-plugin:jar:3.11.0.3922
[DEBUG]    org.codehaus.plexus:plexus-sec-dispatcher:jar:2.0:compile
[DEBUG]       org.codehaus.plexus:plexus-utils:jar:3.4.1:compile
[DEBUG]       org.codehaus.plexus:plexus-cipher:jar:2.0:compile
[DEBUG]       javax.inject:javax.inject:jar:1:compile
[DEBUG]    org.sonarsource.scanner.api:sonar-scanner-api:jar:2.16.3.1081:compile
[DEBUG]    commons-lang:commons-lang:jar:2.6:compile
[DEBUG] Created new class realm plugin>org.codehaus.mojo:sonar-maven-plugin:3.11.0.3922
[DEBUG] Importing foreign packages into class realm plugin>org.codehaus.mojo:sonar-maven-plugin:3.11.0.3922
[DEBUG]   Imported:  < maven.api
[DEBUG] Populating class realm plugin>org.codehaus.mojo:sonar-maven-plugin:3.11.0.3922
[DEBUG]   Included: org.sonarsource.scanner.maven:sonar-maven-plugin:jar:3.11.0.3922
[DEBUG]   Included: org.codehaus.plexus:plexus-sec-dispatcher:jar:2.0
[DEBUG]   Included: org.codehaus.plexus:plexus-utils:jar:3.4.1
[DEBUG]   Included: org.codehaus.plexus:plexus-cipher:jar:2.0
[DEBUG]   Included: org.sonarsource.scanner.api:sonar-scanner-api:jar:2.16.3.1081
[DEBUG]   Included: commons-lang:commons-lang:jar:2.6
[DEBUG] Loading mojo org.sonarsource.scanner.maven:sonar-maven-plugin:3.11.0.3922:sonar from plugin realm ClassRealm[plugin>org.codehaus.mojo:sonar-maven-plugin:3.11.0.3922, parent: jdk.internal.loader.ClassLoaders$AppClassLoader@1cf4f579]
[DEBUG] Configuring mojo execution 'org.sonarsource.scanner.maven:sonar-maven-plugin:3.11.0.3922:sonar:default-cli' with basic configurator -->
[DEBUG]   (f) mojoExecution = org.sonarsource.scanner.maven:sonar-maven-plugin:3.11.0.3922:sonar {execution: default-cli}
[DEBUG]   (f) session = org.apache.maven.execution.MavenSession@146dcfe6
[DEBUG]   (f) skip = false
[DEBUG] -- end configuration --
[DEBUG] 12:58:48.587 Setting proxy properties
[INFO] 12:58:48.589 Java 21.0.3 Homebrew (64-bit)
[INFO] 12:58:48.589 Mac OS X 14.5 (aarch64)
[DEBUG] 12:58:48.599 keyStore is : 
[DEBUG] 12:58:48.599 keyStore type is : pkcs12
[DEBUG] 12:58:48.599 keyStore provider is : 
[DEBUG] 12:58:48.599 init keystore
[DEBUG] 12:58:48.599 init keymanager of type SunX509
[DEBUG] 12:58:48.601 Create: /Users/nycs/.sonar/cache
[INFO] 12:58:48.601 User cache: /Users/nycs/.sonar/cache
[DEBUG] 12:58:48.601 Create: /Users/nycs/.sonar/cache/_tmp
[DEBUG] 12:58:48.602 Extract sonar-scanner-api-batch in temp...
[DEBUG] 12:58:48.603 Get bootstrap index...
[DEBUG] 12:58:48.603 Download: http://localhost:9001/batch/index
[DEBUG] 12:58:48.617 Get bootstrap completed
[DEBUG] 12:58:48.617 Create isolated classloader...
[DEBUG] 12:58:48.619 Start temp cleaning...
[DEBUG] 12:58:48.619 Temp cleaning done
[DEBUG] 12:58:48.619 Execution getVersion
[INFO] 12:58:48.624 Communicating with SonarQube Server 10.5.1.90531
[DEBUG] Lifecycle clean -> [pre-clean, clean, post-clean]
[DEBUG] Lifecycle default -> [validate, initialize, generate-sources, process-sources, generate-resources, process-resources, compile, process-classes, generate-test-sources, process-test-sources, generate-test-resources, process-test-resources, test-compile, process-test-classes, test, prepare-package, package, pre-integration-test, integration-test, post-integration-test, verify, install, deploy]
[DEBUG] Lifecycle site -> [pre-site, site, post-site, site-deploy]
[DEBUG] Lifecycle clean -> [pre-clean, clean, post-clean]
[DEBUG] Lifecycle default -> [validate, initialize, generate-sources, process-sources, generate-resources, process-resources, compile, process-classes, generate-test-sources, process-test-sources, generate-test-resources, process-test-resources, test-compile, process-test-classes, test, prepare-package, package, pre-integration-test, integration-test, post-integration-test, verify, install, deploy]
[DEBUG] Lifecycle site -> [pre-site, site, post-site, site-deploy]
[DEBUG] Lifecycle clean -> [pre-clean, clean, post-clean]
[DEBUG] Lifecycle default -> [validate, initialize, generate-sources, process-sources, generate-resources, process-resources, compile, process-classes, generate-test-sources, process-test-sources, generate-test-resources, process-test-resources, test-compile, process-test-classes, test, prepare-package, package, pre-integration-test, integration-test, post-integration-test, verify, install, deploy]
[DEBUG] Lifecycle site -> [pre-site, site, post-site, site-deploy]
[DEBUG] Lifecycle clean -> [pre-clean, clean, post-clean]
[DEBUG] Lifecycle default -> [validate, initialize, generate-sources, process-sources, generate-resources, process-resources, compile, process-classes, generate-test-sources, process-test-sources, generate-test-resources, process-test-resources, test-compile, process-test-classes, test, prepare-package, package, pre-integration-test, integration-test, post-integration-test, verify, install, deploy]
[DEBUG] Lifecycle site -> [pre-site, site, post-site, site-deploy]
[DEBUG] Lifecycle clean -> [pre-clean, clean, post-clean]
[DEBUG] Lifecycle default -> [validate, initialize, generate-sources, process-sources, generate-resources, process-resources, compile, process-classes, generate-test-sources, process-test-sources, generate-test-resources, process-test-resources, test-compile, process-test-classes, test, prepare-package, package, pre-integration-test, integration-test, post-integration-test, verify, install, deploy]
[DEBUG] Lifecycle site -> [pre-site, site, post-site, site-deploy]
[DEBUG] Lifecycle clean -> [pre-clean, clean, post-clean]
[DEBUG] Lifecycle default -> [validate, initialize, generate-sources, process-sources, generate-resources, process-resources, compile, process-classes, generate-test-sources, process-test-sources, generate-test-resources, process-test-resources, test-compile, process-test-classes, test, prepare-package, package, pre-integration-test, integration-test, post-integration-test, verify, install, deploy]
[DEBUG] Lifecycle site -> [pre-site, site, post-site, site-deploy]
[INFO] 12:58:48.635 Default locale: "en_US", source code encoding: "UTF-8"
[DEBUG] 12:58:48.636 Work directory: /Users/nycs/Documents/gitlab-projects/my projects/hanz/target/sonar
[DEBUG] 12:58:48.636 Execution execute
[DEBUG] 12:58:48.739 Community 10.5.1.90531
[INFO] 12:58:48.834 Load global settings
[DEBUG] 12:58:48.864 GET 200 http://localhost:9001/api/settings/values.protobuf | time=30ms
[INFO] 12:58:48.878 Load global settings (done) | time=44ms
[INFO] 12:58:48.884 Server id: 147B411E-AY-Xh402mCt-8Bi0O5Tm
[INFO] 12:58:48.886 User cache: /Users/nycs/.sonar/cache
[INFO] 12:58:48.889 Loading required plugins
[INFO] 12:58:48.889 Load plugins index
[DEBUG] 12:58:48.898 GET 200 http://localhost:9001/api/plugins/installed | time=9ms
[INFO] 12:58:48.912 Load plugins index (done) | time=23ms
[INFO] 12:58:48.912 Load/download plugins
[INFO] 12:58:48.939 Load/download plugins (done) | time=27ms
[DEBUG] 12:58:48.939 Plugins not loaded because they are optional: [csharp, findbugs, flex, go, web, java, javascript, kotlin, mutationanalysis, php, pmd, ruby, sonarscala, vbnet]
[DEBUG] 12:58:48.958 Plugins loaded:
[DEBUG] 12:58:48.958   * Python Code Quality and Security 4.17.0.14845 (python)
[DEBUG] 12:58:48.958   * Groovy 1.8 (groovy)
[DEBUG] 12:58:48.958   * Rust language analyzer 0.2.3 (communityrust)
[DEBUG] 12:58:48.958   * Code Smells 4.0.0 (smells)
[DEBUG] 12:58:48.958   * Clean as You Code 2.3.0.1782 (cayc)
[DEBUG] 12:58:48.958   * XML Code Quality and Security 2.10.0.4108 (xml)
[DEBUG] 12:58:48.958   * JaCoCo 1.3.0.1538 (jacoco)
[DEBUG] 12:58:48.958   * Azure Active Directory (AAD) Authentication Plug-in for SonarQube 1.3.2 (authaad)
[DEBUG] 12:58:48.958   * IaC Code Quality and Security 1.27.0.9518 (iac)
[DEBUG] 12:58:48.958   * Text Code Quality and Security 2.10.0.2188 (text)
[DEBUG] 12:58:48.958   * Checkstyle 10.12.5 (checkstyle)
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  12.555 s
[INFO] Finished at: 2024-05-20T12:58:49-07:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.sonarsource.scanner.maven:sonar-maven-plugin:3.11.0.3922:sonar (default-cli) on project hanz: Execution default-cli of goal org.sonarsource.scanner.maven:sonar-maven-plugin:3.11.0.3922:sonar failed: A required class was missing while executing org.sonarsource.scanner.maven:sonar-maven-plugin:3.11.0.3922:sonar: org/sonar/plugins/java/api/CheckRegistrar
[ERROR] -----------------------------------------------------
[ERROR] realm =    plugin>org.codehaus.mojo:sonar-maven-plugin:3.11.0.3922
[ERROR] strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy
[ERROR] urls[0] = file:/Users/nycs/Documents/gitlab-projects/my%20projects/hanz/repository/org/sonarsource/scanner/maven/sonar-maven-plugin/3.11.0.3922/sonar-maven-plugin-3.11.0.3922.jar
[ERROR] urls[1] = file:/Users/nycs/Documents/gitlab-projects/my%20projects/hanz/repository/org/codehaus/plexus/plexus-sec-dispatcher/2.0/plexus-sec-dispatcher-2.0.jar
[ERROR] urls[2] = file:/Users/nycs/Documents/gitlab-projects/my%20projects/hanz/repository/org/codehaus/plexus/plexus-utils/3.4.1/plexus-utils-3.4.1.jar
[ERROR] urls[3] = file:/Users/nycs/Documents/gitlab-projects/my%20projects/hanz/repository/org/codehaus/plexus/plexus-cipher/2.0/plexus-cipher-2.0.jar
[ERROR] urls[4] = file:/Users/nycs/Documents/gitlab-projects/my%20projects/hanz/repository/org/sonarsource/scanner/api/sonar-scanner-api/2.16.3.1081/sonar-scanner-api-2.16.3.1081.jar
[ERROR] urls[5] = file:/Users/nycs/Documents/gitlab-projects/my%20projects/hanz/repository/commons-lang/commons-lang/2.6/commons-lang-2.6.jar
[ERROR] Number of foreign imports: 1
[ERROR] import: Entry[import  from realm ClassRealm[maven.api, parent: null]]
[ERROR] 
[ERROR] -----------------------------------------------------
[ERROR] : org.sonar.plugins.java.api.CheckRegistrar
[ERROR] -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.sonarsource.scanner.maven:sonar-maven-plugin:3.11.0.3922:sonar (default-cli) on project hanz: Execution default-cli of goal org.sonarsource.scanner.maven:sonar-maven-plugin:3.11.0.3922:sonar failed: A required class was missing while executing org.sonarsource.scanner.maven:sonar-maven-plugin:3.11.0.3922:sonar: org/sonar/plugins/java/api/CheckRegistrar
-----------------------------------------------------
realm =    plugin>org.codehaus.mojo:sonar-maven-plugin:3.11.0.3922
strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy
urls[0] = file:/Users/nycs/Documents/gitlab-projects/my%20projects/hanz/repository/org/sonarsource/scanner/maven/sonar-maven-plugin/3.11.0.3922/sonar-maven-plugin-3.11.0.3922.jar
urls[1] = file:/Users/nycs/Documents/gitlab-projects/my%20projects/hanz/repository/org/codehaus/plexus/plexus-sec-dispatcher/2.0/plexus-sec-dispatcher-2.0.jar
urls[2] = file:/Users/nycs/Documents/gitlab-projects/my%20projects/hanz/repository/org/codehaus/plexus/plexus-utils/3.4.1/plexus-utils-3.4.1.jar
urls[3] = file:/Users/nycs/Documents/gitlab-projects/my%20projects/hanz/repository/org/codehaus/plexus/plexus-cipher/2.0/plexus-cipher-2.0.jar
urls[4] = file:/Users/nycs/Documents/gitlab-projects/my%20projects/hanz/repository/org/sonarsource/scanner/api/sonar-scanner-api/2.16.3.1081/sonar-scanner-api-2.16.3.1081.jar
urls[5] = file:/Users/nycs/Documents/gitlab-projects/my%20projects/hanz/repository/commons-lang/commons-lang/2.6/commons-lang-2.6.jar
Number of foreign imports: 1
import: Entry[import  from realm ClassRealm[maven.api, parent: null]]

-----------------------------------------------------

    at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute2 (MojoExecutor.java:333)
    at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute (MojoExecutor.java:316)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:212)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:174)
    at org.apache.maven.lifecycle.internal.MojoExecutor.access$000 (MojoExecutor.java:75)
    at org.apache.maven.lifecycle.internal.MojoExecutor$1.run (MojoExecutor.java:162)
    at org.apache.maven.plugin.DefaultMojosExecutionStrategy.execute (DefaultMojosExecutionStrategy.java:39)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:159)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:105)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:73)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:53)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:118)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:261)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:173)
    at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:101)
    at org.apache.maven.cli.MavenCli.execute (MavenCli.java:906)
    at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:283)
    at org.apache.maven.cli.MavenCli.main (MavenCli.java:206)
    at jdk.internal.reflect.DirectMethodHandleAccessor.invoke (DirectMethodHandleAccessor.java:103)
    at java.lang.reflect.Method.invoke (Method.java:580)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:283)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:226)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:407)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:348)
Caused by: org.apache.maven.plugin.PluginExecutionException: Execution default-cli of goal org.sonarsource.scanner.maven:sonar-maven-plugin:3.11.0.3922:sonar failed: A required class was missing while executing org.sonarsource.scanner.maven:sonar-maven-plugin:3.11.0.3922:sonar: org/sonar/plugins/java/api/CheckRegistrar
-----------------------------------------------------
realm =    plugin>org.codehaus.mojo:sonar-maven-plugin:3.11.0.3922
strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy
urls[0] = file:/Users/nycs/Documents/gitlab-projects/my%20projects/hanz/repository/org/sonarsource/scanner/maven/sonar-maven-plugin/3.11.0.3922/sonar-maven-plugin-3.11.0.3922.jar
urls[1] = file:/Users/nycs/Documents/gitlab-projects/my%20projects/hanz/repository/org/codehaus/plexus/plexus-sec-dispatcher/2.0/plexus-sec-dispatcher-2.0.jar
urls[2] = file:/Users/nycs/Documents/gitlab-projects/my%20projects/hanz/repository/org/codehaus/plexus/plexus-utils/3.4.1/plexus-utils-3.4.1.jar
urls[3] = file:/Users/nycs/Documents/gitlab-projects/my%20projects/hanz/repository/org/codehaus/plexus/plexus-cipher/2.0/plexus-cipher-2.0.jar
urls[4] = file:/Users/nycs/Documents/gitlab-projects/my%20projects/hanz/repository/org/sonarsource/scanner/api/sonar-scanner-api/2.16.3.1081/sonar-scanner-api-2.16.3.1081.jar
urls[5] = file:/Users/nycs/Documents/gitlab-projects/my%20projects/hanz/repository/commons-lang/commons-lang/2.6/commons-lang-2.6.jar
Number of foreign imports: 1
import: Entry[import  from realm ClassRealm[maven.api, parent: null]]

-----------------------------------------------------

    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:152)
    at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute2 (MojoExecutor.java:328)
    at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute (MojoExecutor.java:316)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:212)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:174)
    at org.apache.maven.lifecycle.internal.MojoExecutor.access$000 (MojoExecutor.java:75)
    at org.apache.maven.lifecycle.internal.MojoExecutor$1.run (MojoExecutor.java:162)
    at org.apache.maven.plugin.DefaultMojosExecutionStrategy.execute (DefaultMojosExecutionStrategy.java:39)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:159)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:105)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:73)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:53)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:118)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:261)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:173)
    at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:101)
    at org.apache.maven.cli.MavenCli.execute (MavenCli.java:906)
    at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:283)
    at org.apache.maven.cli.MavenCli.main (MavenCli.java:206)
    at jdk.internal.reflect.DirectMethodHandleAccessor.invoke (DirectMethodHandleAccessor.java:103)
    at java.lang.reflect.Method.invoke (Method.java:580)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:283)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:226)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:407)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:348)
Caused by: org.apache.maven.plugin.PluginContainerException: A required class was missing while executing org.sonarsource.scanner.maven:sonar-maven-plugin:3.11.0.3922:sonar: org/sonar/plugins/java/api/CheckRegistrar
-----------------------------------------------------
realm =    plugin>org.codehaus.mojo:sonar-maven-plugin:3.11.0.3922
strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy
urls[0] = file:/Users/nycs/Documents/gitlab-projects/my%20projects/hanz/repository/org/sonarsource/scanner/maven/sonar-maven-plugin/3.11.0.3922/sonar-maven-plugin-3.11.0.3922.jar
urls[1] = file:/Users/nycs/Documents/gitlab-projects/my%20projects/hanz/repository/org/codehaus/plexus/plexus-sec-dispatcher/2.0/plexus-sec-dispatcher-2.0.jar
urls[2] = file:/Users/nycs/Documents/gitlab-projects/my%20projects/hanz/repository/org/codehaus/plexus/plexus-utils/3.4.1/plexus-utils-3.4.1.jar
urls[3] = file:/Users/nycs/Documents/gitlab-projects/my%20projects/hanz/repository/org/codehaus/plexus/plexus-cipher/2.0/plexus-cipher-2.0.jar
urls[4] = file:/Users/nycs/Documents/gitlab-projects/my%20projects/hanz/repository/org/sonarsource/scanner/api/sonar-scanner-api/2.16.3.1081/sonar-scanner-api-2.16.3.1081.jar
urls[5] = file:/Users/nycs/Documents/gitlab-projects/my%20projects/hanz/repository/commons-lang/commons-lang/2.6/commons-lang-2.6.jar
Number of foreign imports: 1
import: Entry[import  from realm ClassRealm[maven.api, parent: null]]

-----------------------------------------------------

    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:150)
    at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute2 (MojoExecutor.java:328)
    at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute (MojoExecutor.java:316)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:212)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:174)
    at org.apache.maven.lifecycle.internal.MojoExecutor.access$000 (MojoExecutor.java:75)
    at org.apache.maven.lifecycle.internal.MojoExecutor$1.run (MojoExecutor.java:162)
    at org.apache.maven.plugin.DefaultMojosExecutionStrategy.execute (DefaultMojosExecutionStrategy.java:39)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:159)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:105)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:73)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:53)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:118)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:261)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:173)
    at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:101)
    at org.apache.maven.cli.MavenCli.execute (MavenCli.java:906)
    at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:283)
    at org.apache.maven.cli.MavenCli.main (MavenCli.java:206)
    at jdk.internal.reflect.DirectMethodHandleAccessor.invoke (DirectMethodHandleAccessor.java:103)
    at java.lang.reflect.Method.invoke (Method.java:580)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:283)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:226)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:407)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:348)
Caused by: java.lang.NoClassDefFoundError: org/sonar/plugins/java/api/CheckRegistrar
    at java.lang.ClassLoader.defineClass1 (Native Method)
    at java.lang.ClassLoader.defineClass (ClassLoader.java:1027)
    at java.security.SecureClassLoader.defineClass (SecureClassLoader.java:150)
    at java.net.URLClassLoader.defineClass (URLClassLoader.java:524)
    at java.net.URLClassLoader$1.run (URLClassLoader.java:427)
    at java.net.URLClassLoader$1.run (URLClassLoader.java:421)
    at java.security.AccessController.doPrivileged (AccessController.java:714)
    at java.net.URLClassLoader.findClass (URLClassLoader.java:420)
    at org.sonar.classloader.ClassRealm.loadClassFromSelf (ClassRealm.java:135)
    at org.sonar.classloader.ParentFirstStrategy.loadClass (ParentFirstStrategy.java:37)
    at org.sonar.classloader.ClassRealm.loadClass (ClassRealm.java:97)
    at org.sonar.classloader.ClassRealm.loadClass (ClassRealm.java:86)
    at com.qualinsight.plugins.sonarqube.smell.plugin.SmellPlugin.define (SmellPlugin.java:59)
    at org.sonar.scanner.bootstrap.ExtensionInstaller.installExtensionsForPlugins (ExtensionInstaller.java:64)
    at org.sonar.scanner.bootstrap.ExtensionInstaller.install (ExtensionInstaller.java:51)
    at org.sonar.scanner.bootstrap.SpringScannerContainer.addScannerExtensions (SpringScannerContainer.java:175)
    at org.sonar.scanner.bootstrap.SpringScannerContainer.doBeforeStart (SpringScannerContainer.java:155)
    at org.sonar.core.platform.SpringComponentContainer.startComponents (SpringComponentContainer.java:224)
    at org.sonar.core.platform.SpringComponentContainer.execute (SpringComponentContainer.java:205)
    at org.sonar.scanner.bootstrap.SpringGlobalContainer.doAfterStart (SpringGlobalContainer.java:138)
    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:71)
    at org.sonar.batch.bootstrapper.Batch.execute (Batch.java:65)
    at org.sonarsource.scanner.api.internal.batch.BatchIsolatedLauncher.execute (BatchIsolatedLauncher.java:46)
    at jdk.internal.reflect.DirectMethodHandleAccessor.invoke (DirectMethodHandleAccessor.java:103)
    at java.lang.reflect.Method.invoke (Method.java:580)
    at org.sonarsource.scanner.api.internal.IsolatedLauncherProxy.invoke (IsolatedLauncherProxy.java:60)
    at jdk.proxy6.$Proxy46.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.maven.bootstrap.ScannerBootstrapper.execute (ScannerBootstrapper.java:88)
    at org.sonarsource.scanner.maven.SonarQubeMojo.execute (SonarQubeMojo.java:106)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:126)
    at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute2 (MojoExecutor.java:328)
    at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute (MojoExecutor.java:316)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:212)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:174)
    at org.apache.maven.lifecycle.internal.MojoExecutor.access$000 (MojoExecutor.java:75)
    at org.apache.maven.lifecycle.internal.MojoExecutor$1.run (MojoExecutor.java:162)
    at org.apache.maven.plugin.DefaultMojosExecutionStrategy.execute (DefaultMojosExecutionStrategy.java:39)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:159)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:105)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:73)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:53)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:118)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:261)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:173)
    at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:101)
    at org.apache.maven.cli.MavenCli.execute (MavenCli.java:906)
    at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:283)
    at org.apache.maven.cli.MavenCli.main (MavenCli.java:206)
    at jdk.internal.reflect.DirectMethodHandleAccessor.invoke (DirectMethodHandleAccessor.java:103)
    at java.lang.reflect.Method.invoke (Method.java:580)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:283)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:226)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:407)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:348)
Caused by: java.lang.ClassNotFoundException: org.sonar.plugins.java.api.CheckRegistrar
    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)
    at java.lang.ClassLoader.defineClass1 (Native Method)
    at java.lang.ClassLoader.defineClass (ClassLoader.java:1027)
    at java.security.SecureClassLoader.defineClass (SecureClassLoader.java:150)
    at java.net.URLClassLoader.defineClass (URLClassLoader.java:524)
    at java.net.URLClassLoader$1.run (URLClassLoader.java:427)
    at java.net.URLClassLoader$1.run (URLClassLoader.java:421)
    at java.security.AccessController.doPrivileged (AccessController.java:714)
    at java.net.URLClassLoader.findClass (URLClassLoader.java:420)
    at org.sonar.classloader.ClassRealm.loadClassFromSelf (ClassRealm.java:135)
    at org.sonar.classloader.ParentFirstStrategy.loadClass (ParentFirstStrategy.java:37)
    at org.sonar.classloader.ClassRealm.loadClass (ClassRealm.java:97)
    at org.sonar.classloader.ClassRealm.loadClass (ClassRealm.java:86)
    at com.qualinsight.plugins.sonarqube.smell.plugin.SmellPlugin.define (SmellPlugin.java:59)
    at org.sonar.scanner.bootstrap.ExtensionInstaller.installExtensionsForPlugins (ExtensionInstaller.java:64)
    at org.sonar.scanner.bootstrap.ExtensionInstaller.install (ExtensionInstaller.java:51)
    at org.sonar.scanner.bootstrap.SpringScannerContainer.addScannerExtensions (SpringScannerContainer.java:175)
    at org.sonar.scanner.bootstrap.SpringScannerContainer.doBeforeStart (SpringScannerContainer.java:155)
    at org.sonar.core.platform.SpringComponentContainer.startComponents (SpringComponentContainer.java:224)
    at org.sonar.core.platform.SpringComponentContainer.execute (SpringComponentContainer.java:205)
    at org.sonar.scanner.bootstrap.SpringGlobalContainer.doAfterStart (SpringGlobalContainer.java:138)
    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:71)
    at org.sonar.batch.bootstrapper.Batch.execute (Batch.java:65)
    at org.sonarsource.scanner.api.internal.batch.BatchIsolatedLauncher.execute (BatchIsolatedLauncher.java:46)
    at jdk.internal.reflect.DirectMethodHandleAccessor.invoke (DirectMethodHandleAccessor.java:103)
    at java.lang.reflect.Method.invoke (Method.java:580)
    at org.sonarsource.scanner.api.internal.IsolatedLauncherProxy.invoke (IsolatedLauncherProxy.java:60)
    at jdk.proxy6.$Proxy46.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.maven.bootstrap.ScannerBootstrapper.execute (ScannerBootstrapper.java:88)
    at org.sonarsource.scanner.maven.SonarQubeMojo.execute (SonarQubeMojo.java:106)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:126)
    at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute2 (MojoExecutor.java:328)
    at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute (MojoExecutor.java:316)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:212)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:174)
    at org.apache.maven.lifecycle.internal.MojoExecutor.access$000 (MojoExecutor.java:75)
    at org.apache.maven.lifecycle.internal.MojoExecutor$1.run (MojoExecutor.java:162)
    at org.apache.maven.plugin.DefaultMojosExecutionStrategy.execute (DefaultMojosExecutionStrategy.java:39)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:159)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:105)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:73)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:53)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:118)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:261)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:173)
    at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:101)
    at org.apache.maven.cli.MavenCli.execute (MavenCli.java:906)
    at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:283)
    at org.apache.maven.cli.MavenCli.main (MavenCli.java:206)
    at jdk.internal.reflect.DirectMethodHandleAccessor.invoke (DirectMethodHandleAccessor.java:103)
    at java.lang.reflect.Method.invoke (Method.java:580)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:283)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:226)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:407)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:348)
[ERROR] 
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginContainerException
[DEBUG] Shutting down adapter factory; available factories [file-lock, rwlock-local, semaphore-local, noop]; available name mappers [discriminating, file-gav, file-hgav, file-static, gav, static]
[DEBUG] Shutting down 'file-lock' factory
[DEBUG] Shutting down 'rwlock-local' factory
[DEBUG] Shutting down 'semaphore-local' factory
[DEBUG] Shutting down 'noop' factory

Hi @desertrat,

Thanks for the log!

It looks like you’ve installed a version of the Checkstyle plugin that’s not compatible with SonarQube 10.5. That’s why the upgrade instructions say to always check the Plugin Version Matrix and explicitly say

Simply copying plugins from the old server to the new is not recommended

SonarQube 10.5 turned on by default the feature to only download from the server the analyzers & plugins required for the current analysis (to save bandwidth and time). That required updates in community plugins to explicitly declare the language(s) they worked with.

Your analysis log tells the tale. First we have this:

[DEBUG] 12:58:48.939 Plugins not loaded because they are optional: [csharp, findbugs, flex, go, web, java, javascript, kotlin, mutationanalysis, php, pmd, ruby, sonarscala, vbnet]

FindBugs, and Java aren’t loaded, (which tells me there’s no Java in the project). And then we have:

[DEBUG] 12:58:48.958 Plugins loaded:
...
[DEBUG] 12:58:48.958   * Checkstyle 10.12.5 (checkstyle)

Checkstyle relies on Java, but it’s not there because it wasn’t needed for the analysis. Hence the stacktrace.

Fortunately, an updated version of Checkstyle has been released. Upgrade to 10.16.0, and this should go away.

What I don’t understand is why you’re analyzing with Maven for a non-Java project…?

 
Ann

Hi Ann,

Yes, I intentionally used an older Checkstyle plugin version. Did this because the Exporter feature was removed from the newer version. I didn’t realize that 10.5.x required a specific version of the Checkstyle plugin. I will update to suggest Checkstyle plugin version and give it another try.

Actually the project being analyzed is a Java project that is build with Maven.

Thanks,
Chris

Hi Chris,

:thinking:

I’ll be interested to know how analysis goes once you’ve corrected the Checkstyle version. It’s possible you’ll need to downgrade to Java 17 on your build server.

 
Ann

Ann,

Okay I updated to latest required Checkstyle plugin, 10.16.0. Looks like I am still getting same error. Here is snippet from build running mvn -X sonar:sonar

[INFO] 
[INFO] --- sonar:3.11.0.3922:sonar (default-cli) @ hanz ---
[DEBUG] Dependency collection stats {ConflictMarker.analyzeTime=38250, ConflictMarker.markTime=27833, ConflictMarker.nodeCount=8, ConflictIdSorter.graphTime=6916, ConflictIdSorter.topsortTime=7167, ConflictIdSorter.conflictIdCount=7, ConflictIdSorter.conflictIdCycleCount=0, ConflictResolver.totalTime=118958, ConflictResolver.conflictItemCount=8, DfDependencyCollector.collectTime=10235209, DfDependencyCollector.transformTime=209625}
[DEBUG] org.sonarsource.scanner.maven:sonar-maven-plugin:jar:3.11.0.3922
[DEBUG]    org.codehaus.plexus:plexus-sec-dispatcher:jar:2.0:compile
[DEBUG]       org.codehaus.plexus:plexus-utils:jar:3.4.1:compile
[DEBUG]       org.codehaus.plexus:plexus-cipher:jar:2.0:compile
[DEBUG]       javax.inject:javax.inject:jar:1:compile
[DEBUG]    org.sonarsource.scanner.api:sonar-scanner-api:jar:2.16.3.1081:compile
[DEBUG]    commons-lang:commons-lang:jar:2.6:compile
[DEBUG] Created new class realm plugin>org.codehaus.mojo:sonar-maven-plugin:3.11.0.3922
[DEBUG] Importing foreign packages into class realm plugin>org.codehaus.mojo:sonar-maven-plugin:3.11.0.3922
[DEBUG]   Imported:  < maven.api
[DEBUG] Populating class realm plugin>org.codehaus.mojo:sonar-maven-plugin:3.11.0.3922
[DEBUG]   Included: org.sonarsource.scanner.maven:sonar-maven-plugin:jar:3.11.0.3922
[DEBUG]   Included: org.codehaus.plexus:plexus-sec-dispatcher:jar:2.0
[DEBUG]   Included: org.codehaus.plexus:plexus-utils:jar:3.4.1
[DEBUG]   Included: org.codehaus.plexus:plexus-cipher:jar:2.0
[DEBUG]   Included: org.sonarsource.scanner.api:sonar-scanner-api:jar:2.16.3.1081
[DEBUG]   Included: commons-lang:commons-lang:jar:2.6
[DEBUG] Loading mojo org.sonarsource.scanner.maven:sonar-maven-plugin:3.11.0.3922:sonar from plugin realm ClassRealm[plugin>org.codehaus.mojo:sonar-maven-plugin:3.11.0.3922, parent: jdk.internal.loader.ClassLoaders$AppClassLoader@1cf4f579]
[DEBUG] Configuring mojo execution 'org.sonarsource.scanner.maven:sonar-maven-plugin:3.11.0.3922:sonar:default-cli' with basic configurator -->
[DEBUG]   (f) mojoExecution = org.sonarsource.scanner.maven:sonar-maven-plugin:3.11.0.3922:sonar {execution: default-cli}
[DEBUG]   (f) session = org.apache.maven.execution.MavenSession@730f9695
[DEBUG]   (f) skip = false
[DEBUG] -- end configuration --
[DEBUG] 12:57:43.386 Setting proxy properties
[INFO] 12:57:43.388 Java 21.0.3 Homebrew (64-bit)
[INFO] 12:57:43.388 Mac OS X 14.5 (aarch64)
[DEBUG] 12:57:43.399 keyStore is : 
[DEBUG] 12:57:43.399 keyStore type is : pkcs12
[DEBUG] 12:57:43.399 keyStore provider is : 
[DEBUG] 12:57:43.399 init keystore
[DEBUG] 12:57:43.399 init keymanager of type SunX509
[DEBUG] 12:57:43.403 Create: /Users/nycs/.sonar/cache
[INFO] 12:57:43.403 User cache: /Users/nycs/.sonar/cache
[DEBUG] 12:57:43.403 Create: /Users/nycs/.sonar/cache/_tmp
[DEBUG] 12:57:43.403 Extract sonar-scanner-api-batch in temp...
[DEBUG] 12:57:43.406 Get bootstrap index...
[DEBUG] 12:57:43.406 Download: http://localhost:9001/batch/index
[DEBUG] 12:57:43.421 Get bootstrap completed
[DEBUG] 12:57:43.422 Create isolated classloader...
[DEBUG] 12:57:43.424 Start temp cleaning...
[DEBUG] 12:57:43.426 Temp cleaning done
[DEBUG] 12:57:43.426 Execution getVersion
[INFO] 12:57:43.431 Communicating with SonarQube Server 10.5.1.90531
[DEBUG] Lifecycle clean -> [pre-clean, clean, post-clean]
[DEBUG] Lifecycle default -> [validate, initialize, generate-sources, process-sources, generate-resources, process-resources, compile, process-classes, generate-test-sources, process-test-sources, generate-test-resources, process-test-resources, test-compile, process-test-classes, test, prepare-package, package, pre-integration-test, integration-test, post-integration-test, verify, install, deploy]
[DEBUG] Lifecycle site -> [pre-site, site, post-site, site-deploy]
[DEBUG] Lifecycle clean -> [pre-clean, clean, post-clean]
[DEBUG] Lifecycle default -> [validate, initialize, generate-sources, process-sources, generate-resources, process-resources, compile, process-classes, generate-test-sources, process-test-sources, generate-test-resources, process-test-resources, test-compile, process-test-classes, test, prepare-package, package, pre-integration-test, integration-test, post-integration-test, verify, install, deploy]
[DEBUG] Lifecycle site -> [pre-site, site, post-site, site-deploy]
[DEBUG] Lifecycle clean -> [pre-clean, clean, post-clean]
[DEBUG] Lifecycle default -> [validate, initialize, generate-sources, process-sources, generate-resources, process-resources, compile, process-classes, generate-test-sources, process-test-sources, generate-test-resources, process-test-resources, test-compile, process-test-classes, test, prepare-package, package, pre-integration-test, integration-test, post-integration-test, verify, install, deploy]
[DEBUG] Lifecycle site -> [pre-site, site, post-site, site-deploy]
[DEBUG] Lifecycle clean -> [pre-clean, clean, post-clean]
[DEBUG] Lifecycle default -> [validate, initialize, generate-sources, process-sources, generate-resources, process-resources, compile, process-classes, generate-test-sources, process-test-sources, generate-test-resources, process-test-resources, test-compile, process-test-classes, test, prepare-package, package, pre-integration-test, integration-test, post-integration-test, verify, install, deploy]
[DEBUG] Lifecycle site -> [pre-site, site, post-site, site-deploy]
[DEBUG] Lifecycle clean -> [pre-clean, clean, post-clean]
[DEBUG] Lifecycle default -> [validate, initialize, generate-sources, process-sources, generate-resources, process-resources, compile, process-classes, generate-test-sources, process-test-sources, generate-test-resources, process-test-resources, test-compile, process-test-classes, test, prepare-package, package, pre-integration-test, integration-test, post-integration-test, verify, install, deploy]
[DEBUG] Lifecycle site -> [pre-site, site, post-site, site-deploy]
[DEBUG] Lifecycle clean -> [pre-clean, clean, post-clean]
[DEBUG] Lifecycle default -> [validate, initialize, generate-sources, process-sources, generate-resources, process-resources, compile, process-classes, generate-test-sources, process-test-sources, generate-test-resources, process-test-resources, test-compile, process-test-classes, test, prepare-package, package, pre-integration-test, integration-test, post-integration-test, verify, install, deploy]
[DEBUG] Lifecycle site -> [pre-site, site, post-site, site-deploy]
[INFO] 12:57:43.437 Default locale: "en_US", source code encoding: "UTF-8"
[DEBUG] 12:57:43.437 Work directory: /Users/nycs/Documents/gitlab-projects/my projects/hanz/target/sonar
[DEBUG] 12:57:43.437 Execution execute
[DEBUG] 12:57:43.562 Community 10.5.1.90531
[INFO] 12:57:43.655 Load global settings
[DEBUG] 12:57:43.688 GET 200 http://localhost:9001/api/settings/values.protobuf | time=31ms
[INFO] 12:57:43.701 Load global settings (done) | time=46ms
[INFO] 12:57:43.707 Server id: 147B411E-AY-coPJPJZUO-Cl-I53N
[INFO] 12:57:43.709 User cache: /Users/nycs/.sonar/cache
[INFO] 12:57:43.712 Loading required plugins
[INFO] 12:57:43.712 Load plugins index
[DEBUG] 12:57:43.720 GET 200 http://localhost:9001/api/plugins/installed | time=8ms
[INFO] 12:57:43.735 Load plugins index (done) | time=23ms
[INFO] 12:57:43.735 Load/download plugins
[INFO] 12:57:43.768 Load/download plugins (done) | time=33ms
[DEBUG] 12:57:43.768 Plugins not loaded because they are optional: [csharp, checkstyle, findbugs, flex, go, web, java, javascript, kotlin, mutationanalysis, php, pmd, ruby, sonarscala, vbnet]
[DEBUG] 12:57:43.791 Plugins loaded:
[DEBUG] 12:57:43.791   * Python Code Quality and Security 4.17.0.14845 (python)
[DEBUG] 12:57:43.791   * Groovy 1.8 (groovy)
[DEBUG] 12:57:43.791   * Rust language analyzer 0.2.3 (communityrust)
[DEBUG] 12:57:43.791   * Code Smells 4.0.0 (smells)
[DEBUG] 12:57:43.791   * Clean as You Code 2.3.0.1782 (cayc)
[DEBUG] 12:57:43.791   * XML Code Quality and Security 2.10.0.4108 (xml)
[DEBUG] 12:57:43.791   * JaCoCo 1.3.0.1538 (jacoco)
[DEBUG] 12:57:43.791   * Azure Active Directory (AAD) Authentication Plug-in for SonarQube 1.3.2 (authaad)
[DEBUG] 12:57:43.791   * IaC Code Quality and Security 1.27.0.9518 (iac)
[DEBUG] 12:57:43.791   * Text Code Quality and Security 2.10.0.2188 (text)
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  2.191 s
[INFO] Finished at: 2024-05-21T12:57:43-07:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.sonarsource.scanner.maven:sonar-maven-plugin:3.11.0.3922:sonar (default-cli) on project hanz: Execution default-cli of goal org.sonarsource.scanner.maven:sonar-maven-plugin:3.11.0.3922:sonar failed: A required class was missing while executing org.sonarsource.scanner.maven:sonar-maven-plugin:3.11.0.3922:sonar: org/sonar/plugins/java/api/CheckRegistrar
[ERROR] -----------------------------------------------------
[ERROR] realm =    plugin>org.codehaus.mojo:sonar-maven-plugin:3.11.0.3922
[ERROR] strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy
[ERROR] urls[0] = file:/Users/nycs/Documents/gitlab-projects/my%20projects/hanz/repository/org/sonarsource/scanner/maven/sonar-maven-plugin/3.11.0.3922/sonar-maven-plugin-3.11.0.3922.jar
[ERROR] urls[1] = file:/Users/nycs/Documents/gitlab-projects/my%20projects/hanz/repository/org/codehaus/plexus/plexus-sec-dispatcher/2.0/plexus-sec-dispatcher-2.0.jar
[ERROR] urls[2] = file:/Users/nycs/Documents/gitlab-projects/my%20projects/hanz/repository/org/codehaus/plexus/plexus-utils/3.4.1/plexus-utils-3.4.1.jar
[ERROR] urls[3] = file:/Users/nycs/Documents/gitlab-projects/my%20projects/hanz/repository/org/codehaus/plexus/plexus-cipher/2.0/plexus-cipher-2.0.jar
[ERROR] urls[4] = file:/Users/nycs/Documents/gitlab-projects/my%20projects/hanz/repository/org/sonarsource/scanner/api/sonar-scanner-api/2.16.3.1081/sonar-scanner-api-2.16.3.1081.jar
[ERROR] urls[5] = file:/Users/nycs/Documents/gitlab-projects/my%20projects/hanz/repository/commons-lang/commons-lang/2.6/commons-lang-2.6.jar
[ERROR] Number of foreign imports: 1
[ERROR] import: Entry[import  from realm ClassRealm[maven.api, parent: null]]
[ERROR] 
[ERROR] -----------------------------------------------------
[ERROR] : org.sonar.plugins.java.api.CheckRegistrar
[ERROR] -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.sonarsource.scanner.maven:sonar-maven-plugin:3.11.0.3922:sonar (default-cli) on project hanz: Execution default-cli of goal org.sonarsource.scanner.maven:sonar-maven-plugin:3.11.0.3922:sonar failed: A required class was missing while executing org.sonarsource.scanner.maven:sonar-maven-plugin:3.11.0.3922:sonar: org/sonar/plugins/java/api/CheckRegistrar
-----------------------------------------------------
realm =    plugin>org.codehaus.mojo:sonar-maven-plugin:3.11.0.3922
strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy
urls[0] = file:/Users/nycs/Documents/gitlab-projects/my%20projects/hanz/repository/org/sonarsource/scanner/maven/sonar-maven-plugin/3.11.0.3922/sonar-maven-plugin-3.11.0.3922.jar
urls[1] = file:/Users/nycs/Documents/gitlab-projects/my%20projects/hanz/repository/org/codehaus/plexus/plexus-sec-dispatcher/2.0/plexus-sec-dispatcher-2.0.jar
urls[2] = file:/Users/nycs/Documents/gitlab-projects/my%20projects/hanz/repository/org/codehaus/plexus/plexus-utils/3.4.1/plexus-utils-3.4.1.jar
urls[3] = file:/Users/nycs/Documents/gitlab-projects/my%20projects/hanz/repository/org/codehaus/plexus/plexus-cipher/2.0/plexus-cipher-2.0.jar
urls[4] = file:/Users/nycs/Documents/gitlab-projects/my%20projects/hanz/repository/org/sonarsource/scanner/api/sonar-scanner-api/2.16.3.1081/sonar-scanner-api-2.16.3.1081.jar
urls[5] = file:/Users/nycs/Documents/gitlab-projects/my%20projects/hanz/repository/commons-lang/commons-lang/2.6/commons-lang-2.6.jar
Number of foreign imports: 1
import: Entry[import  from realm ClassRealm[maven.api, parent: null]]

-----------------------------------------------------

    at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute2 (MojoExecutor.java:333)
    at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute (MojoExecutor.java:316)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:212)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:174)
    at org.apache.maven.lifecycle.internal.MojoExecutor.access$000 (MojoExecutor.java:75)
    at org.apache.maven.lifecycle.internal.MojoExecutor$1.run (MojoExecutor.java:162)
    at org.apache.maven.plugin.DefaultMojosExecutionStrategy.execute (DefaultMojosExecutionStrategy.java:39)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:159)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:105)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:73)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:53)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:118)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:261)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:173)
    at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:101)
    at org.apache.maven.cli.MavenCli.execute (MavenCli.java:906)
    at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:283)
    at org.apache.maven.cli.MavenCli.main (MavenCli.java:206)
    at jdk.internal.reflect.DirectMethodHandleAccessor.invoke (DirectMethodHandleAccessor.java:103)
    at java.lang.reflect.Method.invoke (Method.java:580)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:283)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:226)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:407)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:348)
Caused by: org.apache.maven.plugin.PluginExecutionException: Execution default-cli of goal org.sonarsource.scanner.maven:sonar-maven-plugin:3.11.0.3922:sonar failed: A required class was missing while executing org.sonarsource.scanner.maven:sonar-maven-plugin:3.11.0.3922:sonar: org/sonar/plugins/java/api/CheckRegistrar
-----------------------------------------------------
realm =    plugin>org.codehaus.mojo:sonar-maven-plugin:3.11.0.3922
strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy
urls[0] = file:/Users/nycs/Documents/gitlab-projects/my%20projects/hanz/repository/org/sonarsource/scanner/maven/sonar-maven-plugin/3.11.0.3922/sonar-maven-plugin-3.11.0.3922.jar
urls[1] = file:/Users/nycs/Documents/gitlab-projects/my%20projects/hanz/repository/org/codehaus/plexus/plexus-sec-dispatcher/2.0/plexus-sec-dispatcher-2.0.jar
urls[2] = file:/Users/nycs/Documents/gitlab-projects/my%20projects/hanz/repository/org/codehaus/plexus/plexus-utils/3.4.1/plexus-utils-3.4.1.jar
urls[3] = file:/Users/nycs/Documents/gitlab-projects/my%20projects/hanz/repository/org/codehaus/plexus/plexus-cipher/2.0/plexus-cipher-2.0.jar
urls[4] = file:/Users/nycs/Documents/gitlab-projects/my%20projects/hanz/repository/org/sonarsource/scanner/api/sonar-scanner-api/2.16.3.1081/sonar-scanner-api-2.16.3.1081.jar
urls[5] = file:/Users/nycs/Documents/gitlab-projects/my%20projects/hanz/repository/commons-lang/commons-lang/2.6/commons-lang-2.6.jar
Number of foreign imports: 1
import: Entry[import  from realm ClassRealm[maven.api, parent: null]]

-----------------------------------------------------

    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:152)
    at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute2 (MojoExecutor.java:328)
    at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute (MojoExecutor.java:316)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:212)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:174)
    at org.apache.maven.lifecycle.internal.MojoExecutor.access$000 (MojoExecutor.java:75)
    at org.apache.maven.lifecycle.internal.MojoExecutor$1.run (MojoExecutor.java:162)
    at org.apache.maven.plugin.DefaultMojosExecutionStrategy.execute (DefaultMojosExecutionStrategy.java:39)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:159)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:105)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:73)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:53)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:118)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:261)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:173)
    at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:101)
    at org.apache.maven.cli.MavenCli.execute (MavenCli.java:906)
    at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:283)
    at org.apache.maven.cli.MavenCli.main (MavenCli.java:206)
    at jdk.internal.reflect.DirectMethodHandleAccessor.invoke (DirectMethodHandleAccessor.java:103)
    at java.lang.reflect.Method.invoke (Method.java:580)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:283)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:226)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:407)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:348)
Caused by: org.apache.maven.plugin.PluginContainerException: A required class was missing while executing org.sonarsource.scanner.maven:sonar-maven-plugin:3.11.0.3922:sonar: org/sonar/plugins/java/api/CheckRegistrar
-----------------------------------------------------
realm =    plugin>org.codehaus.mojo:sonar-maven-plugin:3.11.0.3922
strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy
urls[0] = file:/Users/nycs/Documents/gitlab-projects/my%20projects/hanz/repository/org/sonarsource/scanner/maven/sonar-maven-plugin/3.11.0.3922/sonar-maven-plugin-3.11.0.3922.jar
urls[1] = file:/Users/nycs/Documents/gitlab-projects/my%20projects/hanz/repository/org/codehaus/plexus/plexus-sec-dispatcher/2.0/plexus-sec-dispatcher-2.0.jar
urls[2] = file:/Users/nycs/Documents/gitlab-projects/my%20projects/hanz/repository/org/codehaus/plexus/plexus-utils/3.4.1/plexus-utils-3.4.1.jar
urls[3] = file:/Users/nycs/Documents/gitlab-projects/my%20projects/hanz/repository/org/codehaus/plexus/plexus-cipher/2.0/plexus-cipher-2.0.jar
urls[4] = file:/Users/nycs/Documents/gitlab-projects/my%20projects/hanz/repository/org/sonarsource/scanner/api/sonar-scanner-api/2.16.3.1081/sonar-scanner-api-2.16.3.1081.jar
urls[5] = file:/Users/nycs/Documents/gitlab-projects/my%20projects/hanz/repository/commons-lang/commons-lang/2.6/commons-lang-2.6.jar
Number of foreign imports: 1
import: Entry[import  from realm ClassRealm[maven.api, parent: null]]

-----------------------------------------------------

    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:150)
    at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute2 (MojoExecutor.java:328)
    at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute (MojoExecutor.java:316)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:212)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:174)
    at org.apache.maven.lifecycle.internal.MojoExecutor.access$000 (MojoExecutor.java:75)
    at org.apache.maven.lifecycle.internal.MojoExecutor$1.run (MojoExecutor.java:162)
    at org.apache.maven.plugin.DefaultMojosExecutionStrategy.execute (DefaultMojosExecutionStrategy.java:39)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:159)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:105)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:73)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:53)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:118)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:261)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:173)
    at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:101)
    at org.apache.maven.cli.MavenCli.execute (MavenCli.java:906)
    at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:283)
    at org.apache.maven.cli.MavenCli.main (MavenCli.java:206)
    at jdk.internal.reflect.DirectMethodHandleAccessor.invoke (DirectMethodHandleAccessor.java:103)
    at java.lang.reflect.Method.invoke (Method.java:580)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:283)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:226)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:407)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:348)
Caused by: java.lang.NoClassDefFoundError: org/sonar/plugins/java/api/CheckRegistrar
    at java.lang.ClassLoader.defineClass1 (Native Method)
    at java.lang.ClassLoader.defineClass (ClassLoader.java:1027)
    at java.security.SecureClassLoader.defineClass (SecureClassLoader.java:150)
    at java.net.URLClassLoader.defineClass (URLClassLoader.java:524)
    at java.net.URLClassLoader$1.run (URLClassLoader.java:427)
    at java.net.URLClassLoader$1.run (URLClassLoader.java:421)
    at java.security.AccessController.doPrivileged (AccessController.java:714)
    at java.net.URLClassLoader.findClass (URLClassLoader.java:420)
    at org.sonar.classloader.ClassRealm.loadClassFromSelf (ClassRealm.java:135)
    at org.sonar.classloader.ParentFirstStrategy.loadClass (ParentFirstStrategy.java:37)
    at org.sonar.classloader.ClassRealm.loadClass (ClassRealm.java:97)
    at org.sonar.classloader.ClassRealm.loadClass (ClassRealm.java:86)
    at com.qualinsight.plugins.sonarqube.smell.plugin.SmellPlugin.define (SmellPlugin.java:59)
    at org.sonar.scanner.bootstrap.ExtensionInstaller.installExtensionsForPlugins (ExtensionInstaller.java:64)
    at org.sonar.scanner.bootstrap.ExtensionInstaller.install (ExtensionInstaller.java:51)
    at org.sonar.scanner.bootstrap.SpringScannerContainer.addScannerExtensions (SpringScannerContainer.java:175)
    at org.sonar.scanner.bootstrap.SpringScannerContainer.doBeforeStart (SpringScannerContainer.java:155)
    at org.sonar.core.platform.SpringComponentContainer.startComponents (SpringComponentContainer.java:224)
    at org.sonar.core.platform.SpringComponentContainer.execute (SpringComponentContainer.java:205)
    at org.sonar.scanner.bootstrap.SpringGlobalContainer.doAfterStart (SpringGlobalContainer.java:138)
    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:71)
    at org.sonar.batch.bootstrapper.Batch.execute (Batch.java:65)
    at org.sonarsource.scanner.api.internal.batch.BatchIsolatedLauncher.execute (BatchIsolatedLauncher.java:46)
    at jdk.internal.reflect.DirectMethodHandleAccessor.invoke (DirectMethodHandleAccessor.java:103)
    at java.lang.reflect.Method.invoke (Method.java:580)
    at org.sonarsource.scanner.api.internal.IsolatedLauncherProxy.invoke (IsolatedLauncherProxy.java:60)
    at jdk.proxy3.$Proxy27.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.maven.bootstrap.ScannerBootstrapper.execute (ScannerBootstrapper.java:88)
    at org.sonarsource.scanner.maven.SonarQubeMojo.execute (SonarQubeMojo.java:106)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:126)
    at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute2 (MojoExecutor.java:328)
    at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute (MojoExecutor.java:316)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:212)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:174)
    at org.apache.maven.lifecycle.internal.MojoExecutor.access$000 (MojoExecutor.java:75)
    at org.apache.maven.lifecycle.internal.MojoExecutor$1.run (MojoExecutor.java:162)
    at org.apache.maven.plugin.DefaultMojosExecutionStrategy.execute (DefaultMojosExecutionStrategy.java:39)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:159)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:105)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:73)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:53)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:118)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:261)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:173)
    at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:101)
    at org.apache.maven.cli.MavenCli.execute (MavenCli.java:906)
    at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:283)
    at org.apache.maven.cli.MavenCli.main (MavenCli.java:206)
    at jdk.internal.reflect.DirectMethodHandleAccessor.invoke (DirectMethodHandleAccessor.java:103)
    at java.lang.reflect.Method.invoke (Method.java:580)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:283)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:226)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:407)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:348)
Caused by: java.lang.ClassNotFoundException: org.sonar.plugins.java.api.CheckRegistrar
    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)
    at java.lang.ClassLoader.defineClass1 (Native Method)
    at java.lang.ClassLoader.defineClass (ClassLoader.java:1027)
    at java.security.SecureClassLoader.defineClass (SecureClassLoader.java:150)
    at java.net.URLClassLoader.defineClass (URLClassLoader.java:524)
    at java.net.URLClassLoader$1.run (URLClassLoader.java:427)
    at java.net.URLClassLoader$1.run (URLClassLoader.java:421)
    at java.security.AccessController.doPrivileged (AccessController.java:714)
    at java.net.URLClassLoader.findClass (URLClassLoader.java:420)
    at org.sonar.classloader.ClassRealm.loadClassFromSelf (ClassRealm.java:135)
    at org.sonar.classloader.ParentFirstStrategy.loadClass (ParentFirstStrategy.java:37)
    at org.sonar.classloader.ClassRealm.loadClass (ClassRealm.java:97)
    at org.sonar.classloader.ClassRealm.loadClass (ClassRealm.java:86)
    at com.qualinsight.plugins.sonarqube.smell.plugin.SmellPlugin.define (SmellPlugin.java:59)
    at org.sonar.scanner.bootstrap.ExtensionInstaller.installExtensionsForPlugins (ExtensionInstaller.java:64)
    at org.sonar.scanner.bootstrap.ExtensionInstaller.install (ExtensionInstaller.java:51)
    at org.sonar.scanner.bootstrap.SpringScannerContainer.addScannerExtensions (SpringScannerContainer.java:175)
    at org.sonar.scanner.bootstrap.SpringScannerContainer.doBeforeStart (SpringScannerContainer.java:155)
    at org.sonar.core.platform.SpringComponentContainer.startComponents (SpringComponentContainer.java:224)
    at org.sonar.core.platform.SpringComponentContainer.execute (SpringComponentContainer.java:205)
    at org.sonar.scanner.bootstrap.SpringGlobalContainer.doAfterStart (SpringGlobalContainer.java:138)
    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:71)
    at org.sonar.batch.bootstrapper.Batch.execute (Batch.java:65)
    at org.sonarsource.scanner.api.internal.batch.BatchIsolatedLauncher.execute (BatchIsolatedLauncher.java:46)
    at jdk.internal.reflect.DirectMethodHandleAccessor.invoke (DirectMethodHandleAccessor.java:103)
    at java.lang.reflect.Method.invoke (Method.java:580)
    at org.sonarsource.scanner.api.internal.IsolatedLauncherProxy.invoke (IsolatedLauncherProxy.java:60)
    at jdk.proxy3.$Proxy27.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.maven.bootstrap.ScannerBootstrapper.execute (ScannerBootstrapper.java:88)
    at org.sonarsource.scanner.maven.SonarQubeMojo.execute (SonarQubeMojo.java:106)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:126)
    at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute2 (MojoExecutor.java:328)
    at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute (MojoExecutor.java:316)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:212)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:174)
    at org.apache.maven.lifecycle.internal.MojoExecutor.access$000 (MojoExecutor.java:75)
    at org.apache.maven.lifecycle.internal.MojoExecutor$1.run (MojoExecutor.java:162)
    at org.apache.maven.plugin.DefaultMojosExecutionStrategy.execute (DefaultMojosExecutionStrategy.java:39)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:159)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:105)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:73)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:53)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:118)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:261)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:173)
    at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:101)
    at org.apache.maven.cli.MavenCli.execute (MavenCli.java:906)
    at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:283)
    at org.apache.maven.cli.MavenCli.main (MavenCli.java:206)
    at jdk.internal.reflect.DirectMethodHandleAccessor.invoke (DirectMethodHandleAccessor.java:103)
    at java.lang.reflect.Method.invoke (Method.java:580)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:283)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:226)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:407)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:348)
[ERROR] 
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginContainerException
[DEBUG] Shutting down adapter factory; available factories [file-lock, rwlock-local, semaphore-local, noop]; available name mappers [discriminating, file-gav, file-hgav, file-static, gav, static]
[DEBUG] Shutting down 'file-lock' factory
[DEBUG] Shutting down 'rwlock-local' factory
[DEBUG] Shutting down 'semaphore-local' factory
[DEBUG] Shutting down 'noop' factory

Hi,

Are you running any other plugins which aren’t listed as compatible with 10.5?

 
Ann

Yes had a very old plugin that apparently is not compatible with 10.5. It is no longer listed for any version on the Sonar Plugin version matrix. The Qualinsight SonarQube code smell plugin - GitHub - QualInsight/qualinsight-plugins-sonarqube-smell: Code Smells plugin for SonarQube and companion Java library. Once I remove this plugin the sonar scan is working fine now.

Something to keep note of when looking at upgrading to newer version of SonarQube.

Thanks,
Chris

I am also seeing similar error. I use SonarQube 9.9 and project uses Spring Boot 3.3.x

[ERROR] Failed to execute goal org.sonarsource.scanner.maven:sonar-maven-plugin:3.10.0.2594:sonar (default-cli) on project pres: Execution default-cli of goal org.sonarsource.scanner.maven:sonar-maven-plugin:3.10.0.2594:sonar failed: A required class was missing while executing org.sonarsource.scanner.maven:sonar-maven-plugin:3.10.0.2594:sonar: com/github/sbaudoin/sonar/plugins/ansible/settings/AnsibleSettings
[ERROR] -----------------------------------------------------
[ERROR] realm =    plugin>org.codehaus.mojo:sonar-maven-plugin:3.10.0.2594
[ERROR] strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy
[ERROR] urls[0] = file:/Users/jaddap2/.m2/repository/org/sonarsource/scanner/maven/sonar-maven-plugin/3.10.0.2594/sonar-maven-plugin-3.10.0.2594.jar
[ERROR] urls[1] = file:/Users/jaddap2/.m2/repository/org/codehaus/plexus/plexus-sec-dispatcher/2.0/plexus-sec-dispatcher-2.0.jar
[ERROR] urls[2] = file:/Users/jaddap2/.m2/repository/org/codehaus/plexus/plexus-utils/3.4.1/plexus-utils-3.4.1.jar
[ERROR] urls[3] = file:/Users/jaddap2/.m2/repository/org/codehaus/plexus/plexus-cipher/2.0/plexus-cipher-2.0.jar
[ERROR] urls[4] = file:/Users/jaddap2/.m2/repository/org/sonarsource/scanner/api/sonar-scanner-api/2.16.3.1081/sonar-scanner-api-2.16.3.1081.jar
[ERROR] urls[5] = file:/Users/jaddap2/.m2/repository/commons-lang/commons-lang/2.6/commons-lang-2.6.jar
[ERROR] Number of foreign imports: 1
[ERROR] import: Entry[import  from realm ClassRealm[maven.api, parent: null]]
[ERROR] 
[ERROR] -----------------------------------------------------
[ERROR] : com.github.sbaudoin.sonar.plugins.ansible.settings.AnsibleSettings

Hi @pavankjadda,

Welcome to the community!

As established earlier in this thread, this is about incompatible plugins. At a guess, your problem is this:

 
HTH,
Ann

Thanks. Disabled Ansible Lint plugin. It fixed that issue but the build failed with below error

[ERROR] Failed to execute goal org.sonarsource.scanner.maven:sonar-maven-plugin:4.0.0.4121:sonar (default-cli) on project pres: Unable to load component class org.sonar.scanner.scan.filesystem.ProjectFileIndexer: Error creating bean with name 'org.sonarsource.scanner.api.internal.IsolatedClassloader@2123c7bb-org.sonar.scanner.scan.filesystem.ProjectFileIndexer': Unsatisfied dependency expressed through constructor parameter 7; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'org.sonarsource.scanner.api.internal.IsolatedClassloader@2123c7bb-org.sonar.scanner.scan.filesystem.FileIndexer': Unsatisfied dependency expressed through constructor parameter 8; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.sonarsource.scanner.api.internal.IsolatedClassloader@2123c7bb-org.sonar.scanner.scan.filesystem.LanguageDetection': Bean instantiation via constructor failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.sonar.scanner.scan.filesystem.LanguageDetection]: Constructor threw exception; nested exception is java.lang.NoClassDefFoundError: org/apache/commons/lang/StringUtils: org.apache.commons.lang.StringUtils -> [Help 1]

and Jococo plugin config as follows

         <!-- Sonarqube Code Coverage with JACOCO -->
            <plugin>
                <groupId>org.jacoco</groupId>
                <artifactId>jacoco-maven-plugin</artifactId>
                <version>0.8.12</version>
                <executions>
                    <execution>
                        <id>prepare-agent</id>
                        <goals>
                            <goal>prepare-agent</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>report</id>
                        <goals>
                            <goal>report</goal>
                        </goals>
                        <configuration>
                            <formats>
                                <format>XML</format>
                            </formats>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

Hi,

A new error deserves a new thread. With all your details, including full analysis log, please.

 
Ann

Created Unable to load component class org.sonar.scanner.scan.filesystem.ProjectFileIndexer for this