“Unable to acquire application service” error when starting an Eclipse application built with Tycho

佐手、 提交于 2019-12-23 23:37:40

问题


This is a question which is frequently asked in the Tycho community:

I want to build an Eclipse distribution/RCP application with Tycho.

To do this, I have created an eclipse-repository project with a product file which specifies the features to be included. Then, I have configured the tycho-p2-director-plugin to create an installation of the product.

The build runs fine, but the installation fails to start up. The log contains the following error:

java.lang.IllegalStateException: Unable to acquire application service. Ensure that the org.eclipse.core.runtime bundle is resolved and started (see config.ini).

I vaguely remember that I need to tell Eclipse how to bootstrap, but I don't know what configuration I need exactly. Is there a configuration that will work with most Eclipse installations? Or can I somehow copy the configuration from a working Eclipse installation?


回答1:


Here’s the product from my E4 beginner’s guide book:

<plugin id="org.eclipse.core.runtime" autoStart="true" startLevel="4"/>
<plugin id="org.eclipse.equinox.common" autoStart="true" startLevel="2"/>
<plugin id="org.eclipse.equinox.ds" autoStart="true" startLevel="2"/>
<plugin id="org.eclipse.equinox.simpleconfigurator" autoStart="true" startLevel="1"/>

Those are the ones that you will need to get running for the product in most cases.

The simpleconfigurator is the bundle responsible for reading the bundles.info and bringing everything up - essentially pre-filling the bundles and restoring the started/running state.

The ds bundle starts declarative services (which more bundles are using).

The equinox.common provides the IAdapterManager service and registers the platform: URL handler (so bundles can refer to content like platform:/org.eclipse.equinox.common/about.html).

The core.runtime provides the preference service and the preference store.

Hope that helps!




回答2:


In the Configuration tab of the Product Editor, there is a section labeled "Start Levels". Click the Add Recommended... button in order to set the settings which will solve named problem.



来源:https://stackoverflow.com/questions/23295890/unable-to-acquire-application-service-error-when-starting-an-eclipse-applicati

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