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

            uncletall uncletall created issue -

            I have the same problem. In the change log there is a 1.5.2 version supposed to fix this but 1.5.1 is still "latest release"?
            Where do I find 1.5.2?

            peterbj Peter Bjernfalk added a comment - I have the same problem. In the change log there is a 1.5.2 version supposed to fix this but 1.5.1 is still "latest release"? Where do I find 1.5.2?
            brantone Brantone added a comment -

            The mention of "1.5.2" looks like a silly typo and getting mixed up with new snapshot as opposed to completing 1.5.1, woops.
            Updated Wiki page

            brantone Brantone added a comment - The mention of "1.5.2" looks like a silly typo and getting mixed up with new snapshot as opposed to completing 1.5.1, woops. Updated Wiki page
            brantone Brantone added a comment -

            I don't suppose you have Multiple-SCM plugin installed?
            If not, if you do install it, does it work?

            brantone Brantone added a comment - I don't suppose you have Multiple-SCM plugin installed? If not, if you do install it, does it work?
            jazze Jason Azze made changes -
            Field Original Value New Value
            Link This issue is related to JENKINS-30243 [ JENKINS-30243 ]
            jazze Jason Azze added a comment - See also JENKINS-30243 Specifically https://issues.jenkins-ci.org/browse/JENKINS-30243?focusedCommentId=238643&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-238643 To work around this problem I had to install the Multiple SCMs plugin.
            uncletall uncletall added a comment -

            Confirmed that downgrading to 1.4.2 solves this

            uncletall uncletall added a comment - Confirmed that downgrading to 1.4.2 solves this
            brantone Brantone added a comment -

            uncletall : this ticket originally mentioned 1.5.1 but a newer 1.5.2 is out, have you tried that yet? If so, can you update the ticket?

            brantone Brantone added a comment - uncletall : this ticket originally mentioned 1.5.1 but a newer 1.5.2 is out, have you tried that yet? If so, can you update the ticket?
            uncletall uncletall added a comment -

            Brantone: I installed it together with the 1.642.4 LTS in April and upgraded all my plugins. So if the 1.5.2 was available at that point it must have been the one I used.

            uncletall uncletall added a comment - Brantone: I installed it together with the 1.642.4 LTS in April and upgraded all my plugins. So if the 1.5.2 was available at that point it must have been the one I used.
            brantone Brantone made changes -
            Assignee huybrechts [ huybrechts ] Brantone [ brantone ]
            brantone Brantone added a comment -

            There are a few assumptions in there ... would prefer explicit confirmation.

            brantone Brantone added a comment - There are a few assumptions in there ... would prefer explicit confirmation.
            uncletall uncletall added a comment -

            Just upgraded again to 1.5.2 and the Use SCM from other project option is gone, now downgrading again to 1.4.2

            uncletall uncletall added a comment - Just upgraded again to 1.5.2 and the Use SCM from other project option is gone, now downgrading again to 1.4.2
            brantone Brantone added a comment -

            Is there anything in logs for a stack-trace? Or possibly conflicting plugins?
            I've been using 1.5.2 since it was released and never had a problem. Odd.

            brantone Brantone added a comment - Is there anything in logs for a stack-trace? Or possibly conflicting plugins? I've been using 1.5.2 since it was released and never had a problem. Odd.
            uncletall uncletall added a comment -

            I just noticed something.

            The SCM template job I have created also injects some environment variables into the job and has a simple script. Hence I have the job twice in the job config.
            1. Use SCM from other another project, to setup the SCM
            2. Use builders from other project (use all builders from this project), to configure some environment variables and run the script.

            For some projects I did not use the second option, for those projects the Use SCM from another project was not removed.
            For the jobs where I configured both, the Use SCM from another project was removed.

            uncletall uncletall added a comment - I just noticed something. The SCM template job I have created also injects some environment variables into the job and has a simple script. Hence I have the job twice in the job config. 1. Use SCM from other another project, to setup the SCM 2. Use builders from other project (use all builders from this project), to configure some environment variables and run the script. For some projects I did not use the second option, for those projects the Use SCM from another project was not removed. For the jobs where I configured both, the Use SCM from another project was removed.
            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
            rtyler R. Tyler Croy made changes -
            Workflow JNJira [ 167152 ] JNJira + In-Review [ 182615 ]
            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: