#1271 java.lang.NoClassDefFoundError: org/objectweb/asm/tree/ClassNode

3.0.0
closed-fixed
None
5
2015-02-16
2014-04-26
No

I was experiencing the famous ArrayIndexOutOfBoundsException in org.objectweb.asm.ClassReader (bugs #1162, #1200, #1228) when analyzing 1.8 class files with the latest released version available (2.0.3), so I updated to 3.0.0.20140426-b7080eb nightly build. Now I'm experiencing the new problem with FindBugs Eclipse Plugin:

java.lang.NoClassDefFoundError: org/objectweb/asm/tree/ClassNode
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:760)
    at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.defineClass(DefaultClassLoader.java:188)
    at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.defineClassHoldingLock(ClasspathManager.java:638)
    at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.defineClass(ClasspathManager.java:613)
    at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findClassImpl(ClasspathManager.java:574)
    at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClassImpl(ClasspathManager.java:492)
    at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass(ClasspathManager.java:465)
    at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.findLocalClass(DefaultClassLoader.java:216)
    at org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.java:395)
    at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:464)
    at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:421)
    at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:412)
    at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:760)
    at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.defineClass(DefaultClassLoader.java:188)
    at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.defineClassHoldingLock(ClasspathManager.java:638)
    at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.defineClass(ClasspathManager.java:613)
    at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findClassImpl(ClasspathManager.java:574)
    at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClassImpl(ClasspathManager.java:492)
    at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass(ClasspathManager.java:465)
    at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.findLocalClass(DefaultClassLoader.java:216)
    at org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.java:395)
    at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:464)
    at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:421)
    at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:412)
    at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
    at edu.umd.cs.findbugs.PluginLoader.loadPluginComponents(PluginLoader.java:797)
    at edu.umd.cs.findbugs.PluginLoader.<init>(PluginLoader.java:398)
    at edu.umd.cs.findbugs.PluginLoader.loadCorePlugin(PluginLoader.java:1433)
    at edu.umd.cs.findbugs.PluginLoader.loadInitialPlugins(PluginLoader.java:1387)
    at edu.umd.cs.findbugs.PluginLoader.<clinit>(PluginLoader.java:154)
    at edu.umd.cs.findbugs.DetectorFactoryCollection.getCoreResource(DetectorFactoryCollection.java:362)
    at edu.umd.cs.findbugs.SystemProperties.loadPropertiesFromConfigFile(SystemProperties.java:77)
    at edu.umd.cs.findbugs.SystemProperties.<clinit>(SystemProperties.java:60)
    at edu.umd.cs.findbugs.DetectorFactoryCollection.<clinit>(DetectorFactoryCollection.java:63)
    at edu.umd.cs.findbugs.config.ProjectFilterSettings.<init>(ProjectFilterSettings.java:107)
    at edu.umd.cs.findbugs.config.ProjectFilterSettings.createDefault(ProjectFilterSettings.java:136)
    at edu.umd.cs.findbugs.config.UserPreferences.<init>(UserPreferences.java:140)
    at edu.umd.cs.findbugs.config.UserPreferences.createDefaultUserPreferences(UserPreferences.java:157)
    at de.tobject.findbugs.preferences.FindBugsPreferenceInitializer.createDefaultUserPreferences(FindBugsPreferenceInitializer.java:75)
    at de.tobject.findbugs.FindbugsPlugin.getWorkspacePreferences(FindbugsPlugin.java:945)
    at de.tobject.findbugs.FindbugsPlugin.getCorePreferences(FindbugsPlugin.java:890)
    at de.tobject.findbugs.FindbugsPlugin.getUserPreferences(FindbugsPlugin.java:969)
    at de.tobject.findbugs.builder.FindBugsWorker.<init>(FindBugsWorker.java:103)
    at de.tobject.findbugs.actions.FindBugsAction$StartedFromViewJob.runWithProgress(FindBugsAction.java:269)
    at de.tobject.findbugs.FindBugsJob.run(FindBugsJob.java:135)
    at org.eclipse.core.internal.jobs.Worker.run(Worker.java:53)
Caused by: java.lang.ClassNotFoundException: org.objectweb.asm.tree.ClassNode cannot be found by edu.umd.cs.findbugs.plugin.eclipse_3.0.0.20140426-b7080eb
    at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:501)
    at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:421)
    at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:412)
    at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
    ... 51 more

Session Data:

eclipse.buildId=4.3.2.M20140221-1700
java.version=1.8.0-ea
java.vendor=Oracle Corporation
BootLoader constants: OS=macosx, ARCH=x86_64, WS=cocoa, NL=en_US
Framework arguments:  -keyring /Users/ashcheglov/.eclipse_keyring -showlocation
Command-line arguments:  -os macosx -ws cocoa -arch x86_64 -keyring /Users/ashcheglov/.eclipse_keyring -showlocation

Now, the problem is not related to a project's target JDK version but rather the JVM version eclipse itself is running within. I'm getting the same error message for all kinds of java projects (not only those targeting java 1.8) for both Eclipse 4.3 and Eclipse 3.8 (the latter having no support for java 1.8).

Discussion

    • status: open --> closed-fixed
    • assigned_to: Andrey Loskutov
     
  • Thank you Andrey.

    I confirm the issue is resolved in version 3.0.0.20140427-0c3407e.