java.lang.NoSuchMethodError: com.google.gerrit.extensions.api.changes.RevisionApi.verifyStatus()Lcom/google/gerrit/extensions/api/changes/VerifyStatusApi;

Jenkins JIRA | Khai Do | 6 months ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    I'm developing a plugin (https://github.com/zaro0508/verify-status-reporter) on my MAC. When I debug and run this plugin using hpi:run it works fine. When I run jenkins with `java -jar jenkins.war` install the plugin then I get a runtime error (java.lang.NoSuchMethodError). This error happens on my MAC. However when I run it the exact same way on Ubuntu Xenial `java -jar jenkins.war` then it work fine. I think there's something screwy with the classloading on OSX. I notice the error will not happen if I depend on the Jenkins plugin parent pom ver 1.580.1 but when I switch to ver 2.7 to match the Gerrit trigger plugin the problem happens. The dependency is looks like this.. <parent> <groupId>org.jenkins-ci.plugins</groupId> <artifactId>plugin</artifactId> <version>2.7</version> <relativePath /> </parent> here is the stack trace.. INFO: All Builds are completed for cause: GerritCause: com.sonymobile.tools.gerrit.gerritevents.dto.events.CommentAdded@704e521 silent: false Sep 02, 2016 10:49:23 AM hudson.model.AbstractBuild$AbstractBuildExecution reportError WARNING: Step ‘Post Verification to Gerrit’ aborted due to exception: java.lang.NoSuchMethodError: com.google.gerrit.extensions.api.changes.RevisionApi.verifyStatus()Lcom/google/gerrit/extensions/api/changes/VerifyStatusApi; at org.jenkinsci.plugins.verifystatus.VerificationsPublisher.perform(VerificationsPublisher.java:174) at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20) at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:785) at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:726) at hudson.model.Build$BuildExecution.cleanUp(Build.java:195) at hudson.model.Run.execute(Run.java:1788) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) at hudson.model.ResourceController.execute(ResourceController.java:98) at hudson.model.Executor.run(Executor.java:408)

    Jenkins JIRA | 6 months ago | Khai Do
    java.lang.NoSuchMethodError: com.google.gerrit.extensions.api.changes.RevisionApi.verifyStatus()Lcom/google/gerrit/extensions/api/changes/VerifyStatusApi;
  2. 0

    [JIRA] (JENKINS-37946) java.lang.NoSuchMethodError on OSX

    Google Groups | 6 months ago | zaro...@gmail.com (JIRA)
    java.lang.NoSuchMethodError: com.google.gerrit.extensions.api.changes.RevisionApi.verifyStatus()Lcom/google/gerrit/extensions/api/changes/VerifyStatusApi;

    Root Cause Analysis

    1. java.lang.NoSuchMethodError

      com.google.gerrit.extensions.api.changes.RevisionApi.verifyStatus()Lcom/google/gerrit/extensions/api/changes/VerifyStatusApi;

      at org.jenkinsci.plugins.verifystatus.VerificationsPublisher.perform()
    2. org.jenkinsci.plugins
      VerificationsPublisher.perform
      1. org.jenkinsci.plugins.verifystatus.VerificationsPublisher.perform(VerificationsPublisher.java:174)
      1 frame
    3. Hudson
      Executor.run
      1. hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
      2. hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:785)
      3. hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:726)
      4. hudson.model.Build$BuildExecution.cleanUp(Build.java:195)
      5. hudson.model.Run.execute(Run.java:1788)
      6. hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
      7. hudson.model.ResourceController.execute(ResourceController.java:98)
      8. hudson.model.Executor.run(Executor.java:408)
      8 frames