首页 > 解决方案 > Eclipse STS 3.9.10:无法使用 SpringYamlEditor 读取 Yml 文件

问题描述

我已经下载了STS 3.9.10,解压并运行它

/home/reginaldosantos/sts-bundle/sts-3.9.10.RELEASE/STS

打开application.yml文件时,出现以下错误:

**Exception:**
org.eclipse.ui.PartInitException: Plug-in "org.springframework.ide.eclipse.boot.properties.editor.yaml" was unable to instantiate class "org.springframework.ide.eclipse.boot.properties.editor.yaml.SpringYamlEditor".

**Root exception:**
java.lang.NoClassDefFoundError: javax/inject/Provider
  at org.springframework.ide.eclipse.boot.properties.editor.yaml.ApplicationYamlSourceViewerConfiguration.<init>(ApplicationYamlSourceViewerConfiguration.java:69)
  at org.springframework.ide.eclipse.boot.properties.editor.yaml.SpringYamlEditor.createSourceViewerConfiguration(SpringYamlEditor.java:28)
  at org.dadacoalition.yedit.editor.YEdit.initializeEditor(YEdit.java:81)
  at org.springframework.ide.eclipse.boot.properties.editor.yaml.SpringYamlEditor.initializeEditor(SpringYamlEditor.java:33)
  at org.eclipse.ui.texteditor.AbstractDecoratedTextEditor.<init>(AbstractDecoratedTextEditor.java:352)
  at org.eclipse.ui.editors.text.TextEditor.<init>(TextEditor.java:62)
  at org.dadacoalition.yedit.editor.YEdit.<init>(YEdit.java:46)
  at org.springframework.ide.eclipse.editor.support.yaml.AbstractYamlEditor.<init>(AbstractYamlEditor.java:19)
  at org.springframework.ide.eclipse.boot.properties.editor.yaml.SpringYamlEditor.<init>(SpringYamlEditor.java:22)
  at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
  at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
  at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
  at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
  at org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.createExecutableExtension(RegistryStrategyOSGI.java:204)
  at org.eclipse.core.internal.registry.ExtensionRegistry.createExecutableExtension(ExtensionRegistry.java:934)
  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.WorkbenchPlugin.createExtension(WorkbenchPlugin.java:280)
  at org.eclipse.ui.internal.registry.EditorDescriptor.createEditor(EditorDescriptor.java:231)
  at org.eclipse.ui.internal.EditorReference.createPart(EditorReference.java:321)
  at org.eclipse.ui.internal.e4.compatibility.CompatibilityPart.createPart(CompatibilityPart.java:300)
  at org.eclipse.ui.internal.e4.compatibility.CompatibilityEditor.createPart(CompatibilityEditor.java:61)
  at org.eclipse.ui.internal.e4.compatibility.CompatibilityPart.create(CompatibilityPart.java:338)
  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.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:58)
  at org.eclipse.e4.core.internal.di.InjectorImpl.processAnnotated(InjectorImpl.java:998)
  at org.eclipse.e4.core.internal.di.InjectorImpl.processAnnotated(InjectorImpl.java:963)
  at org.eclipse.e4.core.internal.di.InjectorImpl.internalInject(InjectorImpl.java:139)
  at org.eclipse.e4.core.internal.di.InjectorImpl.internalMake(InjectorImpl.java:408)
  at org.eclipse.e4.core.internal.di.InjectorImpl.make(InjectorImpl.java:331)
  at org.eclipse.e4.core.contexts.ContextInjectionFactory.make(ContextInjectionFactory.java:202)
  at org.eclipse.e4.ui.internal.workbench.ReflectionContributionFactory.createFromBundle(ReflectionContributionFactory.java:91)
  at org.eclipse.e4.ui.internal.workbench.ReflectionContributionFactory.doCreate(ReflectionContributionFactory.java:60)
  at org.eclipse.e4.ui.internal.workbench.ReflectionContributionFactory.create(ReflectionContributionFactory.java:42)
  at org.eclipse.e4.ui.workbench.renderers.swt.ContributedPartRenderer.createWidget(ContributedPartRenderer.java:132)
  at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.createWidget(PartRenderingEngine.java:1002)
  at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeCreateGui(PartRenderingEngine.java:662)
  at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeCreateGui(PartRenderingEngine.java:768)
  at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.access$0(PartRenderingEngine.java:739)
  at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$2.run(PartRenderingEngine.java:733)
  at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:45)
  at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.createGui(PartRenderingEngine.java:717)
  at org.eclipse.e4.ui.internal.workbench.PartServiceImpl$1.handleEvent(PartServiceImpl.java:107)
  at org.eclipse.e4.ui.services.internal.events.UIEventHandler.lambda$0(UIEventHandler.java:38)
  at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:236)
  at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:146)
  at org.eclipse.swt.widgets.Display.syncExec(Display.java:5728)
  at org.eclipse.e4.ui.internal.workbench.swt.E4Application$1.syncExec(E4Application.java:219)
  at org.eclipse.e4.ui.services.internal.events.UIEventHandler.handleEvent(UIEventHandler.java:38)
  at org.eclipse.equinox.internal.event.EventHandlerWrapper.handleEvent(EventHandlerWrapper.java:205)
  at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:203)
  at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:1)
  at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:234)
  at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:151)
  at org.eclipse.equinox.internal.event.EventAdminImpl.dispatchEvent(EventAdminImpl.java:132)
  at org.eclipse.equinox.internal.event.EventAdminImpl.sendEvent(EventAdminImpl.java:75)
  at org.eclipse.equinox.internal.event.EventComponent.sendEvent(EventComponent.java:44)
  at org.eclipse.e4.ui.services.internal.events.EventBroker.send(EventBroker.java:55)
  at org.eclipse.e4.ui.internal.workbench.UIEventPublisher.notifyChanged(UIEventPublisher.java:63)
  at org.eclipse.emf.common.notify.impl.BasicNotifierImpl.eNotify(BasicNotifierImpl.java:424)
  at org.eclipse.e4.ui.model.application.ui.impl.ElementContainerImpl.setSelectedElementGen(ElementContainerImpl.java:170)
  at org.eclipse.e4.ui.model.application.ui.impl.ElementContainerImpl.setSelectedElement(ElementContainerImpl.java:188)
  at org.eclipse.e4.ui.internal.workbench.ModelServiceImpl.showElementInWindow(ModelServiceImpl.java:651)
  at org.eclipse.e4.ui.internal.workbench.ModelServiceImpl.bringToTop(ModelServiceImpl.java:615)
  at org.eclipse.e4.ui.internal.workbench.PartServiceImpl.delegateBringToTop(PartServiceImpl.java:790)
  at org.eclipse.e4.ui.internal.workbench.PartServiceImpl.bringToTop(PartServiceImpl.java:404)
  at org.eclipse.e4.ui.internal.workbench.PartServiceImpl.showPart(PartServiceImpl.java:1239)
  at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditor(WorkbenchPage.java:3205)
  at org.eclipse.ui.internal.WorkbenchPage.lambda$9(WorkbenchPage.java:3110)
  at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:72)
  at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:3108)
  at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:3078)
  at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:3069)
  at org.eclipse.ui.ide.IDE.openEditor(IDE.java:570)
  at org.eclipse.ui.ide.IDE.openEditor(IDE.java:525)
  at org.eclipse.jdt.internal.ui.javaeditor.EditorUtility.openInEditor(EditorUtility.java:363)
  at org.eclipse.jdt.internal.ui.javaeditor.EditorUtility.openInEditor(EditorUtility.java:170)
  at org.eclipse.jdt.ui.actions.OpenAction.run(OpenAction.java:287)
  at org.eclipse.jdt.ui.actions.OpenAction.run(OpenAction.java:252)
  at org.eclipse.jdt.ui.actions.SelectionDispatchAction.dispatchRun(SelectionDispatchAction.java:274)
  at org.eclipse.jdt.ui.actions.SelectionDispatchAction.run(SelectionDispatchAction.java:252)
  at org.eclipse.jdt.internal.ui.packageview.PackageExplorerActionGroup.handleOpen(PackageExplorerActionGroup.java:382)
  at org.eclipse.jdt.internal.ui.packageview.PackageExplorerPart$4.open(PackageExplorerPart.java:554)
  at org.eclipse.ui.OpenAndLinkWithEditorHelper$InternalListener.open(OpenAndLinkWithEditorHelper.java:48)
  at org.eclipse.jface.viewers.StructuredViewer$2.run(StructuredViewer.java:797)
  at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:45)
  at org.eclipse.ui.internal.JFaceUtil.lambda$0(JFaceUtil.java:47)
  at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:174)
  at org.eclipse.jface.viewers.StructuredViewer.fireOpen(StructuredViewer.java:794)
  at org.eclipse.jface.viewers.StructuredViewer.handleOpen(StructuredViewer.java:1110)
  at org.eclipse.jface.util.OpenStrategy.fireOpenEvent(OpenStrategy.java:275)
  at org.eclipse.jface.util.OpenStrategy.access$2(OpenStrategy.java:270)
  at org.eclipse.jface.util.OpenStrategy$1.handleEvent(OpenStrategy.java:310)
  at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:89)
  at org.eclipse.swt.widgets.Display.sendEvent(Display.java:5618)
  at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1405)
  at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4882)
  at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:4406)
  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:633)
  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:150)
  at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:150)
  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:400)
  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:660)
  at org.eclipse.equinox.launcher.Main.basicRun(Main.java:597)
  at org.eclipse.equinox.launcher.Main.run(Main.java:1468)
  at org.eclipse.equinox.launcher.Main.main(Main.java:1441)

我正在使用一个全新的工作区,并且我还尝试使用SpringSource Update Site for Eclipse 4.13对其进行更新,但似乎没有任何遗漏(甚至 Extension > Spring IDE Boot Support 已经存在)。

注意:我正在运行 Ubuntu 18.04:

$ uname -a
Linux RSantos 4.15.0-65-generic #74-Ubuntu SMP Tue Sep 17 17:06:04 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux

它看起来像一个错误,但我没有看到任何关于它的抱怨......

希望有人可以对此有所了解。

标签: springeclipseyaml

解决方案


推荐阅读