java.lang.ClassNotFoundException: org.jkiss.dbeaver.ui.controls.sqlinspection.SqlInspectionCommandHandler cannot be found by org.jkiss.dbeaver.core_7.0.4.qualifier
启动错误如下:
!ENTRY org.eclipse.ui 4 0 2020-05-09 20:11:53.260 !MESSAGE The proxied handler for 'org.jkiss.dbeaver.ui.controls.sqlinspection.SqlInspectionCommandHandler' could not be loaded !STACK 1 org.eclipse.core.runtime.CoreException: Plug-in org.jkiss.dbeaver.core was unable to load class org.jkiss.dbeaver.ui.controls.sqlinspection.SqlInspectionCommandHandler. at org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.throwException(RegistryStrategyOSGI.java:212) at org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.createExecutableExtension(RegistryStrategyOSGI.java:198) at org.eclipse.core.internal.registry.ExtensionRegistry.createExecutableExtension(ExtensionRegistry.java:923) at org.eclipse.core.internal.registry.ConfigurationElement.createExecutableExtension(ConfigurationElement.java:246) at org.eclipse.core.internal.registry.ConfigurationElementHandle.createExecutableExtension(ConfigurationElementHandle.java:63) at org.eclipse.ui.internal.handlers.HandlerProxy.loadHandler(HandlerProxy.java:342) at org.eclipse.ui.internal.handlers.HandlerProxy.isHandled(HandlerProxy.java:318) at org.eclipse.ui.internal.handlers.E4HandlerProxy.isHandled(E4HandlerProxy.java:165) at org.eclipse.e4.ui.bindings.keys.KeyBindingDispatcher.executeCommand(KeyBindingDispatcher.java:297) at org.eclipse.e4.ui.bindings.keys.KeyBindingDispatcher.press(KeyBindingDispatcher.java:584) at org.eclipse.e4.ui.bindings.keys.KeyBindingDispatcher.processKeyEvent(KeyBindingDispatcher.java:653) at org.eclipse.e4.ui.bindings.keys.KeyBindingDispatcher.filterKeySequenceBindings(KeyBindingDispatcher.java:443) at org.eclipse.e4.ui.bindings.keys.KeyBindingDispatcher.access$2(KeyBindingDispatcher.java:386) at org.eclipse.e4.ui.bindings.keys.KeyBindingDispatcher$KeyDownFilter.handleEvent(KeyBindingDispatcher.java:96) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:89) at org.eclipse.swt.widgets.Display.filterEvent(Display.java:1174) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1036) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1061) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1046) at org.eclipse.swt.widgets.Widget.sendKeyEvent(Widget.java:1088) at org.eclipse.swt.widgets.Widget.sendKeyEvent(Widget.java:1084) at org.eclipse.swt.widgets.Widget.wmChar(Widget.java:1471) at org.eclipse.swt.widgets.Control.WM_CHAR(Control.java:4840) at org.eclipse.swt.widgets.Table.WM_CHAR(Table.java:5821) at org.eclipse.swt.widgets.Control.windowProc(Control.java:4718) at org.eclipse.swt.widgets.Table.windowProc(Table.java:5816) at org.eclipse.swt.widgets.Display.windowProc(Display.java:4757) at org.eclipse.swt.internal.win32.OS.DispatchMessage(Native Method) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3522) at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1160) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338) at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1049) at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:155) at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:658) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:557) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:154) at org.jkiss.dbeaver.ui.app.standalone.DBeaverApplication.start(DBeaverApplication.java:233) at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:203) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:137) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:107) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:401) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:255) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:657) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:594) at org.eclipse.equinox.launcher.Main.run(Main.java:1447) at org.eclipse.equinox.launcher.Main.main(Main.java:1420) Caused by: java.lang.ClassNotFoundException: org.jkiss.dbeaver.ui.controls.sqlinspection.SqlInspectionCommandHandler cannot be found by org.jkiss.dbeaver.core_7.0.4.qualifier at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:516) at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:171) at java.lang.ClassLoader.loadClass(ClassLoader.java:357) at org.eclipse.osgi.internal.framework.EquinoxBundle.loadClass(EquinoxBundle.java:620) at org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.createExecutableExtension(RegistryStrategyOSGI.java:196) ... 49 more !SUBENTRY 1 org.eclipse.equinox.registry 4 1 2020-05-09 20:11:53.263 !MESSAGE Plug-in org.jkiss.dbeaver.core was unable to load class org.jkiss.dbeaver.ui.controls.sqlinspection.SqlInspectionCommandHandler. !STACK 0 java.lang.ClassNotFoundException: org.jkiss.dbeaver.ui.controls.sqlinspection.SqlInspectionCommandHandler cannot be found by org.jkiss.dbeaver.core_7.0.4.qualifier at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:516) at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:171) at java.lang.ClassLoader.loadClass(ClassLoader.java:357) at org.eclipse.osgi.internal.framework.EquinoxBundle.loadClass(EquinoxBundle.java:620) at org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.createExecutableExtension(RegistryStrategyOSGI.java:196) at org.eclipse.core.internal.registry.ExtensionRegistry.createExecutableExtension(ExtensionRegistry.java:923) at org.eclipse.core.internal.registry.ConfigurationElement.createExecutableExtension(ConfigurationElement.java:246) at org.eclipse.core.internal.registry.ConfigurationElementHandle.createExecutableExtension(ConfigurationElementHandle.java:63) at org.eclipse.ui.internal.handlers.HandlerProxy.loadHandler(HandlerProxy.java:342) at org.eclipse.ui.internal.handlers.HandlerProxy.isHandled(HandlerProxy.java:318) at org.eclipse.ui.internal.handlers.E4HandlerProxy.isHandled(E4HandlerProxy.java:165) at org.eclipse.e4.ui.bindings.keys.KeyBindingDispatcher.executeCommand(KeyBindingDispatcher.java:297) at org.eclipse.e4.ui.bindings.keys.KeyBindingDispatcher.press(KeyBindingDispatcher.java:584) at org.eclipse.e4.ui.bindings.keys.KeyBindingDispatcher.processKeyEvent(KeyBindingDispatcher.java:653) at org.eclipse.e4.ui.bindings.keys.KeyBindingDispatcher.filterKeySequenceBindings(KeyBindingDispatcher.java:443) at org.eclipse.e4.ui.bindings.keys.KeyBindingDispatcher.access$2(KeyBindingDispatcher.java:386) at org.eclipse.e4.ui.bindings.keys.KeyBindingDispatcher$KeyDownFilter.handleEvent(KeyBindingDispatcher.java:96) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:89) at org.eclipse.swt.widgets.Display.filterEvent(Display.java:1174) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1036) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1061) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1046) at org.eclipse.swt.widgets.Widget.sendKeyEvent(Widget.java:1088) at org.eclipse.swt.widgets.Widget.sendKeyEvent(Widget.java:1084) at org.eclipse.swt.widgets.Widget.wmChar(Widget.java:1471) at org.eclipse.swt.widgets.Control.WM_CHAR(Control.java:4840) at org.eclipse.swt.widgets.Table.WM_CHAR(Table.java:5821) at org.eclipse.swt.widgets.Control.windowProc(Control.java:4718) at org.eclipse.swt.widgets.Table.windowProc(Table.java:5816) at org.eclipse.swt.widgets.Display.windowProc(Display.java:4757) at org.eclipse.swt.internal.win32.OS.DispatchMessage(Native Method) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3522) at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1160) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338) at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1049) at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:155) at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:658) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:557) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:154) at org.jkiss.dbeaver.ui.app.standalone.DBeaverApplication.start(DBeaverApplication.java:233) at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:203) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:137) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:107) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:401) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:255) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:657) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:594) at org.eclipse.equinox.launcher.Main.run(Main.java:1447) at org.eclipse.equinox.launcher.Main.main(Main.java:1420)
org.jkiss.dbeaver.ui.controls.sqlinspection.SqlInspectionCommandHandler 这个类是定义好的,是在plug-in org.jkiss.dbeaver.ui.editors.sql 项目中
但是该类最终会在 org.jkiss.dbeaver.core plug-in 项目中引用,所以,这个类需要在 org.jkiss.dbeaver.ui.editors.sql 项目中暴露出来,因此在 org.jkiss.dbeaver.ui.editors.sql 项目的plugin.xml 中配置对外暴露的类
配置好后最后如下:
代码运行,断点成功执行到想要的位置
做完以上操作后,不要忘记右击项目,选择maven---> update project
本文来自博客园,作者:margo,转载请注明原文链接:https://www.cnblogs.com/ZMargo/articles/12859920.html