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

NoClassDefFoundError during startup (Template Project plugin 1.5)

    Details

    • Similar Issues:

      Description

      After upgrading the Template Project Plugin from 1.4.2 to 1.5 following error is thrown during startup of Jenkins:

      PM WARNING hudson.ExtensionFinder$GuiceFinder$FaultTolerantScope$1 error

      Failed to instantiate Key[type=hudson.plugins.templateproject.ProxySCM$DescriptorImpl, annotation=[none]]; skipping this component
      com.google.inject.ProvisionException: Guice provision errors:

      1) Error injecting constructor, java.lang.NoClassDefFoundError: org/jenkinsci/plugins/multiplescms/MultiSCMRevisionState
      at hudson.plugins.templateproject.ProxySCM$DescriptorImpl.<init>(ProxySCM.java:112)

      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: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:386)
      at hudson.ExtensionList.load(ExtensionList.java:300)
      at hudson.ExtensionList.ensureLoaded(ExtensionList.java:253)
      at hudson.ExtensionList.iterator(ExtensionList.java:143)
      at jenkins.model.Jenkins.getDescriptorByType(Jenkins.java:1192)
      at hudson.plugins.copyartifact.BuildSelectorParameter.initAliases(BuildSelectorParameter.java:135)
      at hudson.plugins.copyartifact.CopyArtifactPlugin.postInitialize(CopyArtifactPlugin.java:35)
      at hudson.PluginManager$2$1$2.run(PluginManager.java:389)
      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:904)
      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:1145)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
      at java.lang.Thread.run(Thread.java:745)
      Caused by: java.lang.NoClassDefFoundError: org/jenkinsci/plugins/multiplescms/MultiSCMRevisionState
      at java.lang.Class.getDeclaredMethods0(Native Method)
      at java.lang.Class.privateGetDeclaredMethods(Class.java:2615)
      at java.lang.Class.getMethod0(Class.java:2856)
      at java.lang.Class.getMethod(Class.java:1668)
      at hudson.model.Descriptor.<init>(Descriptor.java:286)
      at hudson.scm.SCMDescriptor.<init>(SCMDescriptor.java:71)
      at hudson.plugins.templateproject.ProxySCM$DescriptorImpl.<init>(ProxySCM.java:112)
      at hudson.plugins.templateproject.ProxySCM$DescriptorImpl$$FastClassByGuice$$4e632614.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)
      ... 24 more
      Caused by: java.lang.ClassNotFoundException: org.jenkinsci.plugins.multiplescms.MultiSCMRevisionState
      at jenkins.util.AntClassLoader.findClassInComponents(AntClassLoader.java:1375)
      at jenkins.util.AntClassLoader.findClass(AntClassLoader.java:1325)
      at jenkins.util.AntClassLoader.loadClass(AntClassLoader.java:1078)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
      ... 40 more

        Attachments

          Issue Links

            Activity

            Hide
            brantone Brantone added a comment -

            Trying out a few possibilities and I'm not longer hitting the issue that warranted that check for `instanceof`, so I wonder if previous updates to multiple-scms-plugin have taken care of it as the comments allude to:
            https://github.com/Brantone/template-project-plugin/blob/b6fe18f480f1216777400e56b1fae851665903a9/src/main/java/hudson/plugins/templateproject/ProxySCM.java#L78

            Show
            brantone Brantone added a comment - Trying out a few possibilities and I'm not longer hitting the issue that warranted that check for `instanceof`, so I wonder if previous updates to multiple-scms-plugin have taken care of it as the comments allude to: https://github.com/Brantone/template-project-plugin/blob/b6fe18f480f1216777400e56b1fae851665903a9/src/main/java/hudson/plugins/templateproject/ProxySCM.java#L78
            Hide
            tsniatowski Tomasz Śniatowski added a comment -

            I'm getting

            Nov 16, 2015 10:00:27 AM hudson.ExpressionFactory2$JexlExpression evaluate
            WARNING: Caught exception evaluating: h.getRelativeLinkTo(job) in /job/[foo]/configure. Reason: java.lang.NullPointerException
            java.lang.NullPointerException
            

            (no backtrace, any ideas on why I don't get a backtrace here?) quite often. I do have "Multiple SCMs" installed. Some of the jobs that trigger the error when entering their configuration screen do not use template-project, some do. What can I do? Should I file a separate bug?

            Show
            tsniatowski Tomasz Śniatowski added a comment - I'm getting Nov 16, 2015 10:00:27 AM hudson.ExpressionFactory2$JexlExpression evaluate WARNING: Caught exception evaluating: h.getRelativeLinkTo(job) in /job/[foo]/configure. Reason: java.lang.NullPointerException java.lang.NullPointerException (no backtrace, any ideas on why I don't get a backtrace here?) quite often. I do have "Multiple SCMs" installed. Some of the jobs that trigger the error when entering their configuration screen do not use template-project, some do. What can I do? Should I file a separate bug?
            Hide
            brantone Brantone added a comment - - edited

            Tomasz Śniatowski : can you trace that error back to Template Plugin? If some cause it but others don't, might not be Template
            EDIT:
            Let me take that back, I actually found how/why that's happening. That error itself is actually different than the one for this ticket, so new ticket should be created (unless I fix the bug first, it's a race )

            Show
            brantone Brantone added a comment - - edited Tomasz Śniatowski : can you trace that error back to Template Plugin? If some cause it but others don't, might not be Template EDIT: Let me take that back, I actually found how/why that's happening. That error itself is actually different than the one for this ticket, so new ticket should be created (unless I fix the bug first, it's a race )
            Hide
            fredericmeyrou Frédéric Meyrou added a comment -

            Same issue found today on V2.121.1.2

             

            WARNING: Failed to instantiate Key[type=hudson.plugins.templateproject.ProxySCM$DescriptorImpl, annotation=[none]]; skipping this component
            com.google.inject.ProvisionException: Unable to provision, see the following errors:

            1) Error injecting constructor, java.lang.NoClassDefFoundError: org/jenkinsci/plugins/multiplescms/MultiSCMRevisionState
            at hudson.plugins.templateproject.ProxySCM$DescriptorImpl.<init>(ProxySCM.java:113)

            1 error
            at com.google.inject.internal.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:52)
            at com.google.inject.internal.SingletonScope$1.get(SingletonScope.java:145)
            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$2$1.call(InjectorImpl.java:1016)
            at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1092)
            at com.google.inject.internal.InjectorImpl$2.get(InjectorImpl.java:1012)
            at hudson.ExtensionFinder$GuiceFinder._find(ExtensionFinder.java:386)
            at hudson.ExtensionFinder$GuiceFinder.find(ExtensionFinder.java:377)
            at hudson.ClassicPluginStrategy.findComponents(ClassicPluginStrategy.java:482)
            at hudson.ExtensionList.load(ExtensionList.java:380)
            at hudson.ExtensionList.ensureLoaded(ExtensionList.java:318)
            at hudson.ExtensionList.iterator(ExtensionList.java:172)
            at jenkins.model.Jenkins.getDescriptorByType(Jenkins.java:1524)
            at com.cloudbees.jenkins.plugins.jsync.archiver.JSyncArtifactManagerFactory.upgrade(JSyncArtifactManagerFactory.java:51)
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
            at java.lang.reflect.Method.invoke(Method.java:498)
            at hudson.init.TaskMethodFinder.invoke(TaskMethodFinder.java:104)
            at hudson.init.TaskMethodFinder$TaskImpl.run(TaskMethodFinder.java:175)
            at org.jvnet.hudson.reactor.Reactor.runTask(Reactor.java:296)
            at jenkins.model.Jenkins$5.runTask(Jenkins.java:1068)
            at org.jvnet.hudson.reactor.Reactor$2.run(Reactor.java:214)
            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:748)
            Caused by: java.lang.NoClassDefFoundError: org/jenkinsci/plugins/multiplescms/MultiSCMRevisionState

            Show
            fredericmeyrou Frédéric Meyrou added a comment - Same issue found today on V2.121.1.2   WARNING: Failed to instantiate Key[type=hudson.plugins.templateproject.ProxySCM$DescriptorImpl, annotation= [none] ]; skipping this component com.google.inject.ProvisionException: Unable to provision, see the following errors: 1) Error injecting constructor, java.lang.NoClassDefFoundError: org/jenkinsci/plugins/multiplescms/MultiSCMRevisionState at hudson.plugins.templateproject.ProxySCM$DescriptorImpl.<init>(ProxySCM.java:113) 1 error at com.google.inject.internal.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:52) at com.google.inject.internal.SingletonScope$1.get(SingletonScope.java:145) 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$2$1.call(InjectorImpl.java:1016) at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1092) at com.google.inject.internal.InjectorImpl$2.get(InjectorImpl.java:1012) at hudson.ExtensionFinder$GuiceFinder._find(ExtensionFinder.java:386) at hudson.ExtensionFinder$GuiceFinder.find(ExtensionFinder.java:377) at hudson.ClassicPluginStrategy.findComponents(ClassicPluginStrategy.java:482) at hudson.ExtensionList.load(ExtensionList.java:380) at hudson.ExtensionList.ensureLoaded(ExtensionList.java:318) at hudson.ExtensionList.iterator(ExtensionList.java:172) at jenkins.model.Jenkins.getDescriptorByType(Jenkins.java:1524) at com.cloudbees.jenkins.plugins.jsync.archiver.JSyncArtifactManagerFactory.upgrade(JSyncArtifactManagerFactory.java:51) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at hudson.init.TaskMethodFinder.invoke(TaskMethodFinder.java:104) at hudson.init.TaskMethodFinder$TaskImpl.run(TaskMethodFinder.java:175) at org.jvnet.hudson.reactor.Reactor.runTask(Reactor.java:296) at jenkins.model.Jenkins$5.runTask(Jenkins.java:1068) at org.jvnet.hudson.reactor.Reactor$2.run(Reactor.java:214) 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:748) Caused by: java.lang.NoClassDefFoundError: org/jenkinsci/plugins/multiplescms/MultiSCMRevisionState
            Hide
            alecharp Adrien Lecharpentier added a comment -

            I believe this is because the optionality of the multiple-scms plugin is not correctly checked on here and here. It needs to be done like described here.

            I created https://github.com/jenkinsci/template-project-plugin/pull/34.

            Show
            alecharp Adrien Lecharpentier added a comment - I believe this is because the optionality of the multiple-scms plugin is not correctly checked on here and here . It needs to be done like described here . I created https://github.com/jenkinsci/template-project-plugin/pull/34 .

              People

              • Assignee:
                brantone Brantone
                Reporter:
                tkahler Thorsten Kahler
              • Votes:
                5 Vote for this issue
                Watchers:
                15 Start watching this issue

                Dates

                • Created:
                  Updated: