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

Scanning MultiBranchProject fails and logs NoSuchMethodError

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      Initial scan of branches in a multi-branch-project fails with an NoSuchMethodError in the log file.

      Steps to duplicate the problem:

      1. Clone, build, and run the docker instance
          $ git clone https://github.com/MarkEWaite/docker JENKINS-41948
          $ cd JENKINS-41948
          $ git checkout -b lts-with-plugins 4dc4b070e072c452fbb6b42b28dae3445a9e20da
          $ docker build -t jenkins:JENKINS-41948 .
          $ docker run -i --rm --publish 8080:8080 jenkins:JENKINS-41948
        
      2. Connect a web browser to that docker instance (http://localhost:8080)
      3. Open the "Git Client Plugin Folder"
      4. Open the "Git Client Branches - Maven" multi-branch job
      5. Click the "Scan Project" link and then the "Run Now" link to start branch indexing
      6. Scan will complete, but no projects will be created. Console log will report an error

      Log information is:

      Feb 10, 2017 5:48:26 PM hudson.model.Executor finish1
      SEVERE: Executor threw an exception
      java.lang.NoSuchMethodError: jenkins.branch.MultiBranchProject.getRootDirFor(Lhudson/model/Job;)Ljava/io/File;
              at com.github.mjdetullio.jenkins.plugins.multibranch.TemplateDrivenMultiBranchProject.getRootDirFor(TemplateDrivenMultiBranchProject.java:306)
              at com.github.mjdetullio.jenkins.plugins.multibranch.TemplateDrivenMultiBranchProject.getRootDirFor(TemplateDrivenMultiBranchProject.java:89)
              at hudson.model.AbstractItem.getRootDir(AbstractItem.java:177)
              at hudson.model.Items.getConfigFile(Items.java:350)
              at hudson.model.AbstractItem.getConfigFile(AbstractItem.java:506)
              at hudson.model.AbstractItem.save(AbstractItem.java:501)
              at hudson.model.Job.save(Job.java:186)
              at hudson.model.AbstractProject.save(AbstractProject.java:306)
              at hudson.BulkChange.commit(BulkChange.java:98)
              at com.github.mjdetullio.jenkins.plugins.multibranch.TemplateDrivenBranchProjectFactory.setBranch(TemplateDrivenBranchProjectFactory.java:104)
              at com.github.mjdetullio.jenkins.plugins.multibranch.FreeStyleBranchProjectFactory.newInstance(FreeStyleBranchProjectFactory.java:55)
              at com.github.mjdetullio.jenkins.plugins.multibranch.FreeStyleBranchProjectFactory.newInstance(FreeStyleBranchProjectFactory.java:38)
              at jenkins.branch.MultiBranchProject$SCMHeadObserverImpl.observe(MultiBranchProject.java:1972)
              at jenkins.plugins.git.AbstractGitSCMSource$2.run(AbstractGitSCMSource.java:315)
              at jenkins.plugins.git.AbstractGitSCMSource$2.run(AbstractGitSCMSource.java:239)
              at jenkins.plugins.git.AbstractGitSCMSource.doRetrieve(AbstractGitSCMSource.java:209)
              at jenkins.plugins.git.AbstractGitSCMSource.retrieve(AbstractGitSCMSource.java:239)
              at jenkins.scm.api.SCMSource._retrieve(SCMSource.java:300)
              at jenkins.scm.api.SCMSource.fetch(SCMSource.java:210)
              at jenkins.branch.MultiBranchProject.computeChildren(MultiBranchProject.java:634)
              at com.cloudbees.hudson.plugins.folder.computed.ComputedFolder.updateChildren(ComputedFolder.java:219)
              at com.cloudbees.hudson.plugins.folder.computed.FolderComputation.run(FolderComputation.java:141)
              at jenkins.branch.MultiBranchProject$BranchIndexing.run(MultiBranchProject.java:965)
              at hudson.model.ResourceController.execute(ResourceController.java:98)
              at hudson.model.Executor.run(Executor.java:404)
      

        Attachments

          Issue Links

            Activity

            markewaite Mark Waite created issue -
            markewaite Mark Waite made changes -
            Field Original Value New Value
            Description Initial scan of branches in a multi-branch-project fails with an NoSuchMethodError in the log file.

            Steps to duplicate the problem:
            # Clone, build, and run the docker instance
            {code}
              $ git clone https://github.com/MarkEWaite/docker JENKINS-xxx
              $ cd JENKINS-xxx
              $ git checkout -b lts-with-plugins 4dc4b070e072c452fbb6b42b28dae3445a9e20da # -t origin/lts-with-plugins
              $ docker build -t jenkins:JENKINS-xxx .
              $ docker run -i --rm --publish 8080:8080 jenkins:JENKINS-xxx
            {code}
            # Connect a web browser to that docker instance (http://localhost:8080)
            # Open the "Git Client Plugin Folder"
            # Open the "Git Client Branches - Maven" multi-branch job
            # Click the "Scan Project" link and then the "Run Now" link to start branch indexing
            # Scan will complete, but no projects will be created. Console log will report an error

            Log information is:

            {noformat}
            Feb 10, 2017 5:48:26 PM hudson.model.Executor finish1
            SEVERE: Executor threw an exception
            java.lang.NoSuchMethodError: jenkins.branch.MultiBranchProject.getRootDirFor(Lhudson/model/Job;)Ljava/io/File;
                    at com.github.mjdetullio.jenkins.plugins.multibranch.TemplateDrivenMultiBranchProject.getRootDirFor(TemplateDrivenMultiBranchProject.java:306)
                    at com.github.mjdetullio.jenkins.plugins.multibranch.TemplateDrivenMultiBranchProject.getRootDirFor(TemplateDrivenMultiBranchProject.java:89)
                    at hudson.model.AbstractItem.getRootDir(AbstractItem.java:177)
                    at hudson.model.Items.getConfigFile(Items.java:350)
                    at hudson.model.AbstractItem.getConfigFile(AbstractItem.java:506)
                    at hudson.model.AbstractItem.save(AbstractItem.java:501)
                    at hudson.model.Job.save(Job.java:186)
                    at hudson.model.AbstractProject.save(AbstractProject.java:306)
                    at hudson.BulkChange.commit(BulkChange.java:98)
                    at com.github.mjdetullio.jenkins.plugins.multibranch.TemplateDrivenBranchProjectFactory.setBranch(TemplateDrivenBranchProjectFactory.java:104)
                    at com.github.mjdetullio.jenkins.plugins.multibranch.FreeStyleBranchProjectFactory.newInstance(FreeStyleBranchProjectFactory.java:55)
                    at com.github.mjdetullio.jenkins.plugins.multibranch.FreeStyleBranchProjectFactory.newInstance(FreeStyleBranchProjectFactory.java:38)
                    at jenkins.branch.MultiBranchProject$SCMHeadObserverImpl.observe(MultiBranchProject.java:1972)
                    at jenkins.plugins.git.AbstractGitSCMSource$2.run(AbstractGitSCMSource.java:315)
                    at jenkins.plugins.git.AbstractGitSCMSource$2.run(AbstractGitSCMSource.java:239)
                    at jenkins.plugins.git.AbstractGitSCMSource.doRetrieve(AbstractGitSCMSource.java:209)
                    at jenkins.plugins.git.AbstractGitSCMSource.retrieve(AbstractGitSCMSource.java:239)
                    at jenkins.scm.api.SCMSource._retrieve(SCMSource.java:300)
                    at jenkins.scm.api.SCMSource.fetch(SCMSource.java:210)
                    at jenkins.branch.MultiBranchProject.computeChildren(MultiBranchProject.java:634)
                    at com.cloudbees.hudson.plugins.folder.computed.ComputedFolder.updateChildren(ComputedFolder.java:219)
                    at com.cloudbees.hudson.plugins.folder.computed.FolderComputation.run(FolderComputation.java:141)
                    at jenkins.branch.MultiBranchProject$BranchIndexing.run(MultiBranchProject.java:965)
                    at hudson.model.ResourceController.execute(ResourceController.java:98)
                    at hudson.model.Executor.run(Executor.java:404)

            {noformat}
            Initial scan of branches in a multi-branch-project fails with an NoSuchMethodError in the log file.

            Steps to duplicate the problem:
            # Clone, build, and run the docker instance
            {code}
              $ git clone https://github.com/MarkEWaite/docker JENKINS-41948
              $ cd JENKINS-41948
              $ git checkout -b lts-with-plugins 4dc4b070e072c452fbb6b42b28dae3445a9e20da
              $ docker build -t jenkins:JENKINS-41948 .
              $ docker run -i --rm --publish 8080:8080 jenkins:JENKINS-41948
            {code}
            # Connect a web browser to that docker instance (http://localhost:8080)
            # Open the "Git Client Plugin Folder"
            # Open the "Git Client Branches - Maven" multi-branch job
            # Click the "Scan Project" link and then the "Run Now" link to start branch indexing
            # Scan will complete, but no projects will be created. Console log will report an error

            Log information is:

            {noformat}
            Feb 10, 2017 5:48:26 PM hudson.model.Executor finish1
            SEVERE: Executor threw an exception
            java.lang.NoSuchMethodError: jenkins.branch.MultiBranchProject.getRootDirFor(Lhudson/model/Job;)Ljava/io/File;
                    at com.github.mjdetullio.jenkins.plugins.multibranch.TemplateDrivenMultiBranchProject.getRootDirFor(TemplateDrivenMultiBranchProject.java:306)
                    at com.github.mjdetullio.jenkins.plugins.multibranch.TemplateDrivenMultiBranchProject.getRootDirFor(TemplateDrivenMultiBranchProject.java:89)
                    at hudson.model.AbstractItem.getRootDir(AbstractItem.java:177)
                    at hudson.model.Items.getConfigFile(Items.java:350)
                    at hudson.model.AbstractItem.getConfigFile(AbstractItem.java:506)
                    at hudson.model.AbstractItem.save(AbstractItem.java:501)
                    at hudson.model.Job.save(Job.java:186)
                    at hudson.model.AbstractProject.save(AbstractProject.java:306)
                    at hudson.BulkChange.commit(BulkChange.java:98)
                    at com.github.mjdetullio.jenkins.plugins.multibranch.TemplateDrivenBranchProjectFactory.setBranch(TemplateDrivenBranchProjectFactory.java:104)
                    at com.github.mjdetullio.jenkins.plugins.multibranch.FreeStyleBranchProjectFactory.newInstance(FreeStyleBranchProjectFactory.java:55)
                    at com.github.mjdetullio.jenkins.plugins.multibranch.FreeStyleBranchProjectFactory.newInstance(FreeStyleBranchProjectFactory.java:38)
                    at jenkins.branch.MultiBranchProject$SCMHeadObserverImpl.observe(MultiBranchProject.java:1972)
                    at jenkins.plugins.git.AbstractGitSCMSource$2.run(AbstractGitSCMSource.java:315)
                    at jenkins.plugins.git.AbstractGitSCMSource$2.run(AbstractGitSCMSource.java:239)
                    at jenkins.plugins.git.AbstractGitSCMSource.doRetrieve(AbstractGitSCMSource.java:209)
                    at jenkins.plugins.git.AbstractGitSCMSource.retrieve(AbstractGitSCMSource.java:239)
                    at jenkins.scm.api.SCMSource._retrieve(SCMSource.java:300)
                    at jenkins.scm.api.SCMSource.fetch(SCMSource.java:210)
                    at jenkins.branch.MultiBranchProject.computeChildren(MultiBranchProject.java:634)
                    at com.cloudbees.hudson.plugins.folder.computed.ComputedFolder.updateChildren(ComputedFolder.java:219)
                    at com.cloudbees.hudson.plugins.folder.computed.FolderComputation.run(FolderComputation.java:141)
                    at jenkins.branch.MultiBranchProject$BranchIndexing.run(MultiBranchProject.java:965)
                    at hudson.model.ResourceController.execute(ResourceController.java:98)
                    at hudson.model.Executor.run(Executor.java:404)
            {noformat}
            markewaite Mark Waite made changes -
            Priority Minor [ 4 ] Critical [ 2 ]
            markewaite Mark Waite made changes -
            Component/s branch-api-plugin [ 18621 ]
            Component/s scm-api-plugin [ 18054 ]
            markewaite Mark Waite made changes -
            Assignee Matthew DeTullio [ mjdetullio ] Stephen Connolly [ stephenconnolly ]
            markewaite Mark Waite made changes -
            Link This issue blocks JENKINS-41867 [ JENKINS-41867 ]
            stephenconnolly Stephen Connolly made changes -
            Component/s branch-api-plugin [ 18621 ]
            Component/s scm-api-plugin [ 18054 ]
            stephenconnolly Stephen Connolly made changes -
            Assignee Stephen Connolly [ stephenconnolly ] Matthew DeTullio [ mjdetullio ]
            stephenconnolly Stephen Connolly made changes -
            Link This issue is related to JENKINS-41371 [ JENKINS-41371 ]
            stephenconnolly Stephen Connolly made changes -
            Remote Link This issue links to "PR#145 (Web Link)" [ 15435 ]
            stephenconnolly Stephen Connolly made changes -
            Link This issue is duplicated by JENKINS-41997 [ JENKINS-41997 ]
            mjdetullio Matthew DeTullio made changes -
            Resolution Fixed [ 1 ]
            Status Open [ 1 ] Resolved [ 5 ]
            markewaite Mark Waite made changes -
            Status Resolved [ 5 ] Closed [ 6 ]

              People

              Assignee:
              mjdetullio Matthew DeTullio
              Reporter:
              markewaite Mark Waite
              Votes:
              4 Vote for this issue
              Watchers:
              10 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: