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

Log offending component when there is an error at startup

    XMLWordPrintable

    Details

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

      Description

      This is a backport of an improvement that was done in SQ 5.0. When loading a plugin if an error is raised we should log the class of the problematic component. Without this change it is very hard to know what is the offending plugin.

      For example here is a stack without this change:

      *ERROR: Error during Sonar runner execution
      org.sonar.runner.impl.RunnerException: Unable to execute Sonar
              at
      org.sonar.runner.impl.BatchLauncher$1.delegateExecution(BatchLauncher.java:91)
              at org.sonar.runner.impl.BatchLauncher$1.run(BatchLauncher.java:75)
              at java.security.AccessController.doPrivileged(Native Method)
              at org.sonar.runner.impl.BatchLauncher.doExecute(BatchLauncher.java:69)
              at org.sonar.runner.impl.BatchLauncher.execute(BatchLauncher.java:50)
              at org.sonar.runner.api.EmbeddedRunner.doExecute(EmbeddedRunner.java:102)
              at org.sonar.runner.api.Runner.execute(Runner.java:100)
              at org.sonar.runner.Main.executeTask(Main.java:70)
              at org.sonar.runner.Main.execute(Main.java:59)
              at org.sonar.runner.Main.main(Main.java:53)
      Caused by: java.lang.NoClassDefFoundError:
      org/sonar/api/utils/KeyValueFormat$Transformer
              at java.lang.Class.getDeclaredFields0(Native Method)
              at java.lang.Class.privateGetDeclaredFields(Class.java:2387)
              at java.lang.Class.getDeclaredFields(Class.java:1796)
              at
      org.picocontainer.injectors.AdaptingInjection$2.run(AdaptingInjection.java:217)
              at java.security.AccessController.doPrivileged(Native Method)
              at
      org.picocontainer.injectors.AdaptingInjection.injectionFieldAnnotated(AdaptingInjection.java:209)
              at
      org.picocontainer.injectors.AdaptingInjection.fieldAnnotatedInjectionAdapter(AdaptingInjection.java:188)
              at
      org.picocontainer.injectors.AdaptingInjection.createComponentAdapter(AdaptingInjection.java:57)
              at
      org.picocontainer.behaviors.AbstractBehaviorFactory.createComponentAdapter(AbstractBehaviorFactory.java:44)
              at
      org.picocontainer.behaviors.OptInCaching.createComponentAdapter(OptInCaching.java:45)
              at
      org.picocontainer.DefaultPicoContainer.addComponent(DefaultPicoContainer.java:535)
              at
      org.picocontainer.DefaultPicoContainer.access$300(DefaultPicoContainer.java:83)
              at
      org.picocontainer.DefaultPicoContainer$AsPropertiesPicoContainer.addComponent(DefaultPicoContainer.java:1148)
              at
      org.sonar.api.platform.ComponentContainer.addExtension(ComponentContainer.java:183)
              at
      org.sonar.batch.bootstrap.ExtensionInstaller.doInstall(ExtensionInstaller.java:78)
      

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              henryju OLD - Julien HENRY
              Reporter:
              henryju OLD - Julien HENRY
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Due:
                Created:
                Updated:
                Resolved: