Skip to main content



      Home
Home » Eclipse Projects » Oomph » NPE in Dialog Eclipse Installer Extentions
NPE in Dialog Eclipse Installer Extentions [message #1828823] Fri, 19 June 2020 06:07 Go to next message
Eclipse UserFriend
I create a own Setup Task. But now when I try to use it in a new Installation (other PC without any Eclipse) I get the following exeption.

!ENTRY org.eclipse.oomph.setup.installer 4 0 2020-06-19 12:02:09.051
!MESSAGE java.lang.NullPointerException
!STACK 0
java.lang.NullPointerException
at org.eclipse.oomph.setup.ui.EnablementComposite.enableButtons(EnablementComposite.java:393)
at org.eclipse.oomph.setup.ui.EnablementComposite.install(EnablementComposite.java:265)
at org.eclipse.oomph.setup.internal.installer.ExtensionPage.install(ExtensionPage.java:239)
at org.eclipse.oomph.setup.internal.installer.ExtensionPage$1.performFinish(ExtensionPage.java:98)
at org.eclipse.oomph.setup.ui.wizards.SetupWizard.performFinish(SetupWizard.java:697)
at org.eclipse.jface.wizard.WizardDialog.finishPressed(WizardDialog.java:832)
at org.eclipse.jface.wizard.WizardDialog.buttonPressed(WizardDialog.java:472)
at org.eclipse.jface.dialogs.Dialog.lambda$0(Dialog.java:619)
at org.eclipse.swt.events.SelectionListener$1.widgetSelected(SelectionListener.java:84)
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:4213)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1037)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4030)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3630)
at org.eclipse.oomph.setup.internal.installer.Installer.runEventLoop(Installer.java:371)
at org.eclipse.oomph.setup.internal.installer.InstallerDialog.show(InstallerDialog.java:399)
at org.eclipse.oomph.setup.internal.installer.InstallerApplication.run(InstallerApplication.java:295)
at org.eclipse.oomph.setup.internal.installer.InstallerApplication.start(InstallerApplication.java:397)
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 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:566)
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)

I checked that the repository URL ant the feature Name are correct.

How can I see if the Problem is within my Setup Task?

Frank
Re: NPE in Dialog Eclipse Installer Extentions [message #1828824 is a reply to message #1828823] Fri, 19 June 2020 06:40 Go to previous messageGo to next message
Eclipse UserFriend
The buttons are created conditionally:
    offlineProperty = PropertiesUtil.getBoolean(SetupProperties.PROP_SETUP_OFFLINE);
    if (offlineProperty == null)
    {
      offlineButton = buttonBar.addCheckButton("Offline", "Avoid unnecessary network requests during the installation process", false,
          "toggleCommand:org.eclipse.oomph.ui.ToggleOfflineMode");
      AccessUtil.setKey(offlineButton, "offline");
    }

    mirrorsProperty = PropertiesUtil.getBoolean(SetupProperties.PROP_SETUP_MIRRORS);
    if (mirrorsProperty == null)
    {
      mirrorsButton = buttonBar.addCheckButton("Mirrors", "Make use of p2 mirrors during the installation process", true, "mirrors");
      AccessUtil.setKey(mirrorsButton, "mirrors");
    }
But that suggests that org.eclipse.oomph.setup.ui.EnablementComposite.enableButtons(boolean) should guard against these things being null.

Did you set these properties such that the buttons aren't being created?
Re: NPE in Dialog Eclipse Installer Extentions [message #1828826 is a reply to message #1828824] Fri, 19 June 2020 07:34 Go to previous messageGo to next message
Eclipse UserFriend
I only see the Offline checkbox but the checkbox is disabled.
I can not see a button or Checkbox for Mirrors.

How can I set the SetupProperties.PROP_SETUP_OFFLINE and SetupProperties.PROP_SETUP_MIRRORS property
Re: NPE in Dialog Eclipse Installer Extentions [message #1828828 is a reply to message #1828826] Fri, 19 June 2020 08:23 Go to previous messageGo to next message
Eclipse UserFriend
If you want to look more closely at all the code and to be able to debug launch the installer (there are launchers in the projects available), you can use this:

https://www.eclipse.org/setups/installer/?url=http://git.eclipse.org/c/oomph/org.eclipse.oomph.git/plain/setups/configurations/OomphConfiguration.setup&show=true

That would also allow you to commit changes to Gerrit to fix problems.

That particular property is defined like this:
  public static final String PROP_SETUP_MIRRORS = "eclipse.p2.mirrors";

So I suspect you have this set to true or false to make that button not appear and to use that default setting instead.
Re: NPE in Dialog Eclipse Installer Extentions [message #1828829 is a reply to message #1828826] Fri, 19 June 2020 08:26 Go to previous messageGo to next message
Eclipse UserFriend
Now I found my problem.

For some reason I add a wrong Definition to the vm Argument.
-Declipse.p2.mirrors=false

This removes the Checkbox and not the usage of mirrors.
Re: NPE in Dialog Eclipse Installer Extentions [message #1828830 is a reply to message #1828828] Fri, 19 June 2020 08:59 Go to previous messageGo to next message
Eclipse UserFriend
Actually, setting it to false (anything non-null other than true) not only hides the button but makes it behave as if there were a button that's unchecked.

The fact that there is an NPE is definitely a bug. Please open a Bugzilla for that.
Re: NPE in Dialog Eclipse Installer Extentions [message #1828833 is a reply to message #1828830] Fri, 19 June 2020 09:38 Go to previous messageGo to next message
Eclipse UserFriend
OK,
I will do this over the Weekend in my private time and will contribute a fix.
Re: NPE in Dialog Eclipse Installer Extentions [message #1828840 is a reply to message #1828833] Fri, 19 June 2020 12:15 Go to previous message
Eclipse UserFriend
I create Bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=564485
Previous Topic:Problem with Launch Task did not find External Tool configuration on first run
Next Topic:Oomph cannot find .equinox.p2.iu and .jdt.feature.group
Goto Forum:
  


Current Time: Wed May 21 08:27:32 EDT 2025

Powered by FUDForum. Page generated in 0.75651 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top