spring-attic / spring-ide

Spring Development Environment for Eclipse
299 stars 126 forks source link

Unable to open Yaml files in Spring STS 3.8.4.RELEASE #289

Closed sureshpec04 closed 6 years ago

sureshpec04 commented 6 years ago

Unable to open .yml files in STS 3.8.4. Recently upgraded STS to 3.9.4.RELEASE. Error Message: **An error has occurred. See error log for more details.

Plug-in "org.springframework.ide.eclipse.boot.properties.editor.yaml" was unable to instantiate class "org.springframework.ide.eclipse.boot.properties.editor.yaml.SpringYamlEditor". Could not initialize class org.yaml.snakeyaml.nodes.Tag**

I tried placing the new version of snakeyaml in plugins folder org.yaml.snakeyaml_1.15.0.jar but did not work.

This issue is happening after the upgrade.

Complete stacktrace:

org.eclipse.core.runtime.CoreException: Plug-in "org.springframework.ide.eclipse.boot.properties.editor.yaml" was unable to instantiate class "org.springframework.ide.eclipse.boot.properties.editor.yaml.SpringYamlEditor". at org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.throwException(RegistryStrategyOSGI.java:194) at org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.createExecutableExtension(RegistryStrategyOSGI.java:188) at org.eclipse.core.internal.registry.ExtensionRegistry.createExecutableExtension(ExtensionRegistry.java:905) at org.eclipse.core.internal.registry.ConfigurationElement.createExecutableExtension(ConfigurationElement.java:243) at org.eclipse.core.internal.registry.ConfigurationElementHandle.createExecutableExtension(ConfigurationElementHandle.java:55) at org.eclipse.ui.internal.WorkbenchPlugin.createExtension(WorkbenchPlugin.java:282) at org.eclipse.ui.internal.registry.EditorDescriptor.createEditor(EditorDescriptor.java:235) at org.eclipse.ui.internal.EditorReference.createPart(EditorReference.java:329) at org.eclipse.ui.internal.e4.compatibility.CompatibilityPart.createPart(CompatibilityPart.java:278) at org.eclipse.ui.internal.e4.compatibility.CompatibilityEditor.createPart(CompatibilityEditor.java:63) at org.eclipse.ui.internal.e4.compatibility.CompatibilityPart.create(CompatibilityPart.java:316) at jdk.internal.reflect.GeneratedMethodAccessor182.invoke(Unknown Source) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:564) at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:55) at org.eclipse.e4.core.internal.di.InjectorImpl.processAnnotated(InjectorImpl.java:966) at org.eclipse.e4.core.internal.di.InjectorImpl.processAnnotated(InjectorImpl.java:931) at org.eclipse.e4.core.internal.di.InjectorImpl.inject(InjectorImpl.java:151) at org.eclipse.e4.core.internal.di.InjectorImpl.internalMake(InjectorImpl.java:375) at org.eclipse.e4.core.internal.di.InjectorImpl.make(InjectorImpl.java:294) at org.eclipse.e4.core.contexts.ContextInjectionFactory.make(ContextInjectionFactory.java:162) at org.eclipse.e4.ui.internal.workbench.ReflectionContributionFactory.createFromBundle(ReflectionContributionFactory.java:105) at org.eclipse.e4.ui.internal.workbench.ReflectionContributionFactory.doCreate(ReflectionContributionFactory.java:74) at org.eclipse.e4.ui.internal.workbench.ReflectionContributionFactory.create(ReflectionContributionFactory.java:56) at org.eclipse.e4.ui.workbench.renderers.swt.ContributedPartRenderer.createWidget(ContributedPartRenderer.java:129) at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.createWidget(PartRenderingEngine.java:975) at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeCreateGui(PartRenderingEngine.java:651) at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeCreateGui(PartRenderingEngine.java:757) at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.access$0(PartRenderingEngine.java:728) at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$2.run(PartRenderingEngine.java:722) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42) at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.createGui(PartRenderingEngine.java:706) at org.eclipse.e4.ui.workbench.renderers.swt.StackRenderer.showTab(StackRenderer.java:1324) at org.eclipse.e4.ui.workbench.renderers.swt.LazyStackRenderer$1.handleEvent(LazyStackRenderer.java:72) at org.eclipse.e4.ui.services.internal.events.UIEventHandler$1.run(UIEventHandler.java:40) at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:233) at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:145) at org.eclipse.swt.widgets.Display.syncExec(Display.java:4821) at org.eclipse.e4.ui.internal.workbench.swt.E4Application$1.syncExec(E4Application.java:211) at org.eclipse.e4.ui.services.internal.events.UIEventHandler.handleEvent(UIEventHandler.java:36) at org.eclipse.equinox.internal.event.EventHandlerWrapper.handleEvent(EventHandlerWrapper.java:201) at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:197) at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:1) at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230) at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148) at org.eclipse.equinox.internal.event.EventAdminImpl.dispatchEvent(EventAdminImpl.java:135) at org.eclipse.equinox.internal.event.EventAdminImpl.sendEvent(EventAdminImpl.java:78) at org.eclipse.equinox.internal.event.EventComponent.sendEvent(EventComponent.java:39) at org.eclipse.e4.ui.services.internal.events.EventBroker.send(EventBroker.java:94) at org.eclipse.e4.ui.internal.workbench.UIEventPublisher.notifyChanged(UIEventPublisher.java:60) at org.eclipse.emf.common.notify.impl.BasicNotifierImpl.eNotify(BasicNotifierImpl.java:374) at org.eclipse.e4.ui.model.application.ui.impl.ElementContainerImpl.setSelectedElement(ElementContainerImpl.java:173) at org.eclipse.e4.ui.internal.workbench.ModelServiceImpl.showElementInWindow(ModelServiceImpl.java:617) at org.eclipse.e4.ui.internal.workbench.ModelServiceImpl.bringToTop(ModelServiceImpl.java:581) at org.eclipse.e4.ui.internal.workbench.PartServiceImpl.delegateBringToTop(PartServiceImpl.java:770) at org.eclipse.e4.ui.internal.workbench.PartServiceImpl.bringToTop(PartServiceImpl.java:401) at org.eclipse.e4.ui.internal.workbench.PartServiceImpl.showPart(PartServiceImpl.java:1214) at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditor(WorkbenchPage.java:3261) at org.eclipse.ui.internal.WorkbenchPage.access$25(WorkbenchPage.java:3176) at org.eclipse.ui.internal.WorkbenchPage$10.run(WorkbenchPage.java:3158) at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70) at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:3153) at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:3117) at org.eclipse.ui.actions.OpenWithMenu.openEditor(OpenWithMenu.java:324) at org.eclipse.ui.actions.OpenWithMenu.lambda$0(OpenWithMenu.java:180) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4418) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4236) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3824) at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$4.run(PartRenderingEngine.java:1121) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1022) at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:150) at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:693) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:610) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148) at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:138) at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:564) at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:673) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:610) at org.eclipse.equinox.launcher.Main.run(Main.java:1519) at org.eclipse.equinox.launcher.Main.main(Main.java:1492) Caused by: java.lang.NoClassDefFoundError: Could not initialize class org.yaml.snakeyaml.nodes.Tag at org.yaml.snakeyaml.constructor.SafeConstructor.(SafeConstructor.java:52) at org.yaml.snakeyaml.constructor.Constructor.(Constructor.java:77) at org.yaml.snakeyaml.constructor.Constructor.(Constructor.java:64) at org.yaml.snakeyaml.constructor.Constructor.(Constructor.java:54) at org.yaml.snakeyaml.Yaml.(Yaml.java:63) at org.springframework.ide.eclipse.editor.support.yaml.AbstractYamlSourceViewerConfiguration.(AbstractYamlSourceViewerConfiguration.java:79) at org.springframework.ide.eclipse.boot.properties.editor.yaml.ApplicationYamlSourceViewerConfiguration.(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.(AbstractDecoratedTextEditor.java:344) at org.eclipse.ui.editors.text.TextEditor.(TextEditor.java:59) at org.dadacoalition.yedit.editor.YEdit.(YEdit.java:46) at org.springframework.ide.eclipse.editor.support.yaml.AbstractYamlEditor.(AbstractYamlEditor.java:19) at org.springframework.ide.eclipse.boot.properties.editor.yaml.SpringYamlEditor.(SpringYamlEditor.java:22) 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:488) at java.base/java.lang.Class.newInstance(Class.java:560) at org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.createExecutableExtension(RegistryStrategyOSGI.java:184) ... 90 more

kdvolder commented 6 years ago

Unable to open .yml files in STS 3.8.4. Recently upgraded STS to 3.9.4.RELEASE

How did you upgrade? The upgrade process using eclipse update site is quite messy and a bit unreliable.

It sounds like something has gone wrong and there are some plugins missing or having incompatible version inside the upgraded product. You can try restarting STS and adding the '-clean' option to STS.ini file. But this is a long shot and probably will not work.

The easiest is probably to just download a clean and 'fresh' copy of the STS 3.9.4 distribution build instead and use that. The distribution build contains exactly the version / collection of plugins we intended and isn't subject to Eclipse messy upgrade process not doing the right thing.

I realize that this may be a bit annoying for you if you have installed other add-ons yourself (you'll have to reinstall them in the new STS version), but its probably less annoying than dealing with a broken upgrade and trying to repair it.

kdvolder commented 6 years ago

BTW the distribution can be downloaded here https://spring.io/tools/sts/all choose the one for your system in the little pull-down menu under Windows / Linux or Mac.

sureshpec04 commented 6 years ago

I gave the update from Spring STS Help -> Check for updates. I have no problem in downloading the new STS version but only issue is I don't have JPA/Database development tools. I don't find any helpful option to install this in Spring STS.

martinlippert commented 6 years ago

@sureshpec04 do you mean the JPA/Database tools from Eclipse? In case you are referring to them, you can install them via the Extension Install (from the STS Dashboard, then go to IDE Extensions), there is an item for Eclipse Data Tools.

Otherwise choose Install New Software, select the Eclipse repository, and go from there.

So would it be fine with you do if you go ahead and download the latest STS 3.9.4 release version, go from there, and we close the issue here? The other option would be to investigate this further, which would require quite some digging into the details and internals (I guess).

sureshpec04 commented 6 years ago

Hi Martin, Yes please go ahead and close the issue. I will install STS 3.9.4. I am also trying out the STS 4 public beta. I don’t see Eclipse data tools in IDE extensions.

Thanks, Suresh

On Wed, Jun 6, 2018 at 9:09 AM Martin Lippert notifications@github.com wrote:

@sureshpec04 https://github.com/sureshpec04 do you mean the JPA/Database tools from Eclipse? In case you are referring to them, you can install them via the Extension Install (from the STS Dashboard, then go to IDE Extensions), there is an item for Eclipse Data Tools.

Otherwise choose Install New Software, select the Eclipse repository, and go from there.

So would it be fine with you do if you go ahead and download the latest STS 3.9.4 release version, go from there, and we close the issue here? The other option would be to investigate this further, which would require quite some digging into the details and internals (I guess).

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/spring-projects/spring-ide/issues/289#issuecomment-395082156, or mute the thread https://github.com/notifications/unsubscribe-auth/AaubOBJYv-hWa7Skf1oP8yfR3wVA0dLEks5t5-KogaJpZM4UbhNx .

martinlippert commented 6 years ago

Hey! If there is no entry showing up for Eclipse Data Tools you can always go to the Install New Software dialog and go from there. I will double check why this doesn't show up on the list of extensions there. Which version of STS 3.9.4 did you install? (Windows, based on Eclipse 4.7.3a, I guess)

sureshpec04 commented 6 years ago

I am using the STS 4 public beta. When I try to install Eclipse DTP from Eclipse market place I get this error:

No repository found at http://download.eclipse.org/datatools/updates/.

On Wed, Jun 6, 2018 at 9:38 AM, Martin Lippert notifications@github.com wrote:

Hey! If there is no entry showing up for Eclipse Data Tools you can always go to the Install New Software dialog and go from there. I will double check why this doesn't show up on the list of extensions there. Which version of STS 3.9.4 did you install? (Windows, based on Eclipse 4.7.3a, I guess)

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/spring-projects/spring-ide/issues/289#issuecomment-395092194, or mute the thread https://github.com/notifications/unsubscribe-auth/AaubOKgdiC6X25nMKPBQAuipbUdt1gjQks5t5-l5gaJpZM4UbhNx .

martinlippert commented 6 years ago

Not sure about the marketplace entry for data tools, maybe there isn't a version defined that is compatible with Eclipse Photon (STS4 beta builds are already on Eclipse Photon). What happens if you try this update site instead: http://download.eclipse.org/datatools/updates/1.14.100-SNAPSHOT/repository/

(on your own risk, I haven't check this myself)

Otherwise I would dive into the Photon p2 repo via the Install New Software and search for the data tools there, that is at least the version that is compatible with Photon).

Hope that helps!

Pavucsan commented 4 years ago

The fix is easy:

mnasirmollah1432 commented 4 years ago

I fix this issue change Spring Tools Suit 3 to Spring Tools 4 You can download here https://spring.io/tools