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

Naginator plugin not really optional as it spews out a stacktrace when not installed

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • build-timeout-plugin
    • None
    • Jenkins 2.7

      If you install build timeout but not naginator, everytime you launch jenkins you see the stack trace below.

      This seems not a great way to treat an "optional" dependency. It should be non optional if it is going to do this, or some other approach needs to be used instead of just failing hard to load a component.

      WARNING: Failed to instantiate Key[type=hudson.plugins.build_timeout.operations.AbortAndRestartOperation$DescriptorImpl, annotation=[none]]; skipping this component
      com.google.inject.ProvisionException: Guice provision errors:
      
      1) Error injecting constructor, java.lang.NoClassDefFoundError: com/chikli/hudson/plugin/naginator/ScheduleDelay
        at hudson.plugins.build_timeout.operations.AbortAndRestartOperation$DescriptorImpl.<init>(AbortAndRestartOperation.java:120)
      
      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:424)
      	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:386)
      	at hudson.ExtensionFinder$GuiceFinder.find(ExtensionFinder.java:377)
      	at hudson.ClassicPluginStrategy.findComponents(ClassicPluginStrategy.java:470)
      	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:434)
      	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$7.runTask(Jenkins.java:996)
      

          [JENKINS-36696] Naginator plugin not really optional as it spews out a stacktrace when not installed

          Michael Neale created issue -
          ikedam made changes -
          Assignee Original: Kohsuke Kawaguchi [ kohsuke ] New: ikedam [ ikedam ]

          ikedam added a comment -

          I'm making a new release with this fix immediately.

          ikedam added a comment - I'm making a new release with this fix immediately.
          ikedam made changes -
          Priority Original: Major [ 3 ] New: Critical [ 2 ]

          ikedam added a comment -

          ikedam added a comment - Full log: https://gist.github.com/rtyler/06457d7d9d4d4eccef36f6d9aa1c9738

          ikedam added a comment -

          By the way, why JVM tries to load ScheduleDelay when initializing AbortAndRestartOperation$DescriptorImpl?
          It looks strange to me.

          ikedam added a comment - By the way, why JVM tries to load ScheduleDelay when initializing AbortAndRestartOperation$DescriptorImpl ? It looks strange to me.

          ikedam added a comment -

          I found it only displays the stacktrace, but doesn't cause fail to load build-timeout plugin.
          Changed the priority back to Major.

          ikedam added a comment - I found it only displays the stacktrace, but doesn't cause fail to load build-timeout plugin. Changed the priority back to Major.
          ikedam made changes -
          Priority Original: Critical [ 2 ] New: Major [ 3 ]

          ikedam added a comment -

          ikedam added a comment - https://github.com/jenkinsci/build-timeout-plugin/pull/59

          ikedam added a comment -

          Released 1.17.1 with the fix for this.
          It will be available in the update center in a day.

          ikedam added a comment - Released 1.17.1 with the fix for this. It will be available in the update center in a day.
          ikedam made changes -
          Resolution New: Fixed [ 1 ]
          Status Original: Open [ 1 ] New: Resolved [ 5 ]

            ikedam ikedam
            michaelneale Michael Neale
            Votes:
            2 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: