【发布时间】:2016-04-29 22:38:31
【问题描述】:
开发基于 Eclipse 插件的应用程序。在产品中,当我按下“启动 Eclipse 应用程序”时,应用程序运行正常。 当我导出应用程序并尝试启动它时,我得到 org.eclipse.core.runtime 未解决。 是的,在依赖项中我做了一个“添加所需的插件”。 我应该怎么做才能导出工作产品?
这是当前的开发树: https://github.com/magwas/zenta/tree/export_bugreport 您可以在 org.rulez.magwas.zenta.editor.build/zenta.product 中找到产品文件,在 tmp/Zenta.eclipse 中找到导出的产品
我在启动级别配置中有一个条目: org.eclipse.core.runtime autoStart="true" startLevel="0"
这是启动失败的日志:
!SESSION 2016-01-23 10:17:04.939 -----------------------------------------------
eclipse.buildId=unknown
java.version=1.7.0_91
java.vendor=Oracle Corporation
BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=en_US
Command-line arguments: -os linux -ws gtk -arch x86_64
!ENTRY org.eclipse.core.runtime 4 0 2016-01-23 10:17:05.560
!MESSAGE FrameworkEvent ERROR
!STACK 0
org.osgi.framework.BundleException: Could not resolve module: org.eclipse.core.runtime [1]
Unresolved requirement: Require-Bundle: javax.annotation; bundle-version="1.1.0"; visibility:="reexport"; resolution:="optional"
Unresolved requirement: Require-Bundle: javax.inject; bundle-version="1.0.0"; visibility:="reexport"; resolution:="optional"
Unresolved requirement: Require-Bundle: org.eclipse.equinox.common; bundle-version="[3.6.100,4.0.0)"; visibility:="reexport"
at org.eclipse.osgi.container.Module.start(Module.java:434)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1582)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1562)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:1533)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1476)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1)
at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:340)
!ENTRY org.eclipse.osgi 4 0 2016-01-23 10:17:05.562
!MESSAGE Bundle initial@reference:file:plugins/org.eclipse.core.runtime_3.10.0.v20140318-2214.jar was not resolved.
!ENTRY org.eclipse.core.runtime 2 0 2016-01-23 10:17:05.565
!MESSAGE Could not resolve module: org.eclipse.core.runtime [1]
Unresolved requirement: Require-Bundle: javax.annotation; bundle-version="1.1.0"; visibility:="reexport"; resolution:="optional"
Unresolved requirement: Require-Bundle: javax.inject; bundle-version="1.0.0"; visibility:="reexport"; resolution:="optional"
Unresolved requirement: Require-Bundle: org.eclipse.equinox.common; bundle-version="[3.6.100,4.0.0)"; visibility:="reexport"
!ENTRY org.eclipse.osgi 4 0 2016-01-23 10:17:05.566
!MESSAGE Application error
!STACK 1
java.lang.IllegalStateException: Unable to acquire application service. Ensure that the org.eclipse.core.runtime bundle is resolved and started (see config.ini).
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:78)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:380)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:235)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:648)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:603)
at org.eclipse.equinox.launcher.Main.run(Main.java:1465)
at org.eclipse.equinox.launcher.Main.main(Main.java:1438)
【问题讨论】:
-
您如何导出产品?您使用的是“.product”文件吗?您是否在“.product”文件中列出了所有必需的插件?居然是
org.eclipse.equinox.common找不到。 -
我正在使用产品文件导出产品。我正在使用“添加所需的插件”来确保所有插件都在那里。我在导出的产品中有 org.eclipse.equinox.common: $ ls tmp/Zenta.eclipse/Zenta/plugins/org.eclipse.equinox.common_3.6.200.v20130402-1505.jar -l -rw-rw-r -- 1 mag mag 106701 Jan 23 10:16 tmp/Zenta.eclipse/Zenta/plugins/org.eclipse.equinox.common_3.6.200.v20130402-1505.jar 甚至在所需的版本范围内。
-
我不确定您输入的起始级别是否正确(配置选项卡,起始级别)。您通常不需要任何东西,因此请尝试删除它。
-
你搞定了,谢谢。请写一个答案,以便我接受并投票。
标签: eclipse dependencies export