Uploaded image for project: 'SonarQube'
  1. SonarQube
  2. SONAR-10464

Improve error message when passing a wrong organization during the analysis

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 7.2
    • Component/s: Scanner
    • Labels:
      None

      Description

      Here is the message when trying to analyze a project with a non existing organization:

      2018-02-26T16:37:38.6246453Z INFO: Load quality profiles
      2018-02-26T16:37:38.7307917Z INFO: ------------------------------------------------------------------------
      2018-02-26T16:37:38.7334944Z INFO: EXECUTION FAILURE
      2018-02-26T16:37:38.7335884Z INFO: ------------------------------------------------------------------------
      2018-02-26T16:37:38.7336234Z INFO: Total time: 42.138s
      2018-02-26T16:37:38.8302878Z INFO: Final Memory: 47M/118M
      2018-02-26T16:37:38.8303353Z INFO: ------------------------------------------------------------------------
      2018-02-26T16:37:38.8303866Z ERROR: Error during SonarQube Scanner execution
      2018-02-26T16:37:38.8835642Z java.lang.IllegalStateException: Unable to load component class org.sonar.scanner.report.MetadataPublisher
      2018-02-26T16:37:38.8839713Z 	at org.sonar.core.platform.ComponentContainer$ExtendedDefaultPicoContainer.getComponent(ComponentContainer.java:64)
      2018-02-26T16:37:38.8882125Z 	at org.picocontainer.DefaultPicoContainer.getComponent(DefaultPicoContainer.java:621)
      2018-02-26T16:37:38.8883889Z 	at org.picocontainer.parameters.CollectionComponentParameter.getArrayInstance(CollectionComponentParameter.java:334)
      2018-02-26T16:37:38.8884824Z 	at org.picocontainer.parameters.CollectionComponentParameter.access$100(CollectionComponentParameter.java:49)
      2018-02-26T16:37:38.8885274Z 	at org.picocontainer.parameters.CollectionComponentParameter$1.resolveInstance(CollectionComponentParameter.java:139)
      2018-02-26T16:37:38.8885616Z 	at org.picocontainer.parameters.ComponentParameter$1.resolveInstance(ComponentParameter.java:141)
      2018-02-26T16:37:38.8885931Z 	at org.picocontainer.injectors.SingleMemberInjector.getParameter(SingleMemberInjector.java:78)
      2018-02-26T16:37:38.8886275Z 	at org.picocontainer.injectors.ConstructorInjector$CtorAndAdapters.getParameterArguments(ConstructorInjector.java:309)
      2018-02-26T16:37:38.8886620Z 	at org.picocontainer.injectors.ConstructorInjector$1.run(ConstructorInjector.java:335)
      2018-02-26T16:37:38.8886941Z 	at org.picocontainer.injectors.AbstractInjector$ThreadLocalCyclicDependencyGuard.observe(AbstractInjector.java:270)
      2018-02-26T16:37:38.8887291Z 	at org.picocontainer.injectors.ConstructorInjector.getComponentInstance(ConstructorInjector.java:364)
      2018-02-26T16:37:38.8887625Z 	at org.picocontainer.injectors.AbstractInjectionFactory$LifecycleAdapter.getComponentInstance(AbstractInjectionFactory.java:56)
      2018-02-26T16:37:38.8887970Z 	at org.picocontainer.behaviors.AbstractBehavior.getComponentInstance(AbstractBehavior.java:64)
      2018-02-26T16:37:38.8891633Z 	at org.picocontainer.behaviors.Stored.getComponentInstance(Stored.java:91)
      2018-02-26T16:37:38.8892157Z 	at org.picocontainer.DefaultPicoContainer.instantiateComponentAsIsStartable(DefaultPicoContainer.java:1034)
      2018-02-26T16:37:38.8892566Z 	at org.picocontainer.DefaultPicoContainer.addAdapterIfStartable(DefaultPicoContainer.java:1026)
      2018-02-26T16:37:38.8892913Z 	at org.picocontainer.DefaultPicoContainer.startAdapters(DefaultPicoContainer.java:1003)
      2018-02-26T16:37:38.8893287Z 	at org.picocontainer.DefaultPicoContainer.start(DefaultPicoContainer.java:767)
      2018-02-26T16:37:38.8893727Z 	at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:134)
      2018-02-26T16:37:38.8894073Z 	at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:121)
      2018-02-26T16:37:38.8894515Z 	at org.sonar.scanner.task.ScanTask.execute(ScanTask.java:48)
      2018-02-26T16:37:38.8894901Z 	at org.sonar.scanner.task.TaskContainer.doAfterStart(TaskContainer.java:84)
      2018-02-26T16:37:38.8895206Z 	at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:135)
      2018-02-26T16:37:38.8895502Z 	at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:121)
      2018-02-26T16:37:38.8895940Z 	at org.sonar.scanner.bootstrap.GlobalContainer.executeTask(GlobalContainer.java:121)
      2018-02-26T16:37:38.8896227Z 	at org.sonar.batch.bootstrapper.Batch.doExecuteTask(Batch.java:116)
      2018-02-26T16:37:38.8896510Z 	at org.sonar.batch.bootstrapper.Batch.executeTask(Batch.java:111)
      2018-02-26T16:37:38.8896816Z 	at org.sonarsource.scanner.api.internal.batch.BatchIsolatedLauncher.execute(BatchIsolatedLauncher.java:63)
      2018-02-26T16:37:38.8897123Z 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2018-02-26T16:37:38.8897950Z 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      2018-02-26T16:37:38.8898619Z 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      2018-02-26T16:37:38.8898956Z 	at java.lang.reflect.Method.invoke(Method.java:498)
      2018-02-26T16:37:38.8899271Z 	at org.sonarsource.scanner.api.internal.IsolatedLauncherProxy.invoke(IsolatedLauncherProxy.java:60)
      2018-02-26T16:37:38.8899594Z 	at com.sun.proxy.$Proxy0.execute(Unknown Source)
      2018-02-26T16:37:38.8899908Z 	at org.sonarsource.scanner.api.EmbeddedScanner.doExecute(EmbeddedScanner.java:233)
      2018-02-26T16:37:38.8900243Z 	at org.sonarsource.scanner.api.EmbeddedScanner.runAnalysis(EmbeddedScanner.java:151)
      2018-02-26T16:37:38.8901733Z 	at org.sonarsource.scanner.cli.Main.runAnalysis(Main.java:123)
      2018-02-26T16:37:38.8902050Z 	at org.sonarsource.scanner.cli.Main.execute(Main.java:77)
      2018-02-26T16:37:38.8902370Z 	at org.sonarsource.scanner.cli.Main.main(Main.java:61)
      2018-02-26T16:37:38.8902849Z Caused by: java.lang.IllegalStateException: Unable to load component class org.sonar.scanner.rule.ModuleQProfiles
      2018-02-26T16:37:38.8903536Z 	at org.sonar.core.platform.ComponentContainer$ExtendedDefaultPicoContainer.getComponent(ComponentContainer.java:64)
      2018-02-26T16:37:38.8903910Z 	at org.picocontainer.DefaultPicoContainer.getComponent(DefaultPicoContainer.java:632)
      2018-02-26T16:37:38.8905813Z 	at org.picocontainer.parameters.BasicComponentParameter$1.resolveInstance(BasicComponentParameter.java:118)
      2018-02-26T16:37:38.8906338Z 	at org.picocontainer.parameters.ComponentParameter$1.resolveInstance(ComponentParameter.java:136)
      2018-02-26T16:37:38.8906898Z 	at org.picocontainer.injectors.SingleMemberInjector.getParameter(SingleMemberInjector.java:78)
      2018-02-26T16:37:38.8907248Z 	at org.picocontainer.injectors.ConstructorInjector$CtorAndAdapters.getParameterArguments(ConstructorInjector.java:309)
      2018-02-26T16:37:38.8907570Z 	at org.picocontainer.injectors.ConstructorInjector$1.run(ConstructorInjector.java:335)
      2018-02-26T16:37:38.8907917Z 	at org.picocontainer.injectors.AbstractInjector$ThreadLocalCyclicDependencyGuard.observe(AbstractInjector.java:270)
      2018-02-26T16:37:38.8908401Z 	at org.picocontainer.injectors.ConstructorInjector.getComponentInstance(ConstructorInjector.java:364)
      2018-02-26T16:37:38.8908979Z 	at org.picocontainer.injectors.AbstractInjectionFactory$LifecycleAdapter.getComponentInstance(AbstractInjectionFactory.java:56)
      2018-02-26T16:37:38.8911365Z 	at org.picocontainer.behaviors.AbstractBehavior.getComponentInstance(AbstractBehavior.java:64)
      2018-02-26T16:37:38.8911876Z 	at org.picocontainer.behaviors.Stored.getComponentInstance(Stored.java:91)
      2018-02-26T16:37:38.8912312Z 	at org.picocontainer.DefaultPicoContainer.getInstance(DefaultPicoContainer.java:699)
      2018-02-26T16:37:38.8912663Z 	at org.picocontainer.DefaultPicoContainer.getComponent(DefaultPicoContainer.java:647)
      2018-02-26T16:37:38.8915813Z 	at org.sonar.core.platform.ComponentContainer$ExtendedDefaultPicoContainer.getComponent(ComponentContainer.java:62)
      2018-02-26T16:37:38.8916366Z 	... 38 more
      2018-02-26T16:37:38.8925290Z Caused by: org.sonarqube.ws.client.HttpException: Error 404 on https://rebloch.sonarsource.com/api/qualityprofiles/search.protobuf?projectKey=vsts-test-sample-js-project&organization=Fab : {"errors":[{"msg":"No organization with key 'Fab'"}]}
      2018-02-26T16:37:38.8964327Z 	at org.sonarqube.ws.client.BaseResponse.failIfNotSuccessful(BaseResponse.java:36)
      2018-02-26T16:37:38.8964961Z 	at org.sonar.scanner.bootstrap.ScannerWsClient.failIfUnauthorized(ScannerWsClient.java:106)
      2018-02-26T16:37:38.8965343Z 	at org.sonar.scanner.bootstrap.ScannerWsClient.call(ScannerWsClient.java:75)
      2018-02-26T16:37:38.8965718Z 	at org.sonar.scanner.repository.DefaultQualityProfileLoader.call(DefaultQualityProfileLoader.java:90)
      2018-02-26T16:37:38.8966116Z 	at org.sonar.scanner.repository.DefaultQualityProfileLoader.loadAndOverrideIfNeeded(DefaultQualityProfileLoader.java:69)
      2018-02-26T16:37:38.8966594Z 	at org.sonar.scanner.repository.DefaultQualityProfileLoader.load(DefaultQualityProfileLoader.java:64)
      2018-02-26T16:37:38.8966961Z 	at org.sonar.scanner.repository.QualityProfileProvider.provide(QualityProfileProvider.java:45)
      2018-02-26T16:37:38.8967405Z 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2018-02-26T16:37:38.8967756Z 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      2018-02-26T16:37:38.8968495Z 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      2018-02-26T16:37:38.8968866Z 	at java.lang.reflect.Method.invoke(Method.java:498)
      2018-02-26T16:37:38.8969210Z 	at org.picocontainer.injectors.MethodInjector.invokeMethod(MethodInjector.java:129)
      2018-02-26T16:37:38.8969666Z 	at org.picocontainer.injectors.MethodInjector.access$000(MethodInjector.java:39)
      2018-02-26T16:37:38.8970025Z 	at org.picocontainer.injectors.MethodInjector$2.run(MethodInjector.java:113)
      2018-02-26T16:37:38.8970812Z 	at org.picocontainer.injectors.AbstractInjector$ThreadLocalCyclicDependencyGuard.observe(AbstractInjector.java:270)
      2018-02-26T16:37:38.8971261Z 	at org.picocontainer.injectors.MethodInjector.decorateComponentInstance(MethodInjector.java:120)
      2018-02-26T16:37:38.8971645Z 	at org.picocontainer.injectors.CompositeInjector.decorateComponentInstance(CompositeInjector.java:58)
      2018-02-26T16:37:38.8971993Z 	at org.picocontainer.injectors.Reinjector.reinject(Reinjector.java:142)
      2018-02-26T16:37:38.8972365Z 	at org.picocontainer.injectors.ProviderAdapter.getComponentInstance(ProviderAdapter.java:96)
      2018-02-26T16:37:38.8972717Z 	at org.picocontainer.DefaultPicoContainer.getInstance(DefaultPicoContainer.java:699)
      2018-02-26T16:37:38.8973090Z 	at org.picocontainer.DefaultPicoContainer.getComponent(DefaultPicoContainer.java:647)
      2018-02-26T16:37:38.8973457Z 	at org.sonar.core.platform.ComponentContainer$ExtendedDefaultPicoContainer.getComponent(ComponentContainer.java:62)
      2018-02-26T16:37:38.8973787Z 	... 52 more
      2018-02-26T16:37:38.8974034Z ERROR: 
      2018-02-26T16:37:38.8974346Z ERROR: Re-run SonarQube Scanner using the -X switch to enable full debug logging.
      

        Attachments

          Activity

            People

            • Assignee:
              duarte.meneses Duarte Meneses
              Reporter:
              julien.henry Julien Henry
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Due:
                Created:
                Updated:
                Resolved: