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

ExtensionFinder Failed to resolve interface when resolving descriptor with injected interface

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Component/s: core
    • Labels:
    • Environment:
    • Similar Issues:
    • Released As:
      2.217

      Description

      When loading the Bitbucket Server Integration plugin from a clean install of Jenkins version 2.213 and above, several entries in the stack trace are appearing. I'm looking to find a fix for the problem for the plugin, but it appears the root of the issue is in Jenkins Extension Finder:

      hudson.ExtensionFinder$GuiceFinder$SezpozModule configure
       WARNING: Failed to load com.atlassian.bitbucket.jenkins.internal.config.BitbucketServerConfiguration$DescriptorImpl
       java.lang.LinkageError: Failed to resolve interface com.atlassian.bitbucket.jenkins.internal.credentials.JenkinsToBitbucketCredentials
       at hudson.ExtensionFinder$GuiceFinder$SezpozModule.resolve(ExtensionFinder.java:516)
       at hudson.ExtensionFinder$GuiceFinder$SezpozModule.resolve(ExtensionFinder.java:510)
       at hudson.ExtensionFinder$GuiceFinder$SezpozModule.resolve(ExtensionFinder.java:487)
       at hudson.ExtensionFinder$GuiceFinder$SezpozModule.configure(ExtensionFinder.java:536)
       at com.google.inject.AbstractModule.configure(AbstractModule.java:62)
       at com.google.inject.spi.Elements$RecordingBinder.install(Elements.java:340)
       at com.google.inject.spi.Elements.getElements(Elements.java:110)
       at com.google.inject.internal.InjectorShell$Builder.build(InjectorShell.java:138)
       at com.google.inject.internal.InternalInjectorCreator.build(InternalInjectorCreator.java:104)
       at com.google.inject.Guice.createInjector(Guice.java:96)
       at com.google.inject.Guice.createInjector(Guice.java:73)
       at hudson.ExtensionFinder$GuiceFinder.<init>(ExtensionFinder.java:285)
       at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
       at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
       at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
       at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
       at java.lang.Class.newInstance(Class.java:442)
       at net.java.sezpoz.IndexItem.instance(IndexItem.java:181)
       at hudson.ExtensionFinder$Sezpoz._find(ExtensionFinder.java:714)
       at hudson.ExtensionFinder$Sezpoz.find(ExtensionFinder.java:700)
       at hudson.ClassicPluginStrategy.findComponents(ClassicPluginStrategy.java:344)
       at hudson.ExtensionList.load(ExtensionList.java:381)
       at hudson.ExtensionList.ensureLoaded(ExtensionList.java:317)
       at hudson.ExtensionList.getComponents(ExtensionList.java:183)
       at jenkins.model.Jenkins$6.onInitMilestoneAttained(Jenkins.java:1172)
       at jenkins.InitReactorRunner$1.onAttained(InitReactorRunner.java:83)
       at org.jvnet.hudson.reactor.ReactorListener$Aggregator.lambda$onAttained$3(ReactorListener.java:102)
       at org.jvnet.hudson.reactor.ReactorListener$Aggregator.run(ReactorListener.java:109)
       at org.jvnet.hudson.reactor.ReactorListener$Aggregator.onAttained(ReactorListener.java:102)
       at org.jvnet.hudson.reactor.Reactor$1.run(Reactor.java:177)
       at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:117)
       at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
       at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
       at java.lang.Thread.run(Thread.java:748)
       Caused by: java.lang.NullPointerException
       at hudson.ExtensionFinder$GuiceFinder$SezpozModule.resolve(ExtensionFinder.java:504) 
      ... 33 more
      

      The errors are being caused by a NullPointerException being thrown in hudson.ExtensionFinder. It occurs when resolving descriptors that have a field describing an interface annotated with @Inject- resolve is being called on these interfaces, causing the NPE.

      The offending interfaces use @ImplementedBy for injection.

      An example of a dependency causing this issue: https://github.com/jenkinsci/atlassian-bitbucket-server-integration-plugin/blob/master/src/main/java/com/atlassian/bitbucket/jenkins/internal/config/BitbucketServerConfiguration.java#L275

        Attachments

          Issue Links

            Activity

            Hide
            markewaite Mark Waite added a comment - - edited

            Jesse Glick made the most recent change to ExtensionFinder in Jenkins 2.212.

            Show
            markewaite Mark Waite added a comment - - edited Jesse Glick made the most recent change to ExtensionFinder in Jenkins 2.212 .
            Hide
            jglick Jesse Glick added a comment -

            Just a small change; the major change was right before that, by Vincent Latombe for JENKINS-60449.

            Show
            jglick Jesse Glick added a comment - Just a small change; the major change was right before that, by Vincent Latombe for JENKINS-60449 .
            Hide
            oleg_nenashev Oleg Nenashev added a comment -

            The fix was released in 2.217

            Show
            oleg_nenashev Oleg Nenashev added a comment - The fix was released in 2.217

              People

              • Assignee:
                jglick Jesse Glick
                Reporter:
                mhenschke_atlassian Martin Henschke
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: