I'm fixing up an old Eclipse plugin so that it runs in Neon. I managed to import the dependencies via File->Import...
as per https://sourceforge.net/p/e-p-i-c/discussion/258688/thread/7475efd7/#f9cc/cc8a , fixed all the remaining compilation errors and am now ready to try it out.
Yet, when I Debug As...
either "Eclipse Application" or "OSGi Framework", it gives me the "The application could not start" error dialog and then, depending on what I select, a couple of stack traces.
But that's of no use. I need to get a debug session so that I can examine the variables and try to deduce what's wrong ('cuz I've no familiarity with common Eclipse plugin stack traces to be able to say what this specific one means just by looking at it).
The setup look good at first glance:
The child process starts with the command line "C:\Program Files\Java\jre1.8.0_121\bin\javaw.exe" -agentlib:jdwp=transport=dt_socket,suspend=y,address=localhost:50467 -Declipse.pde.launch=true -Dfile.encoding=UTF-8 -classpath "C:\Users\Ivan\.p2\pool\plugins\org.eclipse.equinox.launcher_1.3.201.v20161025-1711.jar" org.eclipse.equinox.launcher.Main -launcher "C:\Users\Ivan\eclipse\committers-neon\eclipse\eclipse.exe" -name Eclipse -showsplash 600 -product org.eclipse.platform.ide -data "C:\Users\Ivan\workspace-antlr/../runtime-New_configuration" -configuration file:C:/Users/Ivan/workspace-antlr/.metadata/.plugins/org.eclipse.pde.core/New_configuration/ -dev file:C:/Users/Ivan/workspace-antlr/.metadata/.plugins/org.eclipse.pde.core/New_configuration/dev.properties -os win32 -ws win32 -arch x86_64 -nl en_US -consoleLog
which seems okay ("New_configuration" launch configuration is of type "Eclipse Application").
Stack traces:
In the Console pane:
java.lang.UnsupportedOperationException
at java.util.AbstractList.add(Unknown Source)
at java.util.AbstractList.add(Unknown Source)
at org.eclipse.osgi.storage.FrameworkExtensionInstaller.getExtensionFiles(FrameworkExtensionInstaller.java:152)
<...>
at org.eclipse.osgi.storage.Storage.installExtensions(Storage.java:194)
at org.eclipse.osgi.storage.Storage.createStorage(Storage.java:92)
at org.eclipse.osgi.internal.framework.EquinoxContainer.<init>(EquinoxContainer.java:66)
at org.eclipse.osgi.launch.Equinox.<init>(Equinox.java:31)
<...>
at org.eclipse.equinox.launcher.Main.main(Main.java:1492)
In the Error Log pane:
java.lang.NullPointerException
at org.eclipse.oomph.setup.ui.SetupUIPlugin.performStartup(SetupUIPlugin.java:443)
at org.eclipse.oomph.setup.ui.SetupUIPlugin.access$5(SetupUIPlugin.java:414)
at org.eclipse.oomph.setup.ui.SetupUIPlugin$1$1.run(SetupUIPlugin.java:253)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
In .log
:
!SESSION 2017-03-14 02:11:24.862 -----------------------------------------------
eclipse.buildId=4.6.2.M20161124-1400
java.version=1.8.0_121
<...>
Command-line arguments: -product org.eclipse.platform.ide -data C:\Users\Ivan\workspace-antlr/../runtime-New_configuration -dev file:C:/Users/Ivan/workspace-antlr/.metadata/.plugins/org.eclipse.pde.core/New_configuration/dev.properties -os win32 -ws win32 -arch x86_64 -consoleLog
!ENTRY org.eclipse.equinox.ds 1 0 2017-03-14 02:11:30.571
!MESSAGE Could not bind a reference of component org.eclipse.ecf.mgmt.rsa.discovery.ui.discovery. The reference is: Reference[name = RemoteServiceAdmin, interface = org.osgi.service.remoteserviceadmin.RemoteServiceAdmin, policy = dynamic, cardinality = 0..1, target = null, bind = bindRemoteServiceAdmin, unbind = unbindRemoteServiceAdmin]
!ENTRY org.eclipse.equinox.ds 1 0 2017-03-14 02:11:30.579
!MESSAGE Could not bind a reference of component org.eclipse.ecf.mgmt.rsa.discovery.ui.discovery. The reference is: Reference[name = IEndpointDescriptionLocator, interface = org.eclipse.ecf.osgi.services.remoteserviceadmin.IEndpointDescriptionLocator, policy = dynamic, cardinality = 0..1, target = null, bind = bindEndpointDescriptionLocator, unbind = unbindEndpointDescriptionLocator]
!ENTRY org.eclipse.egit.ui 2 0 2017-03-14 02:12:17.143
!MESSAGE Warning: The environment variable HOME is not set. The following directory will be used <...>: 'C:\Users\Ivan'.
!ENTRY org.eclipse.oomph.setup.ui 2 0 2017-03-14 02:12:19.584
!MESSAGE java.lang.NullPointerException
!STACK 0
java.lang.NullPointerException
at org.eclipse.oomph.setup.ui.SetupUIPlugin.performStartup(SetupUIPlugin.java:443)
at org.eclipse.oomph.setup.ui.SetupUIPlugin.access$5(SetupUIPlugin.java:414)
at org.eclipse.oomph.setup.ui.SetupUIPlugin$1$1.run(SetupUIPlugin.java:253)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
!ENTRY org.eclipse.oomph.setup.ui 1 0 2017-03-14 02:12:22.650
!MESSAGE Setup tasks were performed during startup updating 5 preferences. See 'C:\Users\Ivan\workspace-antlr\.metadata\.plugins\org.eclipse.pde.core\New_configuration\org.eclipse.oomph.setup\setup.log' for details
I'm primarily interested in how to get into the debugger. If you just help me with this specific error instead, I'm very likely to get another one right away.
Was able to get the debug session by trapping UnsupportedOperationException
specifically, both handled and unhandled (this is the exception in the Console pane). Tracked the problem to org.eclipse.osgi.storage.FrameworkExtensionInstaller::getExtensionFiles()
- it tries to write to a read-only list when a plugin is being loaded in development mode.