"应用程序无法启动"运行插件时会产生堆栈跟踪而不是调试会话

时间:2017-03-18 03:43:53

标签: java eclipse eclipse-pde

我正在修复一个旧的Eclipse插件,以便它在Neon中运行。我设法根据https://sourceforge.net/p/e-p-i-c/discussion/258688/thread/7475efd7/#f9cc/cc8a通过File->Import...导入依赖项,修复了所有剩余的编译错误,现在我可以尝试一下了。

然而,当我Debug As...或者#34; Eclipse Application"或者" OSGi框架",它给了我"应用程序无法启动"错误对话框,然后,根据我选择的,一些堆栈跟踪。

但这没用。 我需要进行调试会话,以便我可以检查变量并尝试推断出错误('因为我不熟悉常见的Eclipse插件堆栈跟踪能够通过观察它来说出这个特定的意思。)

乍一看设置看起来很好:

  • 子进程从命令行"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开始,看起来没问题(" New_configuration"启动配置类型为" Eclipse Application")。

  • The "suspend on uncaught exceptions" flag已设置。

堆栈跟踪:

在“控制台”窗格中:

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)

在“错误日志”窗格中:

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)

.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

我主要对如何进入调试器感兴趣。如果您只是帮助我解决这个特定的错误,我很可能马上得到另一个错误。

2 个答案:

答案 0 :(得分:1)

在Oomph安装程序代码中看起来可能是this Eclipse错误。该错误被标记为已修复和已关闭,但不清楚它在哪个Eclipse版本中(可能会很快发布4.6.3)。

可能的解决方法可能是使用基于一个不使用Oomph的简单Eclipse安装的目标平台。这些可以找到here

答案 1 :(得分:0)

能够通过特定捕获UnsupportedOperationException来获取调试会话,包括已处理和未处理(这是“控制台”窗格中的例外)。将问题跟踪到org.eclipse.osgi.storage.FrameworkExtensionInstaller::getExt‌​ensionFiles() - 当在开发模式下加载插件时,它会尝试写入只读列表。