java.lang.ClassCastException: org.jenkinsci.plugins.gitclient.CliGitAPIImpl cannot be cast to hudson.plugins.git.GitAPI

Jenkins JIRA | rere rere | 4 years ago
tip
Click on the to mark the solution that helps you, Samebug will learn from it.
As a community member, you’ll be rewarded for you help.
  1. 0

    A build triggered with the gerrit-trigger plugin failed with the following output: FATAL: org.jenkinsci.plugins.gitclient.CliGitAPIImpl cannot be cast to hudson.plugins.git.GitAPI java.lang.ClassCastException: org.jenkinsci.plugins.gitclient.CliGitAPIImpl cannot be cast to hudson.plugins.git.GitAPI at com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.GerritTriggerBuildChooser.getFirstParent(GerritTriggerBuildChooser.java:107) at com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.GerritTriggerBuildChooser.prevBuildForChangelog(GerritTriggerBuildChooser.java:79) at hudson.plugins.git.util.BuildChooser.prevBuildForChangelog(BuildChooser.java:114) at hudson.plugins.git.GitSCM.computeChangeLog(GitSCM.java:1286) at hudson.plugins.git.GitSCM.access$1500(GitSCM.java:57) at hudson.plugins.git.GitSCM$4.invoke(GitSCM.java:1234) at hudson.plugins.git.GitSCM$4.invoke(GitSCM.java:1192) at hudson.FilePath.act(FilePath.java:865) at hudson.FilePath.act(FilePath.java:838) at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1192) at hudson.model.AbstractProject.checkout(AbstractProject.java:1342) at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:683) at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:88) at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:588) at hudson.model.Run.execute(Run.java:1568) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:237)

    Jenkins JIRA | 4 years ago | rere rere
    java.lang.ClassCastException: org.jenkinsci.plugins.gitclient.CliGitAPIImpl cannot be cast to hudson.plugins.git.GitAPI
  2. 0

    A build triggered with the gerrit-trigger plugin failed with the following output: FATAL: org.jenkinsci.plugins.gitclient.CliGitAPIImpl cannot be cast to hudson.plugins.git.GitAPI java.lang.ClassCastException: org.jenkinsci.plugins.gitclient.CliGitAPIImpl cannot be cast to hudson.plugins.git.GitAPI at com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.GerritTriggerBuildChooser.getFirstParent(GerritTriggerBuildChooser.java:107) at com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.GerritTriggerBuildChooser.prevBuildForChangelog(GerritTriggerBuildChooser.java:79) at hudson.plugins.git.util.BuildChooser.prevBuildForChangelog(BuildChooser.java:114) at hudson.plugins.git.GitSCM.computeChangeLog(GitSCM.java:1286) at hudson.plugins.git.GitSCM.access$1500(GitSCM.java:57) at hudson.plugins.git.GitSCM$4.invoke(GitSCM.java:1234) at hudson.plugins.git.GitSCM$4.invoke(GitSCM.java:1192) at hudson.FilePath.act(FilePath.java:865) at hudson.FilePath.act(FilePath.java:838) at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1192) at hudson.model.AbstractProject.checkout(AbstractProject.java:1342) at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:683) at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:88) at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:588) at hudson.model.Run.execute(Run.java:1568) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:237)

    Jenkins JIRA | 4 years ago | rere rere
    java.lang.ClassCastException: org.jenkinsci.plugins.gitclient.CliGitAPIImpl cannot be cast to hudson.plugins.git.GitAPI

    Root Cause Analysis

    1. java.lang.ClassCastException

      org.jenkinsci.plugins.gitclient.CliGitAPIImpl cannot be cast to hudson.plugins.git.GitAPI

      at com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.GerritTriggerBuildChooser.getFirstParent()
    2. com.sonyericsson.hudson
      GerritTriggerBuildChooser.prevBuildForChangelog
      1. com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.GerritTriggerBuildChooser.getFirstParent(GerritTriggerBuildChooser.java:107)
      2. com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.GerritTriggerBuildChooser.prevBuildForChangelog(GerritTriggerBuildChooser.java:79)
      2 frames
    3. Hudson GIT plugin
      GitSCM$4.invoke
      1. hudson.plugins.git.util.BuildChooser.prevBuildForChangelog(BuildChooser.java:114)
      2. hudson.plugins.git.GitSCM.computeChangeLog(GitSCM.java:1286)
      3. hudson.plugins.git.GitSCM.access$1500(GitSCM.java:57)
      4. hudson.plugins.git.GitSCM$4.invoke(GitSCM.java:1234)
      5. hudson.plugins.git.GitSCM$4.invoke(GitSCM.java:1192)
      5 frames
    4. Hudson
      FilePath.act
      1. hudson.FilePath.act(FilePath.java:865)
      2. hudson.FilePath.act(FilePath.java:838)
      2 frames
    5. Hudson GIT plugin
      GitSCM.checkout
      1. hudson.plugins.git.GitSCM.checkout(GitSCM.java:1192)
      1 frame
    6. Hudson
      AbstractBuild$AbstractBuildExecution.defaultCheckout
      1. hudson.model.AbstractProject.checkout(AbstractProject.java:1342)
      2. hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:683)
      2 frames
    7. jenkins.scm
      SCMCheckoutStrategy.checkout
      1. jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:88)
      1 frame
    8. Hudson
      Executor.run
      1. hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:588)
      2. hudson.model.Run.execute(Run.java:1568)
      3. hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
      4. hudson.model.ResourceController.execute(ResourceController.java:88)
      5. hudson.model.Executor.run(Executor.java:237)
      5 frames