Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-33417

P4 and Sonar plugins generates circular dependency warning

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Component/s: p4-plugin, sonar-plugin
    • Labels:
      None
    • Environment:
      Jenkins 1.642.1
      sonar-2.2+
      p4-plugin-1.3.6+
    • Similar Issues:

      Description

      When sonar-plugin 2.2 (and later) and p4-plugin 1.3.6 (and later) are both installed, the following warning warning is generated on Jenkins startup:

      WARNING: Failed to instantiate Key[type=hudson.plugins.sonar.SonarPublisher$DescriptorImpl, annotation=[none]]; skipping this component
      com.google.inject.ProvisionException: Guice provision errors:
      
      1) Tried proxying hudson.plugins.sonar.SonarPublisher$DescriptorImpl to support a circular dependency, but it is not an interface.
      
      1 error
      	at com.google.inject.internal.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:52)
      	at com.google.inject.Scopes$1$1.get(Scopes.java:65)
      	at hudson.ExtensionFinder$GuiceFinder$FaultTolerantScope$1.get(ExtensionFinder.java:427)
      	at com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:41)
      	at com.google.inject.internal.InjectorImpl$3$1.call(InjectorImpl.java:1005)
      	at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1058)
      	at com.google.inject.internal.InjectorImpl$3.get(InjectorImpl.java:1001)
      	at hudson.ExtensionFinder$GuiceFinder._find(ExtensionFinder.java:389)
      	at hudson.ExtensionFinder$GuiceFinder.find(ExtensionFinder.java:380)
      	at hudson.ClassicPluginStrategy.findComponents(ClassicPluginStrategy.java:388)
      	at hudson.ExtensionList.load(ExtensionList.java:349)
      	at hudson.ExtensionList.ensureLoaded(ExtensionList.java:287)
      	at hudson.ExtensionList.iterator(ExtensionList.java:156)
      	at jenkins.model.Jenkins.getDescriptor(Jenkins.java:1207)
      	at org.jenkinsci.plugins.p4.ConfigurationListener.onChange(ConfigurationListener.java:28)
      	at hudson.model.listeners.SaveableListener.fireOnChange(SaveableListener.java:81)
      	at hudson.model.Descriptor.save(Descriptor.java:856)
      	at hudson.plugins.sonar.SonarPublisher$DescriptorImpl.<init>(SonarPublisher.java:420)
      	at hudson.plugins.sonar.SonarPublisher$DescriptorImpl$$FastClassByGuice$$46a6cf4e.newInstance(<generated>)
      	at com.google.inject.internal.cglib.reflect.$FastConstructor.newInstance(FastConstructor.java:40)
      	at com.google.inject.internal.DefaultConstructionProxyFactory$1.newInstance(DefaultConstructionProxyFactory.java:61)
      	at com.google.inject.internal.ConstructorInjector.provision(ConstructorInjector.java:108)
      	at com.google.inject.internal.ConstructorInjector.construct(ConstructorInjector.java:88)
      	at com.google.inject.internal.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:269)
      	at com.google.inject.internal.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:46)
      	at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1058)
      	at com.google.inject.internal.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:40)
      	at com.google.inject.Scopes$1$1.get(Scopes.java:65)
      	at hudson.ExtensionFinder$GuiceFinder$FaultTolerantScope$1.get(ExtensionFinder.java:427)
      	at com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:41)
      	at com.google.inject.internal.InjectorImpl$3$1.call(InjectorImpl.java:1005)
      	at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1051)
      	at com.google.inject.internal.InjectorImpl$3.get(InjectorImpl.java:1001)
      	at hudson.ExtensionFinder$GuiceFinder._find(ExtensionFinder.java:389)
      	at hudson.ExtensionFinder$GuiceFinder.find(ExtensionFinder.java:380)
      	at hudson.ClassicPluginStrategy.findComponents(ClassicPluginStrategy.java:388)
      	at hudson.ExtensionList.load(ExtensionList.java:349)
      	at hudson.ExtensionList.ensureLoaded(ExtensionList.java:287)
      	at hudson.ExtensionList.getComponents(ExtensionList.java:167)
      	at hudson.DescriptorExtensionList.load(DescriptorExtensionList.java:185)
      	at hudson.ExtensionList.ensureLoaded(ExtensionList.java:287)
      	at hudson.ExtensionList.iterator(ExtensionList.java:156)
      	at hudson.ExtensionList.get(ExtensionList.java:147)
      	at com.cloudbees.jenkins.GitHubPushTrigger$DescriptorImpl.get(GitHubPushTrigger.java:320)
      	at org.jenkinsci.plugins.github.migration.Migrator.migrate(Migrator.java:41)
      	at org.jenkinsci.plugins.github.GitHubPlugin.postInitialize(GitHubPlugin.java:39)
      	at hudson.PluginManager$2$1$2.run(PluginManager.java:403)
      	at org.jvnet.hudson.reactor.TaskGraphBuilder$TaskImpl.run(TaskGraphBuilder.java:169)
      	at org.jvnet.hudson.reactor.Reactor.runTask(Reactor.java:282)
      	at jenkins.model.Jenkins$8.runTask(Jenkins.java:924)
      	at org.jvnet.hudson.reactor.Reactor$2.run(Reactor.java:210)
      	at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:117)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      	at java.lang.Thread.run(Thread.java:745)
      

      This can be easily reproduce. With either sonar-plugin:2.1 or p4-plugin:1.3.5, there is no warning.

      In p4-plugin version 1.3.6, a SaveableListener extension has been added:

        Attachments

          Issue Links

            Activity

            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Allan Burdajewicz
            Path:
            src/main/java/hudson/plugins/sonar/SonarGlobalConfiguration.java
            http://jenkins-ci.org/commit/sonarqube-plugin/20431dcd80cf34a674db1197e90e13a160865def
            Log:
            JENKINS-33417 - Remove save() of GlobalConfiguration class load to fixed circular dependencies on startup.

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Allan Burdajewicz Path: src/main/java/hudson/plugins/sonar/SonarGlobalConfiguration.java http://jenkins-ci.org/commit/sonarqube-plugin/20431dcd80cf34a674db1197e90e13a160865def Log: JENKINS-33417 - Remove save() of GlobalConfiguration class load to fixed circular dependencies on startup.
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: dbmeneses
            Path:
            src/main/java/hudson/plugins/sonar/SonarGlobalConfiguration.java
            http://jenkins-ci.org/commit/sonarqube-plugin/fd7ba013aa3451930c29e23eb7a8487eb301c7e8
            Log:
            Merge pull request #42 from Dohbedoh/JENKINS-33417

            JENKINS-33417 - Fixed circular dependency warning on Startup

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: dbmeneses Path: src/main/java/hudson/plugins/sonar/SonarGlobalConfiguration.java http://jenkins-ci.org/commit/sonarqube-plugin/fd7ba013aa3451930c29e23eb7a8487eb301c7e8 Log: Merge pull request #42 from Dohbedoh/ JENKINS-33417 JENKINS-33417 - Fixed circular dependency warning on Startup
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: dbmeneses
            Path:
            src/main/java/hudson/plugins/sonar/SonarGlobalConfiguration.java
            http://jenkins-ci.org/commit/sonarqube-plugin/fd7ba013aa3451930c29e23eb7a8487eb301c7e8
            Log:
            Merge pull request #42 from Dohbedoh/JENKINS-33417

            JENKINS-33417 - Fixed circular dependency warning on Startup

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: dbmeneses Path: src/main/java/hudson/plugins/sonar/SonarGlobalConfiguration.java http://jenkins-ci.org/commit/sonarqube-plugin/fd7ba013aa3451930c29e23eb7a8487eb301c7e8 Log: Merge pull request #42 from Dohbedoh/ JENKINS-33417 JENKINS-33417 - Fixed circular dependency warning on Startup
            Hide
            allan_burdajewicz Allan BURDAJEWICZ added a comment -

            Fix Released in 2.4.1

            Show
            allan_burdajewicz Allan BURDAJEWICZ added a comment - Fix Released in 2.4.1
            Hide
            p4paul Paul Allen added a comment -

            Released.

            Show
            p4paul Paul Allen added a comment - Released.

              People

              Assignee:
              sonarteam Sonar Team
              Reporter:
              allan_burdajewicz Allan BURDAJEWICZ
              Votes:
              1 Vote for this issue
              Watchers:
              5 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: