java.lang.NoClassDefFoundError: org/apache/bcel/classfile/Code

Jenkins JIRA | romos | 7 years 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

    findbugs plugin fails to parse reports that contain warnings of thirdparty extensions of findbugs-plugins, see the fb-contrib package, but also other thirdparty detectors fail. As a workaround we still use findbugs ver. 3.13 which has no problems. (We add custom messages to the fb-contrib-messages.xml and this seems work ok) Our reports are generated by ant version 1.7.1 / findbugs 1.3.9. The fb-contrib is a plugin inside findbugs plugin folder and are automatically added to reports. Exception: [FINDBUGS] Collecting findbugs analysis files... FATAL: org/apache/bcel/classfile/Code java.lang.NoClassDefFoundError: org/apache/bcel/classfile/Code at java.lang.Class.getDeclaredMethods0(Native Method) at java.lang.Class.privateGetDeclaredMethods(Class.java:2427) at java.lang.Class.getDeclaredMethod(Class.java:1935) at edu.umd.cs.findbugs.DetectorFactory$ReflectionDetectorCreator.<init>(DetectorFactory.java:54) at edu.umd.cs.findbugs.DetectorFactory.<init>(DetectorFactory.java:135) at edu.umd.cs.findbugs.PluginLoader.init(PluginLoader.java:329) at edu.umd.cs.findbugs.PluginLoader.getPlugin(PluginLoader.java:135) at edu.umd.cs.findbugs.DetectorFactoryCollection.loadPlugin(DetectorFactoryCollection.java:448) at edu.umd.cs.findbugs.DetectorFactoryCollection.loadPlugins(DetectorFactoryCollection.java:333) at edu.umd.cs.findbugs.DetectorFactoryCollection.ensureLoaded(DetectorFactoryCollection.java:296) at edu.umd.cs.findbugs.DetectorFactoryCollection.instance(DetectorFactoryCollection.java:116) at edu.umd.cs.findbugs.I18N.lookupBugPattern(I18N.java:92) at edu.umd.cs.findbugs.BugInstance.<init>(BugInstance.java:159) at edu.umd.cs.findbugs.SAXBugCollectionHandler.startElement(SAXBugCollectionHandler.java:202) at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(AbstractSAXParser.java:501) at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(XMLNSDocumentScannerImpl.java:400) at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2755) at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:648) at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:140) at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:511) at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:808) at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:737) at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:119) at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1205) at edu.umd.cs.findbugs.SortedBugCollection.doReadXML(SortedBugCollection.java:286) at edu.umd.cs.findbugs.SortedBugCollection.readXML(SortedBugCollection.java:263) at hudson.plugins.findbugs.parser.FindBugsParser.parse(FindBugsParser.java:193) at hudson.plugins.findbugs.parser.FindBugsParser.parse(FindBugsParser.java:129) at hudson.plugins.findbugs.parser.FindBugsParser.parse(FindBugsParser.java:89) at hudson.plugins.analysis.core.FilesParser.parseFile(FilesParser.java:197) at hudson.plugins.analysis.core.FilesParser.parseFiles(FilesParser.java:176) at hudson.plugins.analysis.core.FilesParser.invoke(FilesParser.java:126) at hudson.plugins.analysis.core.FilesParser.invoke(FilesParser.java:29) at hudson.FilePath.act(FilePath.java:753) at hudson.FilePath.act(FilePath.java:735) at hudson.plugins.findbugs.FindBugsPublisher.perform(FindBugsPublisher.java:103) at hudson.plugins.analysis.core.HealthAwarePublisher.perform(HealthAwarePublisher.java:208) at hudson.tasks.BuildStepMonitor$2.perform(BuildStepMonitor.java:27) at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:601) at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:580) at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:558) at hudson.model.Build$RunnerImpl.post2(Build.java:158) at hudson.model.AbstractBuild$AbstractRunner.post(AbstractBuild.java:528) at hudson.model.Run.run(Run.java:1271) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:129) Caused by: java.lang.ClassNotFoundException: org.apache.bcel.classfile.Code 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:307) at java.lang.ClassLoader.loadClass(ClassLoader.java:248) ... 47 more

    Jenkins JIRA | 7 years ago | romos
    java.lang.NoClassDefFoundError: org/apache/bcel/classfile/Code
  2. 0

    findbugs plugin fails to parse reports that contain warnings of thirdparty extensions of findbugs-plugins, see the fb-contrib package, but also other thirdparty detectors fail. As a workaround we still use findbugs ver. 3.13 which has no problems. (We add custom messages to the fb-contrib-messages.xml and this seems work ok) Our reports are generated by ant version 1.7.1 / findbugs 1.3.9. The fb-contrib is a plugin inside findbugs plugin folder and are automatically added to reports. Exception: [FINDBUGS] Collecting findbugs analysis files... FATAL: org/apache/bcel/classfile/Code java.lang.NoClassDefFoundError: org/apache/bcel/classfile/Code at java.lang.Class.getDeclaredMethods0(Native Method) at java.lang.Class.privateGetDeclaredMethods(Class.java:2427) at java.lang.Class.getDeclaredMethod(Class.java:1935) at edu.umd.cs.findbugs.DetectorFactory$ReflectionDetectorCreator.<init>(DetectorFactory.java:54) at edu.umd.cs.findbugs.DetectorFactory.<init>(DetectorFactory.java:135) at edu.umd.cs.findbugs.PluginLoader.init(PluginLoader.java:329) at edu.umd.cs.findbugs.PluginLoader.getPlugin(PluginLoader.java:135) at edu.umd.cs.findbugs.DetectorFactoryCollection.loadPlugin(DetectorFactoryCollection.java:448) at edu.umd.cs.findbugs.DetectorFactoryCollection.loadPlugins(DetectorFactoryCollection.java:333) at edu.umd.cs.findbugs.DetectorFactoryCollection.ensureLoaded(DetectorFactoryCollection.java:296) at edu.umd.cs.findbugs.DetectorFactoryCollection.instance(DetectorFactoryCollection.java:116) at edu.umd.cs.findbugs.I18N.lookupBugPattern(I18N.java:92) at edu.umd.cs.findbugs.BugInstance.<init>(BugInstance.java:159) at edu.umd.cs.findbugs.SAXBugCollectionHandler.startElement(SAXBugCollectionHandler.java:202) at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(AbstractSAXParser.java:501) at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(XMLNSDocumentScannerImpl.java:400) at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2755) at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:648) at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:140) at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:511) at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:808) at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:737) at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:119) at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1205) at edu.umd.cs.findbugs.SortedBugCollection.doReadXML(SortedBugCollection.java:286) at edu.umd.cs.findbugs.SortedBugCollection.readXML(SortedBugCollection.java:263) at hudson.plugins.findbugs.parser.FindBugsParser.parse(FindBugsParser.java:193) at hudson.plugins.findbugs.parser.FindBugsParser.parse(FindBugsParser.java:129) at hudson.plugins.findbugs.parser.FindBugsParser.parse(FindBugsParser.java:89) at hudson.plugins.analysis.core.FilesParser.parseFile(FilesParser.java:197) at hudson.plugins.analysis.core.FilesParser.parseFiles(FilesParser.java:176) at hudson.plugins.analysis.core.FilesParser.invoke(FilesParser.java:126) at hudson.plugins.analysis.core.FilesParser.invoke(FilesParser.java:29) at hudson.FilePath.act(FilePath.java:753) at hudson.FilePath.act(FilePath.java:735) at hudson.plugins.findbugs.FindBugsPublisher.perform(FindBugsPublisher.java:103) at hudson.plugins.analysis.core.HealthAwarePublisher.perform(HealthAwarePublisher.java:208) at hudson.tasks.BuildStepMonitor$2.perform(BuildStepMonitor.java:27) at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:601) at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:580) at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:558) at hudson.model.Build$RunnerImpl.post2(Build.java:158) at hudson.model.AbstractBuild$AbstractRunner.post(AbstractBuild.java:528) at hudson.model.Run.run(Run.java:1271) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:129) Caused by: java.lang.ClassNotFoundException: org.apache.bcel.classfile.Code 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:307) at java.lang.ClassLoader.loadClass(ClassLoader.java:248) ... 47 more

    Jenkins JIRA | 7 years ago | romos
    java.lang.NoClassDefFoundError: org/apache/bcel/classfile/Code
  3. 0

    git exception in jenkins.log (java.lang.NoClassDefFoundError: org/spearce/jgit/lib/ObjectId)

    Google Groups | 6 years ago | Eyal Edri
    java.lang.NoClassDefFoundError: org/spearce/jgit/lib/ObjectId
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    GitHub comment 2166#174192944

    GitHub | 1 year ago | karlicoss
    java.lang.NoClassDefFoundError: javax/microedition/khronos/opengles/GL
  6. 0

    Robolectric fails to run tests with google play services (maps)

    Stack Overflow | 4 years ago | alex
    java.lang.NoClassDefFoundError: com/google/android/gms/maps/model/LatLng

    8 unregistered visitors
    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.apache.bcel.classfile.Code

      at java.net.URLClassLoader$1.run()
    2. Java RT
      Class.getDeclaredMethod
      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:307)
      5. java.lang.ClassLoader.loadClass(ClassLoader.java:248)
      6. java.lang.Class.getDeclaredMethods0(Native Method)
      7. java.lang.Class.privateGetDeclaredMethods(Class.java:2427)
      8. java.lang.Class.getDeclaredMethod(Class.java:1935)
      8 frames
    3. jOpenDocument
      SAXBugCollectionHandler.startElement
      1. edu.umd.cs.findbugs.DetectorFactory$ReflectionDetectorCreator.<init>(DetectorFactory.java:54)
      2. edu.umd.cs.findbugs.DetectorFactory.<init>(DetectorFactory.java:135)
      3. edu.umd.cs.findbugs.PluginLoader.init(PluginLoader.java:329)
      4. edu.umd.cs.findbugs.PluginLoader.getPlugin(PluginLoader.java:135)
      5. edu.umd.cs.findbugs.DetectorFactoryCollection.loadPlugin(DetectorFactoryCollection.java:448)
      6. edu.umd.cs.findbugs.DetectorFactoryCollection.loadPlugins(DetectorFactoryCollection.java:333)
      7. edu.umd.cs.findbugs.DetectorFactoryCollection.ensureLoaded(DetectorFactoryCollection.java:296)
      8. edu.umd.cs.findbugs.DetectorFactoryCollection.instance(DetectorFactoryCollection.java:116)
      9. edu.umd.cs.findbugs.I18N.lookupBugPattern(I18N.java:92)
      10. edu.umd.cs.findbugs.BugInstance.<init>(BugInstance.java:159)
      11. edu.umd.cs.findbugs.SAXBugCollectionHandler.startElement(SAXBugCollectionHandler.java:202)
      11 frames
    4. Java RT
      AbstractSAXParser.parse
      1. com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(AbstractSAXParser.java:501)
      2. com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(XMLNSDocumentScannerImpl.java:400)
      3. com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2755)
      4. com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:648)
      5. com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:140)
      6. com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:511)
      7. com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:808)
      8. com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:737)
      9. com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:119)
      10. com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1205)
      10 frames
    5. jOpenDocument
      SortedBugCollection.readXML
      1. edu.umd.cs.findbugs.SortedBugCollection.doReadXML(SortedBugCollection.java:286)
      2. edu.umd.cs.findbugs.SortedBugCollection.readXML(SortedBugCollection.java:263)
      2 frames
    6. hudson.plugins.findbugs
      FindBugsParser.parse
      1. hudson.plugins.findbugs.parser.FindBugsParser.parse(FindBugsParser.java:193)
      2. hudson.plugins.findbugs.parser.FindBugsParser.parse(FindBugsParser.java:129)
      3. hudson.plugins.findbugs.parser.FindBugsParser.parse(FindBugsParser.java:89)
      3 frames
    7. Static Analysis Utilities
      FilesParser.invoke
      1. hudson.plugins.analysis.core.FilesParser.parseFile(FilesParser.java:197)
      2. hudson.plugins.analysis.core.FilesParser.parseFiles(FilesParser.java:176)
      3. hudson.plugins.analysis.core.FilesParser.invoke(FilesParser.java:126)
      4. hudson.plugins.analysis.core.FilesParser.invoke(FilesParser.java:29)
      4 frames
    8. Hudson
      FilePath.act
      1. hudson.FilePath.act(FilePath.java:753)
      2. hudson.FilePath.act(FilePath.java:735)
      2 frames
    9. hudson.plugins.findbugs
      FindBugsPublisher.perform
      1. hudson.plugins.findbugs.FindBugsPublisher.perform(FindBugsPublisher.java:103)
      1 frame
    10. Static Analysis Utilities
      HealthAwarePublisher.perform
      1. hudson.plugins.analysis.core.HealthAwarePublisher.perform(HealthAwarePublisher.java:208)
      1 frame
    11. Hudson
      Executor.run
      1. hudson.tasks.BuildStepMonitor$2.perform(BuildStepMonitor.java:27)
      2. hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:601)
      3. hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:580)
      4. hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:558)
      5. hudson.model.Build$RunnerImpl.post2(Build.java:158)
      6. hudson.model.AbstractBuild$AbstractRunner.post(AbstractBuild.java:528)
      7. hudson.model.Run.run(Run.java:1271)
      8. hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
      9. hudson.model.ResourceController.execute(ResourceController.java:88)
      10. hudson.model.Executor.run(Executor.java:129)
      10 frames