英文:
Exported RCP product not starting correctly
问题
我已将基于 Kepler 3.x 的 RCP 应用程序转换为使用当前的 Eclipse 发行版。与此同时,我重新配置了产品定义,以使用功能(features)而不是之前的插件(plugins)。
在 Eclipse 中使用产品定义,我已成功地测试了该应用程序。
我导出了该产品,并且在目标位置中能够看到所有相关的插件和功能。
然而,当我启动应用程序时,只显示了启动画面。
!SESSION 2020-06-05 14:52:09.778 -----------------------------------------------
eclipse.buildId=unknown
java.version=1.8.0_242
java.vendor=AdoptOpenJDK
BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=de
Framework arguments: -sap r3a -svn https://svnbuild.acme.com/svn/l-svnatf-test -role DEVELOPER
Command-line arguments: -os win32 -ws win32 -arch x86_64 -sap r3a -data c:\ATF\workspace-DEVELOPER-Test-Feature -svn https://svnbuild.acme.com/svn/l-svnatf-test -role DEVELOPER
!ENTRY com.acme.atf.app 4 0 2020-06-05 14:52:12.029
!MESSAGE FrameworkEvent ERROR
!STACK 0
org.osgi.framework.BundleException: 无法解析模块: com.acme.atf.app [3]
未解决的要求: Require-Bundle: com.acme.atf.help
at org.eclipse.osgi.container.Module.start(Module.java:462)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel$2.run(ModuleContainer.java:1844)
at org.eclipse.osgi.internal.framework.EquinoxContainerAdaptor$1$1.execute(EquinoxContainerAdaptor.java:136)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1837)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1778)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:1742)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1664)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1)
at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:234)
at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:345)
!ENTRY org.eclipse.equinox.app 0 0 2020-06-05 14:52:13.684
!MESSAGE 无法找到产品 com.acme.atf.app.product。
!ENTRY org.eclipse.e4.ui.workbench 4 0 2020-06-05 14:52:15.012
!MESSAGE 无法创建类 'org.eclipse.e4.ui.internal.workbench.addons.CommandProcessingAddon',来自插件 '111'
!STACK 0
org.eclipse.e4.core.di.InjectionException: 无法处理 "CommandProcessingAddon.broker":找不到参数 "IEventBroker" 的实际值。
at org.eclipse.e4.core.internal.di.InjectorImpl.reportUnresolvedArgument(InjectorImpl.java:485)
at org.eclipse.e4.core.internal.di.InjectorImpl.resolveRequestorArgs(InjectorImpl.java:476)
at org.eclipse.e4.core.internal.di.InjectorImpl.internalInject(InjectorImpl.java:128)
at org.eclipse.e4.core.internal.di.InjectorImpl.internalMake(InjectorImpl.java:408)
我将输出与之前的构建进行了比较,并注意到 configuration/config.ini
之前包含了一个 osgi.bundles
条目,其中包含了所有所需的 bundles 的详细列表。新版本与之前的版本相比有很大不同:
#Product Runtime Configuration File
eclipse.application=org.eclipse.ui.ide.workbench
osgi.bundles.defaultStartLevel=4
eclipse.product=com.acme.atf.app.product
osgi.splashPath=platform:/base/plugins/com.acme.atf.app
osgi.bundles=org.eclipse.equinox.simpleconfigurator@1:start
org.eclipse.equinox.simpleconfigurator.configUrl=file:org.eclipse.equinox.simpleconfigurator/bundles.info
(bundles.info
文件确实包含了一长串相关的 bundles。)
作为一个测试,我将“旧”的 config.ini
复制到了新的目标位置。在这种情况下,应用程序确实进一步运行并显示了登录对话框。
在这里可能出现的问题是什么?我的“help” bundle 明显是存在的,那么错误是从哪里产生的呢?
org.osgi.framework.BundleException: 无法解析模块: com.acme.atf.app [3]
未解决的要求: Require-Bundle: com.acme.atf.help
或者是什么导致了
org.eclipse.e4.core.di.InjectionException: 无法处理 "CommandProcessingAddon.broker":找不到参数 "IEventBroker" 的实际值。
英文:
I have converted a Kepler-based 3.x RCP application to use the current Eclipse release. At the same time I reconfigured the product definition to use features rather than plugins as it did previously.
Using the product definition from within Eclipse, I have been able to test the application successfully.
I exported the product and I was able to see all of the relevant plugins and features in the target.
However, when I started the application only the splash was shown.
!SESSION 2020-06-05 14:52:09.778 -----------------------------------------------
eclipse.buildId=unknown
java.version=1.8.0_242
java.vendor=AdoptOpenJDK
BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=de
Framework arguments: -sap r3a -svn https://svnbuild.acme.com/svn/l-svnatf-test -role DEVELOPER
Command-line arguments: -os win32 -ws win32 -arch x86_64 -sap r3a -data c:\ATF\workspace-DEVELOPER-Test-Feature -svn https://svnbuild.acme.com/svn/l-svnatf-test -role DEVELOPER
!ENTRY com.acme.atf.app 4 0 2020-06-05 14:52:12.029
!MESSAGE FrameworkEvent ERROR
!STACK 0
org.osgi.framework.BundleException: Could not resolve module: com.acme.atf.app [3]
Unresolved requirement: Require-Bundle: com.acme.atf.help
at org.eclipse.osgi.container.Module.start(Module.java:462)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel$2.run(ModuleContainer.java:1844)
at org.eclipse.osgi.internal.framework.EquinoxContainerAdaptor$1$1.execute(EquinoxContainerAdaptor.java:136)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1837)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1778)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:1742)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1664)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1)
at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:234)
at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:345)
!ENTRY org.eclipse.equinox.app 0 0 2020-06-05 14:52:13.684
!MESSAGE Product com.acme.atf.app.product could not be found.
!ENTRY org.eclipse.e4.ui.workbench 4 0 2020-06-05 14:52:15.012
!MESSAGE Unable to create class 'org.eclipse.e4.ui.internal.workbench.addons.CommandProcessingAddon' from bundle '111'
!STACK 0
org.eclipse.e4.core.di.InjectionException: Unable to process "CommandProcessingAddon.broker": no actual value was found for the argument "IEventBroker".
at org.eclipse.e4.core.internal.di.InjectorImpl.reportUnresolvedArgument(InjectorImpl.java:485)
at org.eclipse.e4.core.internal.di.InjectorImpl.resolveRequestorArgs(InjectorImpl.java:476)
at org.eclipse.e4.core.internal.di.InjectorImpl.internalInject(InjectorImpl.java:128)
at org.eclipse.e4.core.internal.di.InjectorImpl.internalMake(InjectorImpl.java:408)
I compared the output with a previous build and noticed that the configuration/config.ini
previously contained an entry for osgi.bundles
which was a comprehensive list of all required bundles. The newer version is quite different:
#Product Runtime Configuration File
eclipse.application=org.eclipse.ui.ide.workbench
osgi.bundles.defaultStartLevel=4
eclipse.product=com.acme.atf.app.product
osgi.splashPath=platform:/base/plugins/com.acme.atf.app
osgi.bundles=org.eclipse.equinox.simpleconfigurator@1:start
org.eclipse.equinox.simpleconfigurator.configUrl=file:org.eclipse.equinox.simpleconfigurator/bundles.info
(The bundles.info
file does contain a long list of relevant bundles.)
As a test, I copied the 'old' config.ini
in to the new target. In this case the application did get further and display my login dialog.
What might be the problem here? My 'help' bundle is certainly present so where does the error come from?
org.osgi.framework.BundleException: Could not resolve module: com.acme.atf.app [3]
Unresolved requirement: Require-Bundle: com.acme.atf.help
Or what causes
org.eclipse.e4.core.di.InjectionException: Unable to process "CommandProcessingAddon.broker": no actual value was found for the argument "IEventBroker".
专注分享java语言的经验与见解,让所有开发者获益!
评论