Project not found for a new project

I’ve been trying to configure a Sonar project, but unfortunately the initial scan keeps failing with:
ERROR: Project not found. Please check the ‘sonar.projectKey’ and ‘sonar.organization’ properties, the ‘SONAR_TOKEN’ environment variable, or contact the project administrator

I am running it locally and I did setup SONAR_TOKEN env variable.

sonar-project.properties has the below content:
`#project name
sonar.projectKey=abc

sonar.host.url=https://sonarcloud.io

sonar.projectVersion=1.0

sonar.organization=abc

sonar.sourceEncoding=UTF-8

sonar.sources=.

sonar.projectBaseDir=.

sonar.python.version=3`

Please let me know solution for this.
Thanks.

Do you have a solution yet?
I am experiencing similar difficulties while trying to run

-Dsonar.login=**token** -Dsonar.projectKey=capricornhqdev_bis -Dsonar.branch.name=sonar-val -X```

I have also added the following in my pom.xml 

```<properties>
<java.version>11</java.version>
<sonar.organization>capricorn</sonar.organization>
<sonar.host.url>[https://sonarcloud.io](https://sonarcloud.io/)</sonar.host.url>
</properties>```

the error trace is pasted below.

```[DEBUG] 09:36:34.850 GET 200 https://sonarcloud.io/api/server/version | time=143ms
[DEBUG] 09:36:34.857 Updated analysis started with a difference of 626 milliseconds
[DEBUG] 09:36:34.874 Started at Thu Jul 14 09:36:34 WAT 2022
[INFO] 09:36:34.953 Loaded core extensions: developer-scanner
[DEBUG] 09:36:35.052 Installed core extension: com.sonarsource.branch.DeveloperScannerCoreExtension@3c291d7
[DEBUG] 09:36:36.807 Could not detect any CI vendor
[INFO] 09:36:36.834 Load project settings for component key: 'com.cdl:bis'
[DEBUG] 09:36:36.976 GET 404 https://sonarcloud.io/api/settings/values.protobuf?component=com.cdl%3Abis | time=142ms
[INFO] 09:36:36.989 Process project properties
[DEBUG] 09:36:37.010 Process project properties (done) | time=21ms
[INFO] 09:36:37.014 Execute project builders
[DEBUG] 09:36:37.017 Execute project builder: org.sonar.plugins.csharp.CSharpGlobalProtobufFileProcessor
[DEBUG] 09:36:37.021 Execute project builder: org.sonar.plugins.vbnet.VbNetGlobalProtobufFileProcessor
[INFO] 09:36:37.024 Execute project builders (done) | time=10ms
[INFO] 09:36:37.029 Project key: com.cdl:bis
[INFO] 09:36:37.031 Base dir: C:\Users\DevOps-01\Applications\bis\bis
[INFO] 09:36:37.031 Working dir: C:\Users\DevOps-01\Applications\bis\bis\target\sonar
[DEBUG] 09:36:37.032 Project global encoding: UTF-8, default locale: en_US
[DEBUG] 09:36:37.038 Creating module hierarchy
[DEBUG] 09:36:37.039 Init module 'bis'
[DEBUG] 09:36:37.043 Base dir: C:\Users\DevOps-01\Applications\bis\bis
[DEBUG] 09:36:37.045 Working dir: C:\Users\DevOps-01\Applications\bis\bis\target\sonar
[DEBUG] 09:36:37.046 Module global encoding: UTF-8, default locale: en_US
[INFO] 09:36:37.256 Load project branches
[DEBUG] 09:36:37.407 GET 404 https://sonarcloud.io/api/project_branches/list?project=com.cdl%3Abis | time=150ms
[DEBUG] 09:36:37.410 Could not process project branches - continuing without it
[INFO] 09:36:37.412 Load project branches (done) | time=156ms
[INFO] 09:36:37.423 Check ALM binding of project 'com.cdl:bis'
[DEBUG] 09:36:37.570 GET 401 https://sonarcloud.io/api/alm_integration/is_project_bound?project=com.cdl%3Abis | time=145ms
[WARNING] 09:36:37.572 Failed to check if project 'com.cdl:bis' is bound
[INFO] 09:36:37.575 Detected project binding: ERROR
[INFO] 09:36:37.577 Check ALM binding of project 'com.cdl:bis' (done) | time=153ms
[INFO] 09:36:37.580 Load project pull requests
[DEBUG] 09:36:37.727 GET 404 https://sonarcloud.io/api/project_pull_requests/list?project=com.cdl%3Abis | time=144ms
[DEBUG] 09:36:37.727 Could not process project pull requests - continuing without it
[INFO] 09:36:37.731 Load project pull requests (done) | time=151ms
[INFO] 09:36:37.735 Load branch configuration
[INFO] 09:36:37.741 Load branch configuration (done) | time=5ms
[DEBUG] 09:36:37.808 Available languages:
[DEBUG] 09:36:37.825 * Terraform => "terraform"
[DEBUG] 09:36:37.825 * CloudFormation => "cloudformation"
[DEBUG] 09:36:37.826 * PL/SQL => "plsql"
[DEBUG] 09:36:37.827 * Scala => "scala"
[DEBUG] 09:36:37.829 * C# => "cs"
[DEBUG] 09:36:37.831 * Java => "java"
[DEBUG] 09:36:37.833 * HTML => "web"
[DEBUG] 09:36:37.834 * JSP => "jsp"
[DEBUG] 09:36:37.835 * Flex => "flex"
[DEBUG] 09:36:37.835 * XML => "xml"
[DEBUG] 09:36:37.836 * Text => "text"
[DEBUG] 09:36:37.836 * [VB.NET](http://vb.net/) => "vbnet"
[DEBUG] 09:36:37.837 * Swift => "swift"
[DEBUG] 09:36:37.838 * C => "c"
[DEBUG] 09:36:37.838 * C++ => "cpp"
[DEBUG] 09:36:37.839 * Objective-C => "objc"
[DEBUG] 09:36:37.840 * Python => "py"
[DEBUG] 09:36:37.841 * Go => "go"
[DEBUG] 09:36:37.842 * Kotlin => "kotlin"
[DEBUG] 09:36:37.843 * T-SQL => "tsql"
[DEBUG] 09:36:37.844 * Apex => "apex"
[DEBUG] 09:36:37.844 * JavaScript => "js"
[DEBUG] 09:36:37.845 * TypeScript => "ts"
[DEBUG] 09:36:37.845 * CSS => "css"
[DEBUG] 09:36:37.846 * Ruby => "ruby"
[DEBUG] 09:36:37.846 * COBOL => "cobol"
[DEBUG] 09:36:37.847 * PHP => "php"
[DEBUG] 09:36:37.847 * ABAP => "abap"
[DEBUG] 09:36:37.848 * YAML => "yaml"
[DEBUG] 09:36:37.848 * JSON => "json"
[INFO] 09:36:37.859 Load quality profiles
[DEBUG] 09:36:38.005 GET 403 https://sonarcloud.io/api/qualityprofiles/search.protobuf?projectKey=com.cdl%3Abis&organization=capricorn | time=144ms
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Skipping bis
[INFO] This project has been banned from the build due to previous failures.
[INFO] ------------------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 01:18 min
[INFO] Finished at: 2022-07-14T09:36:38+01:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.sonarsource.scanner.maven:sonar-maven-plugin:3.9.1.2184:sonar (default-cli) on project bis: Unable to load component class org.sonar.scanner.report.MetadataPublisher: Unable to load component class org.sonar.scanner.rule.QualityProfiles: Project not found. Please check the 'sonar.projectKey' and 'sonar.organization' properties, the 'SONAR_TOKEN' environment variable, or contact the project administrator -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.sonarsource.scanner.maven:sonar-maven-plugin:3.9.1.2184:sonar (default-cli) on project bis: Unable to load component class org.sonar.scanner.report.MetadataPublisher
at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute2 (MojoExecutor.java:375)
at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute (MojoExecutor.java:351)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:215)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:171)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:163)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:294)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
at org.apache.maven.cli.MavenCli.execute (MavenCli.java:960)
at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:293)
at org.apache.maven.cli.MavenCli.main (MavenCli.java:196)
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke (Method.java:566)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
Caused by: org.apache.maven.plugin.MojoExecutionException: Unable to load component class org.sonar.scanner.report.MetadataPublisher
at org.sonarsource.scanner.maven.bootstrap.ScannerBootstrapper.execute (ScannerBootstrapper.java:67)
at org.sonarsource.scanner.maven.SonarQubeMojo.execute (SonarQubeMojo.java:108)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)
at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute2 (MojoExecutor.java:370)
at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute (MojoExecutor.java:351)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:215)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:171)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:163)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:294)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
at org.apache.maven.cli.MavenCli.execute (MavenCli.java:960)
at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:293)
at org.apache.maven.cli.MavenCli.main (MavenCli.java:196)
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke (Method.java:566)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
Caused by: java.lang.IllegalStateException: Unable to load component class org.sonar.scanner.report.MetadataPublisher
at org.sonar.core.platform.ComponentContainer$ExtendedDefaultPicoContainer.getComponent (ComponentContainer.java:52)
at org.picocontainer.DefaultPicoContainer.getComponent (DefaultPicoContainer.java:621)
at org.picocontainer.parameters.CollectionComponentParameter.getArrayInstance (CollectionComponentParameter.java:334)
at org.picocontainer.parameters.CollectionComponentParameter.access$100 (CollectionComponentParameter.java:49)
at org.picocontainer.parameters.CollectionComponentParameter$1.resolveInstance (CollectionComponentParameter.java:139)
at org.picocontainer.parameters.ComponentParameter$1.resolveInstance (ComponentParameter.java:141)
at org.picocontainer.injectors.SingleMemberInjector.getParameter (SingleMemberInjector.java:78)
at org.picocontainer.injectors.ConstructorInjector$CtorAndAdapters.getParameterArguments (ConstructorInjector.java:309)
at org.picocontainer.injectors.ConstructorInjector$1.run (ConstructorInjector.java:335)
at org.picocontainer.injectors.AbstractInjector$ThreadLocalCyclicDependencyGuard.observe (AbstractInjector.java:270)
at org.picocontainer.injectors.ConstructorInjector.getComponentInstance (ConstructorInjector.java:364)
at org.picocontainer.injectors.AbstractInjectionFactory$LifecycleAdapter.getComponentInstance (AbstractInjectionFactory.java:56)
at org.picocontainer.behaviors.AbstractBehavior.getComponentInstance (AbstractBehavior.java:64)
at org.picocontainer.behaviors.Stored.getComponentInstance (Stored.java:91)
at org.picocontainer.DefaultPicoContainer.instantiateComponentAsIsStartable (DefaultPicoContainer.java:1034)
at org.picocontainer.DefaultPicoContainer.addAdapterIfStartable (DefaultPicoContainer.java:1026)
at org.picocontainer.DefaultPicoContainer.startAdapters (DefaultPicoContainer.java:1003)
at org.picocontainer.DefaultPicoContainer.start (DefaultPicoContainer.java:767)
at org.sonar.core.platform.ComponentContainer.startComponents (ComponentContainer.java:122)
at org.sonar.core.platform.ComponentContainer.execute (ComponentContainer.java:109)
at org.sonar.scanner.bootstrap.GlobalContainer.doAfterStart (GlobalContainer.java:128)
at org.sonar.core.platform.ComponentContainer.startComponents (ComponentContainer.java:123)
at org.sonar.core.platform.ComponentContainer.execute (ComponentContainer.java:109)
at org.sonar.batch.bootstrapper.Batch.doExecute (Batch.java:58)
at org.sonar.batch.bootstrapper.Batch.execute (Batch.java:52)
at org.sonarsource.scanner.api.internal.batch.BatchIsolatedLauncher.execute (BatchIsolatedLauncher.java:46)
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke (Method.java:566)
at org.sonarsource.scanner.api.internal.IsolatedLauncherProxy.invoke (IsolatedLauncherProxy.java:60)
at com.sun.proxy.$Proxy41.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:65)
at org.sonarsource.scanner.maven.SonarQubeMojo.execute (SonarQubeMojo.java:108)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)
at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute2 (MojoExecutor.java:370)
at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute (MojoExecutor.java:351)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:215)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:171)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:163)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:294)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
at org.apache.maven.cli.MavenCli.execute (MavenCli.java:960)
at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:293)
at org.apache.maven.cli.MavenCli.main (MavenCli.java:196)
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke (Method.java:566)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
Caused by: java.lang.IllegalStateException: Unable to load component class org.sonar.scanner.rule.QualityProfiles
at org.sonar.core.platform.ComponentContainer$ExtendedDefaultPicoContainer.getComponent (ComponentContainer.java:52)
at org.picocontainer.DefaultPicoContainer.getComponent (DefaultPicoContainer.java:632)
at org.picocontainer.parameters.BasicComponentParameter$1.resolveInstance (BasicComponentParameter.java:118)
at org.picocontainer.parameters.ComponentParameter$1.resolveInstance (ComponentParameter.java:136)
at org.picocontainer.injectors.SingleMemberInjector.getParameter (SingleMemberInjector.java:78)
at org.picocontainer.injectors.ConstructorInjector$CtorAndAdapters.getParameterArguments (ConstructorInjector.java:309)
at org.picocontainer.injectors.ConstructorInjector$1.run (ConstructorInjector.java:335)
at org.picocontainer.injectors.AbstractInjector$ThreadLocalCyclicDependencyGuard.observe (AbstractInjector.java:270)
at org.picocontainer.injectors.ConstructorInjector.getComponentInstance (ConstructorInjector.java:364)
at org.picocontainer.injectors.AbstractInjectionFactory$LifecycleAdapter.getComponentInstance (AbstractInjectionFactory.java:56)
at org.picocontainer.behaviors.AbstractBehavior.getComponentInstance (AbstractBehavior.java:64)
at org.picocontainer.behaviors.Stored.getComponentInstance (Stored.java:91)
at org.picocontainer.DefaultPicoContainer.getInstance (DefaultPicoContainer.java:699)
at org.picocontainer.DefaultPicoContainer.getComponent (DefaultPicoContainer.java:647)
at org.sonar.core.platform.ComponentContainer$ExtendedDefaultPicoContainer.getComponent (ComponentContainer.java:50)
at org.picocontainer.DefaultPicoContainer.getComponent (DefaultPicoContainer.java:621)
at org.picocontainer.parameters.CollectionComponentParameter.getArrayInstance (CollectionComponentParameter.java:334)
at org.picocontainer.parameters.CollectionComponentParameter.access$100 (CollectionComponentParameter.java:49)
at org.picocontainer.parameters.CollectionComponentParameter$1.resolveInstance (CollectionComponentParameter.java:139)
at org.picocontainer.parameters.ComponentParameter$1.resolveInstance (ComponentParameter.java:141)
at org.picocontainer.injectors.SingleMemberInjector.getParameter (SingleMemberInjector.java:78)
at org.picocontainer.injectors.ConstructorInjector$CtorAndAdapters.getParameterArguments (ConstructorInjector.java:309)
at org.picocontainer.injectors.ConstructorInjector$1.run (ConstructorInjector.java:335)
at org.picocontainer.injectors.AbstractInjector$ThreadLocalCyclicDependencyGuard.observe (AbstractInjector.java:270)
at org.picocontainer.injectors.ConstructorInjector.getComponentInstance (ConstructorInjector.java:364)
at org.picocontainer.injectors.AbstractInjectionFactory$LifecycleAdapter.getComponentInstance (AbstractInjectionFactory.java:56)
at org.picocontainer.behaviors.AbstractBehavior.getComponentInstance (AbstractBehavior.java:64)
at org.picocontainer.behaviors.Stored.getComponentInstance (Stored.java:91)
at org.picocontainer.DefaultPicoContainer.instantiateComponentAsIsStartable (DefaultPicoContainer.java:1034)
at org.picocontainer.DefaultPicoContainer.addAdapterIfStartable (DefaultPicoContainer.java:1026)
at org.picocontainer.DefaultPicoContainer.startAdapters (DefaultPicoContainer.java:1003)
at org.picocontainer.DefaultPicoContainer.start (DefaultPicoContainer.java:767)
at org.sonar.core.platform.ComponentContainer.startComponents (ComponentContainer.java:122)
at org.sonar.core.platform.ComponentContainer.execute (ComponentContainer.java:109)
at org.sonar.scanner.bootstrap.GlobalContainer.doAfterStart (GlobalContainer.java:128)
at org.sonar.core.platform.ComponentContainer.startComponents (ComponentContainer.java:123)
at org.sonar.core.platform.ComponentContainer.execute (ComponentContainer.java:109)
at org.sonar.batch.bootstrapper.Batch.doExecute (Batch.java:58)
at org.sonar.batch.bootstrapper.Batch.execute (Batch.java:52)
at org.sonarsource.scanner.api.internal.batch.BatchIsolatedLauncher.execute (BatchIsolatedLauncher.java:46)
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke (Method.java:566)
at org.sonarsource.scanner.api.internal.IsolatedLauncherProxy.invoke (IsolatedLauncherProxy.java:60)
at com.sun.proxy.$Proxy41.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:65)
at org.sonarsource.scanner.maven.SonarQubeMojo.execute (SonarQubeMojo.java:108)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)
at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute2 (MojoExecutor.java:370)
at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute (MojoExecutor.java:351)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:215)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:171)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:163)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:294)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
at org.apache.maven.cli.MavenCli.execute (MavenCli.java:960)
at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:293)
at org.apache.maven.cli.MavenCli.main (MavenCli.java:196)
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke (Method.java:566)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
Caused by: org.sonar.api.utils.MessageException: Project not found. Please check the 'sonar.projectKey' and 'sonar.organization' properties, the 'SONAR_TOKEN' environment variable, or contact the project administrator
[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/MojoExecutionException[DEBUG] 09:36:34.850 GET 200 https://sonarcloud.io/api/server/version | time=143ms
[DEBUG] 09:36:34.857 Updated analysis started with a difference of 626 milliseconds
[DEBUG] 09:36:34.874 Started at Thu Jul 14 09:36:34 WAT 2022
[INFO] 09:36:34.953 Loaded core extensions: developer-scanner
[DEBUG] 09:36:35.052 Installed core extension: com.sonarsource.branch.DeveloperScannerCoreExtension@3c291d7
[DEBUG] 09:36:36.807 Could not detect any CI vendor
[INFO] 09:36:36.834 Load project settings for component key: 'com.cdl:bis'
[DEBUG] 09:36:36.976 GET 404 https://sonarcloud.io/api/settings/values.protobuf?component=com.cdl%3Abis | time=142ms
[INFO] 09:36:36.989 Process project properties
[DEBUG] 09:36:37.010 Process project properties (done) | time=21ms
[INFO] 09:36:37.014 Execute project builders
[DEBUG] 09:36:37.017 Execute project builder: org.sonar.plugins.csharp.CSharpGlobalProtobufFileProcessor
[DEBUG] 09:36:37.021 Execute project builder: org.sonar.plugins.vbnet.VbNetGlobalProtobufFileProcessor
[INFO] 09:36:37.024 Execute project builders (done) | time=10ms
[INFO] 09:36:37.029 Project key: com.cdl:bis
[INFO] 09:36:37.031 Base dir: C:\Users\DevOps-01\Applications\bis\bis
[INFO] 09:36:37.031 Working dir: C:\Users\DevOps-01\Applications\bis\bis\target\sonar
[DEBUG] 09:36:37.032 Project global encoding: UTF-8, default locale: en_US
[DEBUG] 09:36:37.038 Creating module hierarchy
[DEBUG] 09:36:37.039 Init module 'bis'
[DEBUG] 09:36:37.043 Base dir: C:\Users\DevOps-01\Applications\bis\bis
[DEBUG] 09:36:37.045 Working dir: C:\Users\DevOps-01\Applications\bis\bis\target\sonar
[DEBUG] 09:36:37.046 Module global encoding: UTF-8, default locale: en_US
[INFO] 09:36:37.256 Load project branches
[DEBUG] 09:36:37.407 GET 404 https://sonarcloud.io/api/project_branches/list?project=com.cdl%3Abis | time=150ms
[DEBUG] 09:36:37.410 Could not process project branches - continuing without it
[INFO] 09:36:37.412 Load project branches (done) | time=156ms
[INFO] 09:36:37.423 Check ALM binding of project 'com.cdl:bis'
[DEBUG] 09:36:37.570 GET 401 https://sonarcloud.io/api/alm_integration/is_project_bound?project=com.cdl%3Abis | time=145ms
[WARNING] 09:36:37.572 Failed to check if project 'com.cdl:bis' is bound
[INFO] 09:36:37.575 Detected project binding: ERROR
[INFO] 09:36:37.577 Check ALM binding of project 'com.cdl:bis' (done) | time=153ms
[INFO] 09:36:37.580 Load project pull requests
[DEBUG] 09:36:37.727 GET 404 https://sonarcloud.io/api/project_pull_requests/list?project=com.cdl%3Abis | time=144ms
[DEBUG] 09:36:37.727 Could not process project pull requests - continuing without it
[INFO] 09:36:37.731 Load project pull requests (done) | time=151ms
[INFO] 09:36:37.735 Load branch configuration
[INFO] 09:36:37.741 Load branch configuration (done) | time=5ms
[INFO] 09:36:37.859 Load quality profiles
[DEBUG] 09:36:38.005 GET 403 https://sonarcloud.io/api/qualityprofiles/search.protobuf?projectKey=com.cdl%3Abis&organization=capricorn | time=144ms
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Skipping bis
[INFO] This project has been banned from the build due to previous failures.
[INFO] ------------------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 01:18 min
[INFO] Finished at: 2022-07-14T09:36:38+01:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.sonarsource.scanner.maven:sonar-maven-plugin:3.9.1.2184:sonar (default-cli) on project bis: Unable to load component class org.sonar.scanner.report.MetadataPublisher: Unable to load component class org.sonar.scanner.rule.QualityProfiles: Project not found. Please check the 'sonar.projectKey' and 'sonar.organization' properties, the 'SONAR_TOKEN' environment variable, or contact the project administrator -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.sonarsource.scanner.maven:sonar-maven-plugin:3.9.1.2184:sonar (default-cli) on project bis: Unable to load component class org.sonar.scanner.report.MetadataPublisher
at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute2 (MojoExecutor.java:375)
at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute (MojoExecutor.java:351)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:215)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:171)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:163)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
Caused by: org.apache.maven.plugin.MojoExecutionException: Unable to load component class org.sonar.scanner.report.MetadataPublisher
at org.sonarsource.scanner.maven.bootstrap.ScannerBootstrapper.execute (ScannerBootstrapper.java:67)
Caused by: org.sonar.api.utils.MessageException: Project not found. Please check the 'sonar.projectKey' and 'sonar.organization' properties, the 'SONAR_TOKEN' environment variable, or contact the project administrator
[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/MojoExecutionException```

Can someone help me out please

Hi,

Welcome to the community, both of you!

@capricorndigi your logs show a 401 error, which is a permissions problem. You should double check that your token is available to analysis and is issued by a user with ‘Execute Analysis’ permission on the project.

@Umang.Brahmbhatt can you provide your analysis logs?

 
HTH,
Ann

1 Like

True.
Solved this by passing SONAR_TOKEN as an environment variable

1 Like