java.lang.NoClassDefFoundError: org/spearce/jgit/lib/ObjectId

Jenkins JIRA | Giovanni Gargiulo | 4 years ago
tip
Do you find the tips below useful? Click on the to mark them and say thanks to Rafael Fischer Viola and rafael . Or join the community to write better ones.
  1. 0

    Using Jenkins 1.509 Jenkins GIT client plugin 1.0.5 Jenkins GIT plugin 1.3.0 Gerrit Trigger 2.9.0 The following error is thrown: Retriggered by user anonymous for Gerrit: http://172.18.48.95/1 Building in workspace /home/ggargiulo/.jenkins/workspace/destination-management-gerrit Checkout:destination-management-gerrit / /home/ggargiulo/.jenkins/workspace/destination-management-gerrit - hudson.remoting.LocalChannel@2a081f8f Using strategy: Gerrit-Plugin Fetching changes from 1 remote Git repository Fetching upstream changes from origin FATAL: org/spearce/jgit/lib/ObjectId java.lang.NoClassDefFoundError: org/spearce/jgit/lib/ObjectId at hudson.plugins.gerrit.buildchoosers.GerritBuildChooser.parseCommit(GerritBuildChooser.java:111) at hudson.plugins.gerrit.buildchoosers.GerritBuildChooser.sortRevList(GerritBuildChooser.java:90) at hudson.plugins.gerrit.buildchoosers.GerritBuildChooser.getCandidateRevisions(GerritBuildChooser.java:46) at hudson.plugins.git.util.BuildChooser.getCandidateRevisions(BuildChooser.java:81) at hudson.plugins.git.util.BuildChooser.getCandidateRevisions(BuildChooser.java:71) at hudson.plugins.git.GitSCM$2.invoke(GitSCM.java:1044) at hudson.plugins.git.GitSCM$2.invoke(GitSCM.java:942) at hudson.FilePath.act(FilePath.java:865) at hudson.FilePath.act(FilePath.java:838) at hudson.plugins.git.GitSCM.determineRevisionToBuild(GitSCM.java:942) at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1101) at hudson.model.AbstractProject.checkout(AbstractProject.java:1364) at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:670) at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:88) at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:575) at hudson.model.Run.execute(Run.java:1575) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:237) Caused by: java.lang.ClassNotFoundException: org.spearce.jgit.lib.ObjectId at java.net.URLClassLoader$1.run(URLClassLoader.java:202) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:190) at java.lang.ClassLoader.loadClass(ClassLoader.java:306) at java.lang.ClassLoader.loadClass(ClassLoader.java:247) ... 19 more

    Jenkins JIRA | 4 years ago | Giovanni Gargiulo
    java.lang.NoClassDefFoundError: org/spearce/jgit/lib/ObjectId
  2. 0

    Using Jenkins 1.509 Jenkins GIT client plugin 1.0.5 Jenkins GIT plugin 1.3.0 Gerrit Trigger 2.9.0 The following error is thrown: Retriggered by user anonymous for Gerrit: http://172.18.48.95/1 Building in workspace /home/ggargiulo/.jenkins/workspace/destination-management-gerrit Checkout:destination-management-gerrit / /home/ggargiulo/.jenkins/workspace/destination-management-gerrit - hudson.remoting.LocalChannel@2a081f8f Using strategy: Gerrit-Plugin Fetching changes from 1 remote Git repository Fetching upstream changes from origin FATAL: org/spearce/jgit/lib/ObjectId java.lang.NoClassDefFoundError: org/spearce/jgit/lib/ObjectId at hudson.plugins.gerrit.buildchoosers.GerritBuildChooser.parseCommit(GerritBuildChooser.java:111) at hudson.plugins.gerrit.buildchoosers.GerritBuildChooser.sortRevList(GerritBuildChooser.java:90) at hudson.plugins.gerrit.buildchoosers.GerritBuildChooser.getCandidateRevisions(GerritBuildChooser.java:46) at hudson.plugins.git.util.BuildChooser.getCandidateRevisions(BuildChooser.java:81) at hudson.plugins.git.util.BuildChooser.getCandidateRevisions(BuildChooser.java:71) at hudson.plugins.git.GitSCM$2.invoke(GitSCM.java:1044) at hudson.plugins.git.GitSCM$2.invoke(GitSCM.java:942) at hudson.FilePath.act(FilePath.java:865) at hudson.FilePath.act(FilePath.java:838) at hudson.plugins.git.GitSCM.determineRevisionToBuild(GitSCM.java:942) at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1101) at hudson.model.AbstractProject.checkout(AbstractProject.java:1364) at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:670) at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:88) at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:575) at hudson.model.Run.execute(Run.java:1575) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:237) Caused by: java.lang.ClassNotFoundException: org.spearce.jgit.lib.ObjectId at java.net.URLClassLoader$1.run(URLClassLoader.java:202) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:190) at java.lang.ClassLoader.loadClass(ClassLoader.java:306) at java.lang.ClassLoader.loadClass(ClassLoader.java:247) ... 19 more

    Jenkins JIRA | 4 years ago | Giovanni Gargiulo
    java.lang.NoClassDefFoundError: org/spearce/jgit/lib/ObjectId
  3. 0
    samebug tip
    A few things cause this exception: 1) Check if you have all jars and if they're in the correct path when running. 2) Your classpath might be broken, you can define it in the command line with "java -cp yourClassPath" or at your IDE if you're using one.
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0
    samebug tip
    If you're using Hibernate, this indicates you're missing FasterXML Classmate dependency, which you can add to your dependencies. To add it, the groupId is com.fasterxml and artifactId is Classmate.
  6. 0
    samebug tip
    Check if you didn't forget to instantiate your topic in the kafka broker.
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.ClassNotFoundException

    org.spearce.jgit.lib.ObjectId

    at java.net.URLClassLoader$1.run()
  2. Java RT
    ClassLoader.loadClass
    1. java.net.URLClassLoader$1.run(URLClassLoader.java:202)
    2. java.security.AccessController.doPrivileged(Native Method)
    3. java.net.URLClassLoader.findClass(URLClassLoader.java:190)
    4. java.lang.ClassLoader.loadClass(ClassLoader.java:306)
    5. java.lang.ClassLoader.loadClass(ClassLoader.java:247)
    5 frames
  3. hudson.plugins.gerrit
    GerritBuildChooser.getCandidateRevisions
    1. hudson.plugins.gerrit.buildchoosers.GerritBuildChooser.parseCommit(GerritBuildChooser.java:111)
    2. hudson.plugins.gerrit.buildchoosers.GerritBuildChooser.sortRevList(GerritBuildChooser.java:90)
    3. hudson.plugins.gerrit.buildchoosers.GerritBuildChooser.getCandidateRevisions(GerritBuildChooser.java:46)
    3 frames
  4. Hudson GIT plugin
    GitSCM$2.invoke
    1. hudson.plugins.git.util.BuildChooser.getCandidateRevisions(BuildChooser.java:81)
    2. hudson.plugins.git.util.BuildChooser.getCandidateRevisions(BuildChooser.java:71)
    3. hudson.plugins.git.GitSCM$2.invoke(GitSCM.java:1044)
    4. hudson.plugins.git.GitSCM$2.invoke(GitSCM.java:942)
    4 frames
  5. Hudson
    FilePath.act
    1. hudson.FilePath.act(FilePath.java:865)
    2. hudson.FilePath.act(FilePath.java:838)
    2 frames
  6. Hudson GIT plugin
    GitSCM.checkout
    1. hudson.plugins.git.GitSCM.determineRevisionToBuild(GitSCM.java:942)
    2. hudson.plugins.git.GitSCM.checkout(GitSCM.java:1101)
    2 frames
  7. Hudson
    AbstractBuild$AbstractBuildExecution.defaultCheckout
    1. hudson.model.AbstractProject.checkout(AbstractProject.java:1364)
    2. hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:670)
    2 frames
  8. jenkins.scm
    SCMCheckoutStrategy.checkout
    1. jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:88)
    1 frame
  9. Hudson
    Executor.run
    1. hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:575)
    2. hudson.model.Run.execute(Run.java:1575)
    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