GhidraJupyter/ghidra-jupyter-kotlin

Error initializing the plugin: java.lang.NoSuchMethodError: 'boolean docking.action.DockingAction.setEnabled(boolean)'

rolandrille opened this issue · 7 comments

After installing the plugin i got the following issue, i tried the Amazon Coretto JDK as well as the AdoptOpenJDK.
Any ideas what's missing in my classpath or where i can get it?

2020-12-08 10:19:19 ERROR (PluginUtils) Unexpected Exception: 'boolean docking.action.DockingAction.setEnabled(boolean)' java.lang.NoSuchMethodError: 'boolean docking.action.DockingAction.setEnabled(boolean)'
      at GhidraJupyterKotlin.JupyterKotlinPlugin.(JupyterKotlinPlugin.java:70)
      at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
      at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
      at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
      at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490)
      at ghidra.framework.plugintool.util.PluginUtils.instantiatePlugin(PluginUtils.java:184)
      at ghidra.framework.plugintool.PluginManager.addPlugins(PluginManager.java:100)
      at ghidra.framework.plugintool.PluginTool.addPlugins(PluginTool.java:819)
      at ghidra.framework.plugintool.PluginConfigurationModel.addAllPlugins(PluginConfigurationModel.java:180)
      at ghidra.framework.plugintool.dialog.PluginManagerComponent$PluginPackageComponent.checkBoxClicked(PluginManagerComponent.java:180)
      at ghidra.framework.plugintool.dialog.PluginManagerComponent$PluginPackageComponent.lambda$initizalizeCheckBoxSection$0(PluginManagerComponent.java:103)
      at java.desktop/javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1967)
      at java.desktop/javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2308)
      at java.desktop/javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:405)
      at java.desktop/javax.swing.JToggleButton$ToggleButtonModel.setPressed(JToggleButton.java:401)
      at java.desktop/javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:279)
      at java.desktop/java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:297)
      at java.desktop/java.awt.Component.processMouseEvent(Component.java:6635)
      at java.desktop/javax.swing.JComponent.processMouseEvent(JComponent.java:3342)
      at java.desktop/java.awt.Component.processEvent(Component.java:6400)
      at java.desktop/java.awt.Container.processEvent(Container.java:2263)
      at java.desktop/java.awt.Component.dispatchEventImpl(Component.java:5011)
      at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2321)
      at java.desktop/java.awt.Component.dispatchEvent(Component.java:4843)
      at java.desktop/java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4918)
      at java.desktop/java.awt.LightweightDispatcher.processMouseEvent(Container.java:4547)
      at java.desktop/java.awt.LightweightDispatcher.dispatchEvent(Container.java:4488)
      at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2307)
      at java.desktop/java.awt.Window.dispatchEventImpl(Window.java:2772)
      at java.desktop/java.awt.Component.dispatchEvent(Component.java:4843)
      at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:772)
      at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:721)
      at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:715)
      at java.base/java.security.AccessController.doPrivileged(Native Method)
      at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
      at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:95)
      at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:745)
      at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:743)
      at java.base/java.security.AccessController.doPrivileged(Native Method)
      at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
      at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:742)
      at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
      at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
      at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
      at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
      at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
      at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)
       
2020-12-08 10:19:19 ERROR (PluginConfigurationModel) Error Loading Plugin(s) : Error constructing plugin: class GhidraJupyterKotlin.JupyterKotlinPlugin ghidra.framework.plugintool.util.PluginException: Error constructing plugin: class GhidraJupyterKotlin.JupyterKotlinPlugin
      at ghidra.framework.plugintool.util.PluginUtils.instantiatePlugin(PluginUtils.java:196)
      at ghidra.framework.plugintool.PluginManager.addPlugins(PluginManager.java:100)
      at ghidra.framework.plugintool.PluginTool.addPlugins(PluginTool.java:819)
      at ghidra.framework.plugintool.PluginConfigurationModel.addAllPlugins(PluginConfigurationModel.java:180)
      at ghidra.framework.plugintool.dialog.PluginManagerComponent$PluginPackageComponent.checkBoxClicked(PluginManagerComponent.java:180)
      at ghidra.framework.plugintool.dialog.PluginManagerComponent$PluginPackageComponent.lambda$initizalizeCheckBoxSection$0(PluginManagerComponent.java:103)
      at java.desktop/javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1967)
      at java.desktop/javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2308)
      at java.desktop/javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:405)
      at java.desktop/javax.swing.JToggleButton$ToggleButtonModel.setPressed(JToggleButton.java:401)
      at java.desktop/javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:279)
      at java.desktop/java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:297)
      at java.desktop/java.awt.Component.processMouseEvent(Component.java:6635)
      at java.desktop/javax.swing.JComponent.processMouseEvent(JComponent.java:3342)
      at java.desktop/java.awt.Component.processEvent(Component.java:6400)
      at java.desktop/java.awt.Container.processEvent(Container.java:2263)
      at java.desktop/java.awt.Component.dispatchEventImpl(Component.java:5011)
      at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2321)
      at java.desktop/java.awt.Component.dispatchEvent(Component.java:4843)
      at java.desktop/java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4918)
      at java.desktop/java.awt.LightweightDispatcher.processMouseEvent(Container.java:4547)
      at java.desktop/java.awt.LightweightDispatcher.dispatchEvent(Container.java:4488)
      at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2307)
      at java.desktop/java.awt.Window.dispatchEventImpl(Window.java:2772)
      at java.desktop/java.awt.Component.dispatchEvent(Component.java:4843)
      at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:772)
      at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:721)
      at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:715)
      at java.base/java.security.AccessController.doPrivileged(Native Method)
      at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
      at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:95)
      at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:745)
      at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:743)
      at java.base/java.security.AccessController.doPrivileged(Native Method)
      at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
      at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:742)
      at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
      at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
      at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
      at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
      at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
      at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)
      Caused by: java.lang.reflect.InvocationTargetException
      at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
      at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
      at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
      at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490)
      at ghidra.framework.plugintool.util.PluginUtils.instantiatePlugin(PluginUtils.java:184)
      ... 41 more
      Caused by: java.lang.NoSuchMethodError: 'boolean docking.action.DockingAction.setEnabled(boolean)'
      at GhidraJupyterKotlin.JupyterKotlinPlugin.(JupyterKotlinPlugin.java:70)
      ... 46 more

What Ghidra Version are you using? the setEnabled method was changed at some point in the summer of last year according to git blame. boolean docking.action.DockingAction.setEnabled(boolean) is the old method signature, so if you are using 9.2 this is probably an issue with the prebuilt plugin which might be still for version 9.1.2 . You can try building the plugin yourself according to the README, the plugin code itself definitely supports 9.2

ah i see, yes i'm on v9.2. i'll give self building a shot.
Thanks!

I updated the release to include a version built for 9.2 you can also try that if building yourself doesn't work, though we appreciate feedback in case the instructions don't work or are unclear in some way.

building the extension worked fine, thanks for updating the package here. just trying to find the import plugin window again to activate it.

While in the CodeBrowser (or any other tool really): "File -> Configure..." and ticking the checkbox for the "Miscellaneous" Group. I also realized this just now and am currently adding it to the README

works fine now! thanks again!

Thanks to you for bringing this up! I assume most people are on 9.2 anyway, so this should have effected all of them.