Col-E / Recaf

The modern Java bytecode editor
https://recaf.coley.software
MIT License
6.02k stars 465 forks source link

2.0.0-redesign.7 NoClassDefFoundError #202

Closed Enaium closed 4 years ago

Enaium commented 4 years ago
Exception in thread "main" java.lang.NoClassDefFoundError: me/coley/recaf/ui/component/ReflectivePropertySheet
        at java.lang.ClassLoader.defineClass1(Native Method)
        at java.lang.ClassLoader.defineClass(Unknown Source)
        at java.security.SecureClassLoader.defineClass(Unknown Source)
        at java.net.URLClassLoader.defineClass(Unknown Source)
        at java.net.URLClassLoader.access$100(Unknown Source)
        at java.net.URLClassLoader$1.run(Unknown Source)
        at java.net.URLClassLoader$1.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Unknown Source)
        at me.coley.recaf.plugin.PluginFolderSource.load(PluginFolderSource.java:69)
        at org.plugface.core.impl.DefaultPluginManager.loadPlugins(DefaultPluginManager.java:105)
        at me.coley.recaf.plugin.PluginsManager.load(PluginsManager.java:54)
        at me.coley.recaf.Recaf.main(Recaf.java:55)
Caused by: java.lang.ClassNotFoundException: me.coley.recaf.ui.component.ReflectivePropertySheet
        at java.net.URLClassLoader.findClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        ... 17 more
Col-E commented 4 years ago

Looks like your plugin depends on classes from Recaf 1.15 (me.coley.recaf.ui.component.ReflectivePropertySheet)

This won't work in 2.0.0 since those classes were removed.

The plugin will have to be updated to use the updated API.

Col-E commented 4 years ago

However the exception handling should catch Throwable and not Exception so it properly handles and doesn't terminate immediately.

https://github.com/Col-E/Recaf/blob/redesign/src/main/java/me/coley/recaf/Recaf.java#L61

Col-E commented 4 years ago

Closing as its not an issue internal to Recaf. The problem is the outdated/incompatible plugin.