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

Find out what's wrong with Copy Artifact failing to load in 2.0

      Steps to reproduce:
      1. Install 2.0 beta
      2. Select all plugins in setup wizard
      3. See Copy Artifact fail

      INFO: Downloading Copy Artifact Plugin
      Mrz 24, 2016 5:07:19 AM hudson.PluginManager dynamicLoad
      INFO: Attempting to dynamic load /…/plugins/copyartifact.jpi
      Mrz 24, 2016 5:07:20 AM hudson.ExtensionFinder$GuiceFinder refresh
      SEVERE: Failed to create Guice container from newly added plugins
      com.google.inject.CreationException: Guice creation errors:
      
      1) A binding to hudson.model.Descriptor annotated with @com.google.inject.name.Named(value=2) was already configured at hudson.ExtensionFinder$GuiceFinder$SezpozModule.configure(ExtensionFinder.java:530).
        at hudson.ExtensionFinder$GuiceFinder$SezpozModule.configure(ExtensionFinder.java:530)
      
      1 error
      	at com.google.inject.internal.Errors.throwCreationExceptionIfErrorsExist(Errors.java:448)
      	at com.google.inject.internal.InternalInjectorCreator.initializeStatically(InternalInjectorCreator.java:155)
      	at com.google.inject.internal.InternalInjectorCreator.build(InternalInjectorCreator.java:107)
      	at com.google.inject.internal.InjectorImpl.createChildInjector(InjectorImpl.java:230)
      	at hudson.ExtensionFinder$GuiceFinder.refresh(ExtensionFinder.java:334)
      	at jenkins.model.Jenkins.refreshExtensions(Jenkins.java:2378)
      	at hudson.PluginManager.dynamicLoad(PluginManager.java:691)
      	at hudson.model.UpdateCenter$InstallationJob._run(UpdateCenter.java:1671)
      	at hudson.model.UpdateCenter$DownloadJob.run(UpdateCenter.java:1453)
      	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
      	at java.util.concurrent.FutureTask.run(FutureTask.java:262)
      	at hudson.remoting.AtmostOneThreadExecutor$Worker.run(AtmostOneThreadExecutor.java:110)
      	at java.lang.Thread.run(Thread.java:744)
      
      Mrz 24, 2016 5:07:20 AM hudson.model.UpdateCenter$DownloadJob run
      SEVERE: Failed to install Copy Artifact Plugin
      java.io.IOException: Failed to dynamically deploy this plugin
      	at hudson.model.UpdateCenter$InstallationJob._run(UpdateCenter.java:1675)
      	at hudson.model.UpdateCenter$DownloadJob.run(UpdateCenter.java:1453)
      	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
      	at java.util.concurrent.FutureTask.run(FutureTask.java:262)
      	at hudson.remoting.AtmostOneThreadExecutor$Worker.run(AtmostOneThreadExecutor.java:110)
      	at java.lang.Thread.run(Thread.java:744)
      Caused by: java.io.IOException: Failed to install copyartifact plugin
      	at hudson.PluginManager.dynamicLoad(PluginManager.java:698)
      	at hudson.model.UpdateCenter$InstallationJob._run(UpdateCenter.java:1671)
      	... 5 more
      Caused by: jenkins.ExtensionRefreshException: com.google.inject.CreationException: Guice creation errors:
      
      1) A binding to hudson.model.Descriptor annotated with @com.google.inject.name.Named(value=2) was already configured at hudson.ExtensionFinder$GuiceFinder$SezpozModule.configure(ExtensionFinder.java:530).
        at hudson.ExtensionFinder$GuiceFinder$SezpozModule.configure(ExtensionFinder.java:530)
      
      1 error
      	at hudson.ExtensionFinder$GuiceFinder.refresh(ExtensionFinder.java:347)
      	at jenkins.model.Jenkins.refreshExtensions(Jenkins.java:2378)
      	at hudson.PluginManager.dynamicLoad(PluginManager.java:691)
      	... 6 more
      Caused by: com.google.inject.CreationException: Guice creation errors:
      
      1) A binding to hudson.model.Descriptor annotated with @com.google.inject.name.Named(value=2) was already configured at hudson.ExtensionFinder$GuiceFinder$SezpozModule.configure(ExtensionFinder.java:530).
        at hudson.ExtensionFinder$GuiceFinder$SezpozModule.configure(ExtensionFinder.java:530)
      
      1 error
      	at com.google.inject.internal.Errors.throwCreationExceptionIfErrorsExist(Errors.java:448)
      	at com.google.inject.internal.InternalInjectorCreator.initializeStatically(InternalInjectorCreator.java:155)
      	at com.google.inject.internal.InternalInjectorCreator.build(InternalInjectorCreator.java:107)
      	at com.google.inject.internal.InjectorImpl.createChildInjector(InjectorImpl.java:230)
      	at hudson.ExtensionFinder$GuiceFinder.refresh(ExtensionFinder.java:334)
      	... 8 more
      
      

          [JENKINS-33772] Find out what's wrong with Copy Artifact failing to load in 2.0

          Daniel Beck added a comment -

          Responsible plugin appears to be Matrix Auth. Minimal Plugin set:

          Deselect all, then select Matrix Auth, Copy Artifact (in that order) in wizard.

          It's unrelated to the Matrix Auth dependency bug to Folders; None, Folders, Matrix Auth, Copy Artifact does not have the warning, but still fails to load Copy Artifact.

          Wild guess: Maybe related the anon class that's a subclass of another registered Descriptor?

          Daniel Beck added a comment - Responsible plugin appears to be Matrix Auth. Minimal Plugin set: Deselect all, then select Matrix Auth, Copy Artifact (in that order) in wizard. It's unrelated to the Matrix Auth dependency bug to Folders; None, Folders, Matrix Auth, Copy Artifact does not have the warning, but still fails to load Copy Artifact. Wild guess: Maybe related the anon class that's a subclass of another registered Descriptor?

          Daniel Beck added a comment -

          jglick Are you maintaining Matrix Auth?

          Daniel Beck added a comment - jglick Are you maintaining Matrix Auth?

          Daniel Beck added a comment -

          Not sure about epic inclusion here, but may reveal a core issue?

          Daniel Beck added a comment - Not sure about epic inclusion here, but may reveal a core issue?

          From Daniel: This is a new behavior in Jenkins 2 because before Jenkins 2, Matrix auth was already bundled, so it was already installed, so users would not hit this. Now they will hit it if they don't install MatrixAuth before CopyArtifact.

          Spike Washburn added a comment - From Daniel: This is a new behavior in Jenkins 2 because before Jenkins 2, Matrix auth was already bundled, so it was already installed, so users would not hit this. Now they will hit it if they don't install MatrixAuth before CopyArtifact.

          Daniel Beck added a comment -

          Correction to what swashbuck1r wrote:

          Now they will hit it if they don't install MatrixAuth before CopyArtifact.

          They will hit it IFF Matrix Auth gets installed before Copy Artifact. Which is e.g. the case when selecting "Install All" in the customize dialog.

          Daniel Beck added a comment - Correction to what swashbuck1r wrote: Now they will hit it if they don't install MatrixAuth before CopyArtifact. They will hit it IFF Matrix Auth gets installed before Copy Artifact. Which is e.g. the case when selecting "Install All" in the customize dialog.

          Jesse Glick added a comment -

          Reproduced. I think this is because GlobalMatrixAuthorizationStrategy.DESCRIPTOR and some extensions in copyartifact such as LastCompletedBuildSelector.DESCRIPTOR both put @Extension on a field/method rather than a class, which is unusual, and this code is using an id which is not globally unique.

          Jesse Glick added a comment - Reproduced. I think this is because GlobalMatrixAuthorizationStrategy.DESCRIPTOR and some extensions in copyartifact such as LastCompletedBuildSelector.DESCRIPTOR both put @Extension on a field/method rather than a class, which is unusual, and this code is using an id which is not globally unique.

          Code changed in jenkins
          User: Jesse Glick
          Path:
          core/src/main/java/hudson/ExtensionFinder.java
          http://jenkins-ci.org/commit/jenkins/1a28593f0922f0a662e475f816f9a194d563c521
          Log:
          [FIXED JENKINS-33772] ID was not sufficiently unique for SezpozModule; use an ID based on the actual annotated element.

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: core/src/main/java/hudson/ExtensionFinder.java http://jenkins-ci.org/commit/jenkins/1a28593f0922f0a662e475f816f9a194d563c521 Log: [FIXED JENKINS-33772] ID was not sufficiently unique for SezpozModule; use an ID based on the actual annotated element.

          Code changed in jenkins
          User: Jesse Glick
          Path:
          core/src/main/java/hudson/ExtensionFinder.java
          http://jenkins-ci.org/commit/jenkins/52bb33242532c612c907bd4c2b3e52fa66baa471
          Log:
          Merge pull request #2183 from jglick/SezpozModule-unique-ID-JENKINS-33772

          JENKINS-33772 ID was not sufficiently unique for SezpozModule

          Compare: https://github.com/jenkinsci/jenkins/compare/62d0e0c268ea...52bb33242532

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: core/src/main/java/hudson/ExtensionFinder.java http://jenkins-ci.org/commit/jenkins/52bb33242532c612c907bd4c2b3e52fa66baa471 Log: Merge pull request #2183 from jglick/SezpozModule-unique-ID- JENKINS-33772 JENKINS-33772 ID was not sufficiently unique for SezpozModule Compare: https://github.com/jenkinsci/jenkins/compare/62d0e0c268ea...52bb33242532

            jglick Jesse Glick
            danielbeck Daniel Beck
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: