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

NoSuchMethodError: hudson.scm.SubversionSCM.getLocations

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • svn-revert-plugin
    • None
    • Jenkins 1.643
      Subversion Plugin 2.5.6
      Subversion Revert Plugin 1.3

      I was testing this plugin's capabilities. I configured a build that always returns unstable, just to see what happens. Except, the revert plugin throws an exception immediately.

      ERROR: Step ‘Reverts commits that breaks the build’ aborted due to exception: 
      java.lang.NoSuchMethodError: hudson.scm.SubversionSCM.getLocations(Lhudson/EnvVars;Lhudson/model/AbstractBuild;)[Lhudson/scm/SubversionSCM$ModuleLocation;
      	at jenkins.plugins.svn_revert.ModuleFinder.getModules(ModuleFinder.java:29)
      	at jenkins.plugins.svn_revert.ChangeLocator.changedFilesMatchesModules(ChangeLocator.java:37)
      	at jenkins.plugins.svn_revert.ChangeLocator.changesOutsideWorkspace(ChangeLocator.java:29)
      	at jenkins.plugins.svn_revert.Bouncer.throwOutIfUnstable(Bouncer.java:46)
      	at jenkins.plugins.svn_revert.JenkinsGlue.perform(JenkinsGlue.java:52)
      	at hudson.tasks.BuildStepMonitor$3.perform(BuildStepMonitor.java:45)
      	at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:782)
      	at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:723)
      	at hudson.model.Build$BuildExecution.post2(Build.java:185)
      	at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:668)
      	at hudson.model.Run.execute(Run.java:1763)
      	at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
      	at hudson.model.ResourceController.execute(ResourceController.java:98)
      	at hudson.model.Executor.run(Executor.java:410)
      

      I looked at the call site from the revert plugin

      subversionScm.getLocations(envVars, build)
      

      And the method and type signature match in the Subversion plugin classes.

      public ModuleLocation[] getLocations(EnvVars env, Run<?,?> build)
      

      I also checked that an AbstractBuild is a type of a Run, so that should be fine, right?

          [JENKINS-32308] NoSuchMethodError: hudson.scm.SubversionSCM.getLocations

          Anthony Mastrean created issue -
          Anthony Mastrean made changes -
          Description Original: I was testing this plugin's capabilities. I configured a build that always returns unstable, just to see what happens. Except, the revert plugin throws an exception immediately.

          {code}
          ERROR: Step ‘Reverts commits that breaks the build’ aborted due to exception:
          java.lang.NoSuchMethodError: hudson.scm.SubversionSCM.getLocations(Lhudson/EnvVars;Lhudson/model/AbstractBuild;)[Lhudson/scm/SubversionSCM$ModuleLocation;
          at jenkins.plugins.svn_revert.ModuleFinder.getModules(ModuleFinder.java:29)
          at jenkins.plugins.svn_revert.ChangeLocator.changedFilesMatchesModules(ChangeLocator.java:37)
          at jenkins.plugins.svn_revert.ChangeLocator.changesOutsideWorkspace(ChangeLocator.java:29)
          at jenkins.plugins.svn_revert.Bouncer.throwOutIfUnstable(Bouncer.java:46)
          at jenkins.plugins.svn_revert.JenkinsGlue.perform(JenkinsGlue.java:52)
          at hudson.tasks.BuildStepMonitor$3.perform(BuildStepMonitor.java:45)
          at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:782)
          at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:723)
          at hudson.model.Build$BuildExecution.post2(Build.java:185)
          at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:668)
          at hudson.model.Run.execute(Run.java:1763)
          at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
          at hudson.model.ResourceController.execute(ResourceController.java:98)
          at hudson.model.Executor.run(Executor.java:410)
          {code}

          I looked at the call site from the revert plugin

          {code}
          subversionScm.getLocations(envVars, build)
          {code}

          https://github.com/jenkinsci/svn-revert-plugin/blob/master/src/main/java/jenkins/plugins/svn_revert/ModuleFinder.java#L29

          And the method and type signature match in the Subversion plugin classes.

          {code}
          public ModuleLocation[] getLocations(EnvVars env, Run<?,?> build)
          {code}

          https://github.com/jenkinsci/subversion-plugin/blob/master/src/main/java/hudson/scm/SubversionSCM.java#L472

          And I checked that an AbstractBuild is a type of a Run, so that should be fine, right?

          http://javadoc.jenkins-ci.org/hudson/model/AbstractBuild.html
          New: I was testing this plugin's capabilities. I configured a build that always returns unstable, just to see what happens. Except, the revert plugin throws an exception immediately.

          {code}
          ERROR: Step ‘Reverts commits that breaks the build’ aborted due to exception:
          java.lang.NoSuchMethodError: hudson.scm.SubversionSCM.getLocations(Lhudson/EnvVars;Lhudson/model/AbstractBuild;)[Lhudson/scm/SubversionSCM$ModuleLocation;
          at jenkins.plugins.svn_revert.ModuleFinder.getModules(ModuleFinder.java:29)
          at jenkins.plugins.svn_revert.ChangeLocator.changedFilesMatchesModules(ChangeLocator.java:37)
          at jenkins.plugins.svn_revert.ChangeLocator.changesOutsideWorkspace(ChangeLocator.java:29)
          at jenkins.plugins.svn_revert.Bouncer.throwOutIfUnstable(Bouncer.java:46)
          at jenkins.plugins.svn_revert.JenkinsGlue.perform(JenkinsGlue.java:52)
          at hudson.tasks.BuildStepMonitor$3.perform(BuildStepMonitor.java:45)
          at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:782)
          at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:723)
          at hudson.model.Build$BuildExecution.post2(Build.java:185)
          at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:668)
          at hudson.model.Run.execute(Run.java:1763)
          at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
          at hudson.model.ResourceController.execute(ResourceController.java:98)
          at hudson.model.Executor.run(Executor.java:410)
          {code}

          I looked at the [call site|https://github.com/jenkinsci/svn-revert-plugin/blob/master/src/main/java/jenkins/plugins/svn_revert/ModuleFinder.java#L29] from the revert plugin

          {code}
          subversionScm.getLocations(envVars, build)
          {code}

          And the method and [type signature|https://github.com/jenkinsci/subversion-plugin/blob/master/src/main/java/hudson/scm/SubversionSCM.java#L472] match in the Subversion plugin classes.

          {code}
          public ModuleLocation[] getLocations(EnvVars env, Run<?,?> build)
          {code}

          I also checked that an [AbstractBuild|http://javadoc.jenkins-ci.org/hudson/model/AbstractBuild.html] is a type of a Run, so that should be fine, right?
          R. Tyler Croy made changes -
          Workflow Original: JNJira [ 167909 ] New: JNJira + In-Review [ 182894 ]
          David Pärsson made changes -
          Assignee Original: David Pärsson [ davidparsson ]

            Unassigned Unassigned
            anthonymastrean Anthony Mastrean
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: