java.lang.NoSuchMethodError: hudson.scm.SubversionSCM.getLocations(Lhudson/EnvVars;Lhudson/model/AbstractBuild;)[Lhudson/scm/SubversionSCM$ModuleLocation;

Jenkins JIRA | Anthony Mastrean | 11 months ago
  1. 0

    [JIRA] [svn-revert-plugin] (JENKINS-32308) NoSuchMethodError: hudson.scm.SubversionSCM.getLocations

    Google Groups | 11 months ago | anthony.mastrean@gmail.com (JIRA)
    java.lang.NoSuchMethodError: hudson.scm.SubversionSCM.getLocations(Lhudson/EnvVars;Lhudson/model/AbstractBuild;)[Lhudson/scm/SubversionSCM$ModuleLocation;
  2. 0

    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?

    Jenkins JIRA | 11 months ago | Anthony Mastrean
    java.lang.NoSuchMethodError: hudson.scm.SubversionSCM.getLocations(Lhudson/EnvVars;Lhudson/model/AbstractBuild;)[Lhudson/scm/SubversionSCM$ModuleLocation;
  3. 0

    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?

    Jenkins JIRA | 11 months ago | Anthony Mastrean
    java.lang.NoSuchMethodError: hudson.scm.SubversionSCM.getLocations(Lhudson/EnvVars;Lhudson/model/AbstractBuild;)[Lhudson/scm/SubversionSCM$ModuleLocation;
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    svnmerge plugin 2.4, jenkins 1.595, matrix-based access control (with additional boxes checked), single module. At the build step "Rebase with upstream Subversion revision" set to "Latest revision", I get the error: 13:24:06 [EnvInject] - Executing scripts and injecting environment variables after the SCM step. ... 13:24:06 [EnvInject] - Variables injected successfully. 13:24:06 FATAL: hudson.scm.SubversionSCM.createAuthenticationProvider(Lhudson/model/AbstractProject;Lhudson/scm/SubversionSCM$ModuleLocation;)Lorg/tmatesoft/svn/core/auth/ISVNAuthenticationProvider; 13:24:06 java.lang.NoSuchMethodError: hudson.scm.SubversionSCM.createAuthenticationProvider(Lhudson/model/AbstractProject;Lhudson/scm/SubversionSCM$ModuleLocation;)Lorg/tmatesoft/svn/core/auth/ISVNAuthenticationProvider; 13:24:06 at jenkins.plugins.svnmerge.FeatureBranchProperty.rebase(FeatureBranchProperty.java:162) 13:24:06 at jenkins.plugins.svnmerge.RebaseAction.perform(RebaseAction.java:115) 13:24:06 at jenkins.plugins.svnmerge.RebaseBuilder.perform(RebaseBuilder.java:50) 13:24:06 at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20) 13:24:06 at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:770) 13:24:06 at hudson.model.Build$BuildExecution.build(Build.java:199) 13:24:06 at hudson.model.Build$BuildExecution.doRun(Build.java:160) 13:24:06 at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:533) 13:24:06 at hudson.model.Run.execute(Run.java:1759) 13:24:06 at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) 13:24:06 at hudson.model.ResourceController.execute(ResourceController.java:89) 13:24:06 at hudson.model.Executor.run(Executor.java:240) I'm not sure what this error is telling me. The original sync from the feature branch worked flawlessly. It would appear that it's trying to do some new authentication for the merge, but it's not clear why it's not getting credentials to use. Wouldn't it just be using the credentials from the feature branch sync?

    Jenkins JIRA | 2 years ago | Greg Hansen
    java.lang.NoSuchMethodError: hudson.scm.SubversionSCM.createAuthenticationProvider(Lhudson/model/AbstractProject;Lhudson/scm/SubversionSCM$ModuleLocation;)Lorg/tmatesoft/svn/core/auth/ISVNAuthenticationProvider;
  6. 0

    When performing release staging on a MavenModuleSet, during the stage that the creation of a tag is performed, the following message is printed {noformat} [RELEASE] You are using an old subversion jenkins plugin, please consider upgrading. {noformat} I managed to get the stacktrace that determines the subversion plugin version: {code} java.lang.NoSuchMethodError: hudson.scm.SubversionSCM.createAuthenticationProvider(Lhudson/model/AbstractProject;Lhudson/scm/SubversionSCM$ModuleLocation;)Lorg/tmatesoft/ svn/core/auth/ISVNAuthenticationProvider; at org.jfrog.hudson.release.scm.svn.SubversionManager.getSvnAuthenticationProvider(SubversionManager.java:157) at org.jfrog.hudson.release.scm.svn.SubversionManager.createTag(SubversionManager.java:73) at org.jfrog.hudson.release.scm.svn.SubversionCoordinator.afterSuccessfulReleaseVersionBuild(SubversionCoordinator.java:49) at org.jfrog.hudson.release.maven.MavenReleaseWrapper$2.tearDown(MavenReleaseWrapper.java:177) at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.doRun(MavenModuleSetBuild.java:869) at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:537) at hudson.model.Run.execute(Run.java:1744) at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:529) at hudson.model.ResourceController.execute(ResourceController.java:98) at hudson.model.Executor.run(Executor.java:374) {code} When downgrading the subversion plugin to 2.0 the creation of the tag succeeds and the overall builds passes as expected

    JFrog JIRA | 2 years ago | Tomer Cohen
    java.lang.NoSuchMethodError: hudson.scm.SubversionSCM.createAuthenticationProvider(Lhudson/model/AbstractProject;Lhudson/scm/SubversionSCM$ModuleLocation;)Lorg/tmatesoft/ svn/core/auth/ISVNAuthenticationProvider;

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.NoSuchMethodError

      hudson.scm.SubversionSCM.getLocations(Lhudson/EnvVars;Lhudson/model/AbstractBuild;)[Lhudson/scm/SubversionSCM$ModuleLocation;

      at jenkins.plugins.svn_revert.ModuleFinder.getModules()
    2. jenkins.plugins.svn_revert
      JenkinsGlue.perform
      1. jenkins.plugins.svn_revert.ModuleFinder.getModules(ModuleFinder.java:29)
      2. jenkins.plugins.svn_revert.ChangeLocator.changedFilesMatchesModules(ChangeLocator.java:37)
      3. jenkins.plugins.svn_revert.ChangeLocator.changesOutsideWorkspace(ChangeLocator.java:29)
      4. jenkins.plugins.svn_revert.Bouncer.throwOutIfUnstable(Bouncer.java:46)
      5. jenkins.plugins.svn_revert.JenkinsGlue.perform(JenkinsGlue.java:52)
      5 frames
    3. Hudson
      Executor.run
      1. hudson.tasks.BuildStepMonitor$3.perform(BuildStepMonitor.java:45)
      2. hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:782)
      3. hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:723)
      4. hudson.model.Build$BuildExecution.post2(Build.java:185)
      5. hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:668)
      6. hudson.model.Run.execute(Run.java:1763)
      7. hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
      8. hudson.model.ResourceController.execute(ResourceController.java:98)
      9. hudson.model.Executor.run(Executor.java:410)
      9 frames