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

Use SCM from another project is removed after upgrading to 1.5.1

    XMLWordPrintable

Details

    Description

      I upgraded Jenkins to the latest LTS and the template project plugin from 1.4.2 to 1.5.1. After this all my projects lost the "Use SCM another project". The "Use SCM from another project" option was also not available. However, using builders from another project was still present.

      Reverting the plugin back to the 1.4.2 version fixed this issue

      Attachments

        Issue Links

          Activity

            lkraider Paul Eipper added a comment - - edited

            This is in the system log:

            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:113)
            
            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:389)
            	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.getDescriptorByType(Jenkins.java:1233)
            	at hudson.plugins.git.GitSCM.onLoaded(GitSCM.java:1714)
            	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:106)
            	at hudson.init.TaskMethodFinder$TaskImpl.run(TaskMethodFinder.java:176)
            	at org.jvnet.hudson.reactor.Reactor.runTask(Reactor.java:282)
            	at jenkins.model.Jenkins$8.runTask(Jenkins.java:926)
            	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)
            Caused by: java.lang.NoClassDefFoundError: org/jenkinsci/plugins/multiplescms/MultiSCMRevisionState
            	at java.lang.Class.getDeclaredMethods0(Native Method)
            	at java.lang.Class.privateGetDeclaredMethods(Class.java:2701)
            	at java.lang.Class.privateGetMethodRecursive(Class.java:3048)
            	at java.lang.Class.getMethod0(Class.java:3018)
            	at java.lang.Class.getMethod(Class.java:1784)
            	at hudson.model.Descriptor.<init>(Descriptor.java:285)
            	at hudson.scm.SCMDescriptor.<init>(SCMDescriptor.java:71)
            	at hudson.plugins.templateproject.ProxySCM$DescriptorImpl.<init>(ProxySCM.java:113)
            	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)
            	... 27 more
            Caused by: java.lang.ClassNotFoundException: org.jenkinsci.plugins.multiplescms.MultiSCMRevisionState
            	at jenkins.util.AntClassLoader.findClassInComponents(AntClassLoader.java:1376)
            	at jenkins.util.AntClassLoader.findClass(AntClassLoader.java:1326)
            	at jenkins.util.AntClassLoader.loadClass(AntClassLoader.java:1079)
            	at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
            	... 44 more
            
            
            lkraider Paul Eipper added a comment - - edited This is in the system log: 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:113) 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:389) 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.getDescriptorByType(Jenkins.java:1233) at hudson.plugins.git.GitSCM.onLoaded(GitSCM.java:1714) 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:106) at hudson.init.TaskMethodFinder$TaskImpl.run(TaskMethodFinder.java:176) at org.jvnet.hudson.reactor.Reactor.runTask(Reactor.java:282) at jenkins.model.Jenkins$8.runTask(Jenkins.java:926) 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) Caused by: java.lang.NoClassDefFoundError: org/jenkinsci/plugins/multiplescms/MultiSCMRevisionState at java.lang. Class .getDeclaredMethods0(Native Method) at java.lang. Class .privateGetDeclaredMethods( Class .java:2701) at java.lang. Class .privateGetMethodRecursive( Class .java:3048) at java.lang. Class .getMethod0( Class .java:3018) at java.lang. Class .getMethod( Class .java:1784) at hudson.model.Descriptor.<init>(Descriptor.java:285) at hudson.scm.SCMDescriptor.<init>(SCMDescriptor.java:71) at hudson.plugins.templateproject.ProxySCM$DescriptorImpl.<init>(ProxySCM.java:113) 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) ... 27 more Caused by: java.lang.ClassNotFoundException: org.jenkinsci.plugins.multiplescms.MultiSCMRevisionState at jenkins.util.AntClassLoader.findClassInComponents(AntClassLoader.java:1376) at jenkins.util.AntClassLoader.findClass(AntClassLoader.java:1326) at jenkins.util.AntClassLoader.loadClass(AntClassLoader.java:1079) at java.lang. ClassLoader .loadClass( ClassLoader .java:357) ... 44 more
            brantone Brantone added a comment - - edited

            And this is with 1.5.1 ? A fix was issued with 1.5.2.
            What other SCM plugins installed as I'm currently unable to reproduce these errors.

            brantone Brantone added a comment - - edited And this is with 1.5.1 ? A fix was issued with 1.5.2. What other SCM plugins installed as I'm currently unable to reproduce these errors.
            lkraider Paul Eipper added a comment - - edited

            Template Project plugin version 1.5.2
            Multiple SCMs plugin not installed

            Other SCM plugins:
            Git client plugin - 1.19.6
            Git plugin - 2.5.0
            Pipeline: SCM Step - 2.1
            Pipeline: Step API - 2.2
            SCM API Plugin - 1.2
            Subversion Plug-in - 2.6

            lkraider Paul Eipper added a comment - - edited Template Project plugin version 1.5.2 Multiple SCMs plugin not installed Other SCM plugins: Git client plugin - 1.19.6 Git plugin - 2.5.0 Pipeline: SCM Step - 2.1 Pipeline: Step API - 2.2 SCM API Plugin - 1.2 Subversion Plug-in - 2.6
            fluffysquirrels Alex H added a comment - - edited

            This is still a problem. I came here from this StackOverflow answer.

            Is it simple enough to add the Multiple SCMs plugin as a required dependency, or to document installing that plugin as a workaround? I'm happy to submit a patch if that would be acceptable.

            fluffysquirrels Alex H added a comment - - edited This is still a problem. I came here from this StackOverflow answer . Is it simple enough to add the Multiple SCMs plugin as a required dependency, or to document installing that plugin as a workaround? I'm happy to submit a patch if that would be acceptable.
            fluffysquirrels Alex H added a comment -

            I updated the plugin wiki page to add a bullet point under "Limitations" that documents this workaround and links to this issue. Hopefully when this issue is fixed the bullet point can be removed.

            fluffysquirrels Alex H added a comment - I updated the plugin wiki page  to add a bullet point under "Limitations" that documents this workaround and links to this issue. Hopefully when this issue is fixed the bullet point can be removed.

            People

              brantone Brantone
              uncletall uncletall
              Votes:
              8 Vote for this issue
              Watchers:
              11 Start watching this issue

              Dates

                Created:
                Updated: