payara / ecosystem-support

Placeholder repository to handle community requests for the Payara Platform ecosystem tools
3 stars 2 forks source link

Bug Report: On eclipse (windows) can't edit existing payara runtimes #58

Closed stalb closed 1 year ago

stalb commented 1 year ago

Description


On Windows and Eclipse IDE 2022-06 with Payara Tools installed, I'm unable to edit previously created Rayara runtimes.

Expected Outcome

I expect to be able to edit previously created Payara runtimes.

In Eclipse IDE, when I open Window > Preferences and go into Server > Runtime Environments , if I have previously created some Payara runtime, it should be possible to select it and edit it by clicking on the Edit button.

Current Outcome

Nothing happens.

I can select the Payara runtime and click on the Edit button, but nothing happens: the runtime editor doesn't show up.

Sample Project (Optional)

No project provided, but you should be able to reproduce it with the following actions:

Remark: I can edit the Payara runtimes on linux (Debian), so this seems to be Windows related.

Environment

JamesHillyard commented 1 year ago

Hi @stalb,

Could you please use Eclipse IDE 2022-09 and the recently released newest version of the Payara Tools Eclipse plugin and confirm if you are still experiencing this error? I was able to successfully edit an existing Payara Server runtime on Windows 10 Pro.

Thanks, James

stalb commented 1 year ago

I still have the problem with Eclipse IDE 2022-09 and the new version of the Payara Tools Eclipse plugin.

Here is what I have in the Eclipse log:

!ENTRY org.eclipse.ui 4 0 2022-09-27 18:40:25.027
!MESSAGE Unhandled event loop exception
!STACK 0
java.lang.RuntimeException: IPayaraRuntimeModel.JavaRuntimeEnvironment: JdkDefaultValueService.compute() has failed
    at org.eclipse.sapphire.services.DataService.refresh(DataService.java:130)
    at org.eclipse.sapphire.services.DataService.data(DataService.java:75)
    at org.eclipse.sapphire.DefaultValueService.value(DefaultValueService.java:34)
    at org.eclipse.sapphire.Value.refreshDefaultContent(Value.java:197)
    at org.eclipse.sapphire.Value.getDefaultText(Value.java:394)
    at org.eclipse.sapphire.services.internal.DefaultValueFactsService.facts(DefaultValueFactsService.java:50)
    at org.eclipse.sapphire.services.FactsService.facts(FactsService.java:33)
    at org.eclipse.sapphire.services.FactsAggregationService.facts(FactsAggregationService.java:37)
    at org.eclipse.sapphire.ui.assist.internal.FactsAssistContributor.contribute(FactsAssistContributor.java:76)
    at org.eclipse.sapphire.ui.assist.internal.PropertyEditorAssistDecorator.refresh(PropertyEditorAssistDecorator.java:425)
    at org.eclipse.sapphire.ui.assist.internal.PropertyEditorAssistDecorator.<init>(PropertyEditorAssistDecorator.java:320)
    at org.eclipse.sapphire.ui.assist.internal.PropertyEditorAssistDecorator.<init>(PropertyEditorAssistDecorator.java:106)
    at org.eclipse.sapphire.ui.forms.swt.PropertyEditorPresentation.createDecorator(PropertyEditorPresentation.java:498)
    at org.eclipse.sapphire.ui.forms.swt.TextFieldPropertyEditorPresentation.createContents(TextFieldPropertyEditorPresentation.java:193)
    at org.eclipse.sapphire.ui.forms.swt.TextFieldPropertyEditorPresentation.createContents(TextFieldPropertyEditorPresentation.java:122)
    at org.eclipse.sapphire.ui.forms.swt.PropertyEditorPresentation.render(PropertyEditorPresentation.java:170)
    at org.eclipse.sapphire.ui.forms.swt.internal.CompositePresentation.renderChildren(CompositePresentation.java:212)
    at org.eclipse.sapphire.ui.forms.swt.internal.CompositePresentation.refresh(CompositePresentation.java:252)
    at org.eclipse.sapphire.ui.forms.swt.internal.CompositePresentation.render(CompositePresentation.java:170)
    at org.eclipse.sapphire.ui.forms.swt.internal.CompositePresentation.render(CompositePresentation.java:91)
    at org.eclipse.sapphire.ui.forms.swt.SapphireForm.<init>(SapphireForm.java:64)
    at org.eclipse.payara.tools.ui.wizards.BaseWizardFragment.render(BaseWizardFragment.java:105)
    at org.eclipse.payara.tools.ui.wizards.BaseWizardFragment.enter(BaseWizardFragment.java:95)
    at org.eclipse.wst.server.ui.internal.wizard.TaskWizard.switchWizardFragment(TaskWizard.java:309)
    at org.eclipse.wst.server.ui.internal.wizard.TaskWizardPage.setVisible(TaskWizardPage.java:101)
    at org.eclipse.jface.wizard.WizardDialog.showStartingPage(WizardDialog.java:1280)
    at org.eclipse.jface.wizard.WizardDialog.createContents(WizardDialog.java:638)
    at org.eclipse.jface.window.Window.create(Window.java:431)
    at org.eclipse.jface.dialogs.Dialog.create(Dialog.java:1094)
    at org.eclipse.jface.window.Window.open(Window.java:788)
    at org.eclipse.wst.server.ui.internal.RuntimePreferencePage.showWizard(RuntimePreferencePage.java:398)
    at org.eclipse.wst.server.ui.internal.RuntimePreferencePage$3.widgetSelected(RuntimePreferencePage.java:161)
    at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:252)
    at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:89)
    at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4251)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1066)
    at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4068)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3645)
    at org.eclipse.jface.window.Window.runEventLoop(Window.java:823)
    at org.eclipse.jface.window.Window.open(Window.java:799)
    at org.eclipse.ui.internal.OpenPreferencesAction.run(OpenPreferencesAction.java:66)
    at org.eclipse.jface.action.Action.runWithEvent(Action.java:474)
    at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:580)
    at org.eclipse.jface.action.ActionContributionItem.lambda$4(ActionContributionItem.java:414)
    at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:89)
    at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4251)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1066)
    at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4068)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3645)
    at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1155)
    at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338)
    at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1046)
    at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:155)
    at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:643)
    at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338)
    at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:550)
    at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:171)
    at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:152)
    at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:203)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:136)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:402)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:255)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.base/java.lang.reflect.Method.invoke(Method.java:568)
    at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:659)
    at org.eclipse.equinox.launcher.Main.basicRun(Main.java:596)
    at org.eclipse.equinox.launcher.Main.run(Main.java:1467)
Caused by: java.lang.IllegalArgumentException: java.lang
    at org.eclipse.sapphire.Version.<init>(Version.java:77)
    at org.eclipse.sapphire.VersionConstraint.check(VersionConstraint.java:373)
    at org.eclipse.payara.tools.utils.JdtUtil$JvmValidator.version(JdtUtil.java:136)
    at org.eclipse.payara.tools.sapphire.PayaraServerConfigServices$JdkDefaultValueService.acceptable(PayaraServerConfigServices.java:155)
    at org.eclipse.payara.tools.utils.JavaLocationDefaultValueService.compute(JavaLocationDefaultValueService.java:92)
    at org.eclipse.payara.tools.utils.JavaLocationDefaultValueService.compute(JavaLocationDefaultValueService.java:1)
    at org.eclipse.sapphire.services.DataService.refresh(DataService.java:103)
    ... 69 more
JamesHillyard commented 1 year ago

Hi @stalb,

Thank you for providing an update on this issue, it would appear there is an issue with the JRE version you are using, but I haven't been able to reproduce this with Temurin JDK 17.

Which properties are you changing in the Payara run configuration? Additionally can you try with Zulu JDK 17 and any JDK 11 to further narrow down this issue?

Thanks, James

stalb commented 1 year ago

@JamesHillyard I've tested with different versions of the jdk (zulu/Temurin 11/17) and with fresh versions of eclipse with the same result.
Since you cannot reproduce the problem on window, I would say that it is, at least in part, related to something in my configuration.

The Eclipse log points to Sapphire. Since it's not maintained anymore and it's planned to rewrite the plugin and remove the Sapphire dependency (#40 #54), I propose to close this issue.

JamesHillyard commented 1 year ago

Hi @stalb,

If this issue can wait until the rewrite of the Eclipse Plugin is complete, this would be best as it will likely fix the issue if Sapphire is the cause. If this still occurs after the rewrite please raise a new issue and we will continue to investigate this further.

Best Regards, James