eclipse exported product could not resolve org.eclipse.core.runtime while “launch application” does work

走远了吗. 提交于 2021-01-29 04:30:37

问题


Developing an eclipse plugin based application. In the product, when I push "Launch an Eclipse application", the application runs correctly. When I export the application and try to start it, i get org.eclipse.core.runtime is not resolved. Yes, in dependencies I did an "add required plug-ins". What should I do in order to have a working product exported?

here is the current development tree: https://github.com/magwas/zenta/tree/export_bugreport You can find the product file in org.rulez.magwas.zenta.editor.build/zenta.product, and the exported product in tmp/Zenta.eclipse

I have one entry in start level configuration: org.eclipse.core.runtime autoStart="true" startLevel="0"

Here is the log of the failed launch:

!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)

回答1:


It looks like your start level configuration in the .product file is wrong (this is on the Configuration tab in the Start Levels section in the .product editor).

For a straightforward RCP you don't need to specify the levels so just clear this.



来源:https://stackoverflow.com/questions/34961785/eclipse-exported-product-could-not-resolve-org-eclipse-core-runtime-while-launc

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!