Skip to content
This repository has been archived by the owner on Jul 13, 2022. It is now read-only.

Unable to edit Run Configurations #414

Open
ayancancode opened this issue Apr 5, 2020 · 17 comments
Open

Unable to edit Run Configurations #414

ayancancode opened this issue Apr 5, 2020 · 17 comments

Comments

@ayancancode
Copy link

ayancancode commented Apr 5, 2020

Whenever I select one of the run configurations, it throws NullPointerException. After that Run,Apply and Revert buttons are de-activated.

Version: 4.2.2.RELEASE
Build Id: 201905232009

!ENTRY org.eclipse.jface 4 2 2020-04-05 23:46:27.859
!MESSAGE Problems occurred when invoking code from plug-in: "org.eclipse.jface".
!STACK 0
java.lang.NullPointerException
at org.eclipse.jdt.launching.JavaRuntime.newProjectRuntimeClasspathEntry(JavaRuntime.java:672)
at org.eclipse.m2e.jdt.internal.launch.MavenRuntimeClasspathProvider.computeUnresolvedClasspath(MavenRuntimeClasspathProvider.java:101)
at org.eclipse.jdt.internal.launching.RuntimeClasspathProvider.computeUnresolvedClasspath(RuntimeClasspathProvider.java:60)
at org.eclipse.jdt.launching.JavaRuntime.computeUnresolvedRuntimeClasspath(JavaRuntime.java:1643)
at org.eclipse.jdt.debug.ui.launchConfigurations.JavaClasspathTab.createClasspathModel(JavaClasspathTab.java:288)
at org.eclipse.jdt.debug.ui.launchConfigurations.JavaClasspathTab.refresh(JavaClasspathTab.java:276)
at org.eclipse.jdt.debug.ui.launchConfigurations.JavaClasspathTab.initializeFrom(JavaClasspathTab.java:239)
at org.springframework.ide.eclipse.boot.launch.BootClasspathTab.initializeFrom(BootClasspathTab.java:41)
at org.eclipse.debug.ui.AbstractLaunchConfigurationTabGroup.initializeFrom(AbstractLaunchConfigurationTabGroup.java:93)
at org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationTabGroupWrapper.initializeFrom(LaunchConfigurationTabGroupWrapper.java:204)
at org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationTabGroupViewer.displayInstanceTabs(LaunchConfigurationTabGroupViewer.java:875)
at org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationTabGroupViewer.lambda$4(LaunchConfigurationTabGroupViewer.java:736)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:72)
at org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationTabGroupViewer.inputChanged(LaunchConfigurationTabGroupViewer.java:751)
at org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationTabGroupViewer.setInput0(LaunchConfigurationTabGroupViewer.java:683)
at org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationTabGroupViewer.setInput(LaunchConfigurationTabGroupViewer.java:663)
at org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationsDialog.handleLaunchConfigurationSelectionChanged(LaunchConfigurationsDialog.java:1050)
at org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationsDialog$4.selectionChanged(LaunchConfigurationsDialog.java:617)
at org.eclipse.jface.viewers.StructuredViewer$3.run(StructuredViewer.java:874)
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:176)
at org.eclipse.jface.viewers.StructuredViewer.firePostSelectionChanged(StructuredViewer.java:871)
at org.eclipse.jface.viewers.StructuredViewer.handlePostSelect(StructuredViewer.java:1240)
at org.eclipse.jface.viewers.StructuredViewer.lambda$0(StructuredViewer.java:1263)
at org.eclipse.swt.events.SelectionListener$1.widgetSelected(SelectionListener.java:84)
at org.eclipse.jface.util.OpenStrategy.firePostSelectionEvent(OpenStrategy.java:265)
at org.eclipse.jface.util.OpenStrategy.access$5(OpenStrategy.java:260)
at org.eclipse.jface.util.OpenStrategy$1.lambda$1(OpenStrategy.java:430)
at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:40)
at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:185)
at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:4102)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3769)
at org.eclipse.jface.window.Window.runEventLoop(Window.java:823)
at org.eclipse.jface.window.Window.open(Window.java:799)
at org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationsDialog.open(LaunchConfigurationsDialog.java:1239)
at org.eclipse.debug.ui.DebugUITools.lambda$1(DebugUITools.java:631)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:72)
at org.eclipse.debug.ui.DebugUITools.openLaunchConfigurationDialogOnGroup(DebugUITools.java:637)
at org.eclipse.debug.ui.DebugUITools.openLaunchConfigurationDialogOnGroup(DebugUITools.java:575)
at org.eclipse.debug.ui.actions.OpenLaunchDialogAction.run(OpenLaunchDialogAction.java:85)
at org.eclipse.jface.action.Action.runWithEvent(Action.java:474)
at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:568)
at org.eclipse.jface.action.ActionContributionItem.lambda$4(ActionContributionItem.java:400)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:89)
at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4363)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1512)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1535)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1520)
at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:1324)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4150)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3767)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1173)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1062)
at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:155)
at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:644)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:566)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:155)
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:661)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:597)
at org.eclipse.equinox.launcher.Main.run(Main.java:1476)

@martinlippert
Copy link
Contributor

Thanks for reporting, this looks and sounds quite bad. Can you double check this with the latest version of the tooling from https://spring.io/tools ? That would be great. In case this problem still exists, it would be awesome if you could provide a sample project and a few steps how to reproduce this. And does this happen for existing launch configs only or also for newly created ones?

@ayancancode
Copy link
Author

I guess I have re-installed this last week as I faced this issue with existing STS. It definitely does not work for existing configuration and sometimes new configuration also. Once the issue occurs there is no predictability and nothing works in run configuration section.

@ayancancode
Copy link
Author

any update on this?

@martinlippert
Copy link
Contributor

The version that shows up in the error report is definitely not the one from last week, so would be good to double check this with a latest version. In addition to that it would also be great if you could provide a sample project with an embedded launch config that reproduces the issue, so that we can debug this in more detail.

@ayancancode
Copy link
Author

ayancancode commented Apr 9, 2020

so , spring-tool-suite-4-4.6.0.RELEASE-e4.15.0-macosx.cocoa.x86_64 is this not the latest release? Cause, we I am downloading from https://spring.io/tools, same file with the above file name is getting downloaded which is installed in my machine.

@martinlippert
Copy link
Contributor

That is the latest release, you are correct. I was confused about the log output above mentioning:

Version: 4.2.2.RELEASE
Build Id: 201905232009

(therefore my question to make sure you are running on the latest version).

From looking at the code behind the exception mentioned above, the problem might be related to the location of the project (to which the launch config belongs). So where is your project located? And which operating system are you running on? And which JDK?

@ayancancode
Copy link
Author

you are correct I see the difference in package.. may be that new installation was not successful.. I have uninstalled old package and installed it with the above mentioned packages... do you suggest that I rebuild the workspace again as I see some warnings that some of the files in my workspace are created with old package and might not work..

@ayancancode
Copy link
Author

java version "1.8.0_201"
Java(TM) SE Runtime Environment (build 1.8.0_201-b09)
Java HotSpot(TM) 64-Bit Server VM (build 25.201-b09, mixed mode)

MacOs Mojave - 10.14.6

@martinlippert
Copy link
Contributor

Usually you should be fine with continuing to use the old workspace with the new version. The only drawback is that once you used the workspace with a newer version, you should not go back and use it with an older version again. Based on my experience, that can cause random issues.

And I would recommend to install a fresh Spring Tools 4 for Eclipse 4.6.0 distribution and go from there to see what might be going wrong here. If the error appears again, please post the exception details again and include some details about the project (like its location on disc).

@ayancancode
Copy link
Author

when it will be available?

@martinlippert
Copy link
Contributor

?!? You mentioned above that you already have downloaded the 4.6.0 release

@ayancancode
Copy link
Author

yes .. my bad..this is the version now..

Version: 4.6.0.RELEASE
Build Id: 202003181317

I have created a new workspace and created launch configurations now.. For safe side I have exported them also for reusability in case it suddenly stops working like last time... with the new version in place, existing launch configuration issues are not fixed.. Please find the logs for the new version below..

!ENTRY org.eclipse.ui 4 0 2020-04-10 10:54:43.057
!MESSAGE Unhandled event loop exception
!STACK 0
java.lang.NullPointerException
at org.eclipse.jdt.launching.JavaRuntime.newProjectRuntimeClasspathEntry(JavaRuntime.java:666)
at org.eclipse.m2e.jdt.internal.launch.MavenRuntimeClasspathProvider.computeUnresolvedClasspath(MavenRuntimeClasspathProvider.java:131)
at org.eclipse.jdt.internal.launching.RuntimeClasspathProvider.computeUnresolvedClasspath(RuntimeClasspathProvider.java:60)
at org.eclipse.jdt.launching.JavaRuntime.computeUnresolvedRuntimeClasspath(JavaRuntime.java:1642)
at org.eclipse.jdt.debug.ui.launchConfigurations.JavaClasspathTab.createClasspathModel(JavaClasspathTab.java:288)
at org.eclipse.jdt.debug.ui.launchConfigurations.JavaClasspathTab.refresh(JavaClasspathTab.java:276)
at org.eclipse.jdt.debug.ui.launchConfigurations.JavaClasspathTab.initializeFrom(JavaClasspathTab.java:239)
at org.springframework.ide.eclipse.boot.launch.BootClasspathTab.initializeFrom(BootClasspathTab.java:41)
at org.eclipse.debug.ui.AbstractLaunchConfigurationTabGroup.initializeFrom(AbstractLaunchConfigurationTabGroup.java:93)
at org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationTabGroupWrapper.initializeFrom(LaunchConfigurationTabGroupWrapper.java:182)
at org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationTabGroupViewer.handleRevertPressed(LaunchConfigurationTabGroupViewer.java:1544)
at org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationsDialog$3.getConfirmation(LaunchConfigurationsDialog.java:601)
at org.eclipse.debug.internal.ui.launchConfigurations.AbstractLaunchConfigurationAction.run(AbstractLaunchConfigurationAction.java:100)
at org.eclipse.ui.actions.BaseSelectionListenerAction.runWithEvent(BaseSelectionListenerAction.java:171)
at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:579)
at org.eclipse.jface.action.ActionContributionItem.lambda$4(ActionContributionItem.java:413)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:89)
at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4387)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1512)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1535)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1520)
at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:1324)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4174)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3791)
at org.eclipse.jface.window.Window.runEventLoop(Window.java:823)
at org.eclipse.jface.window.Window.open(Window.java:799)
at org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationsDialog.open(LaunchConfigurationsDialog.java:1240)
at org.eclipse.debug.ui.DebugUITools.lambda$1(DebugUITools.java:627)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:72)
at org.eclipse.debug.ui.DebugUITools.openLaunchConfigurationDialogOnGroup(DebugUITools.java:633)
at org.eclipse.debug.ui.DebugUITools.openLaunchConfigurationDialogOnGroup(DebugUITools.java:571)
at org.eclipse.debug.ui.actions.OpenLaunchDialogAction.run(OpenLaunchDialogAction.java:85)
at org.eclipse.jface.action.Action.runWithEvent(Action.java:474)
at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:579)
at org.eclipse.jface.action.ActionContributionItem.lambda$4(ActionContributionItem.java:413)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:89)
at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4387)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1512)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1535)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1520)
at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:1324)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4174)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3791)
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.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: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)

@martinlippert
Copy link
Contributor

Can you share a sample project with an embedded launch config that reproduces this?

@ayancancode
Copy link
Author

Hi @martinlippert , I want to update you that I have created a new workspace and I am using latest build as you mentioned. In this new workspace I am not facing any issue. But, the difference in action between this workspace and the workspace that has issue, is that I am not closing project while the workspace has multiple project. In this case if I close project, then after some point of time the run configs stops working. As I am on client machine and do not have my own device with me, I will not be able to provide sample project. But, let me know if you can replicate this issue on Mac device.

@martinlippert
Copy link
Contributor

I tried to reproduce this but without success... :-( Closing projects doesn't trigger this in my case. The stack trace looks like this is related to the referenced project in the launch config, but this looks a lot to me like it requires more information or details to finally identify the root cause. Do you have a vague idea which launch config is causing this? Maybe we can take a look at the definition of it to see what might be going wrong here.

@ayancancode
Copy link
Author

The launch config I am using is Spring Boot App.

@martinlippert
Copy link
Contributor

Can you switch the launch config that causes the issue to a shared one and open it using a plain text editor in Eclipse, so that we can take a look inside?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

2 participants