在将目标定义从Eclipse Neon(4.6)更改为Photon(4.8)之后,Eclipse Application启动配置会引发InjectionException。

时间:2018-07-16 16:15:45

标签: eclipse eclipse-plugin osgi e4 equinox

我正在开发一些Eclipse插件(基于xtext),并且尝试将目标定义从4.6 Neon更新到4.8 Photon。

我有一个启动配置,该启动配置会在加载插件后启动Eclipse IDE。更新目标定义后,启动配置会自动更新来自目标定义的捆绑软件的版本号。一些新版本具有新的依存关系,我通过“添加所需的插件”按钮添加了这些依存关系。 “验证插件”没有发现问题,但是,当我运行此启动配置时,它失败,但出现以下异常(省略了堆栈跟踪):

!ENTRY org.eclipse.e4.ui.workbench 4 0 2018-07-16 17:58:31.550
!MESSAGE Unable to create class 'org.eclipse.e4.ui.internal.workbench.addons.CommandProcessingAddon' from bundle '495'
!STACK 0
org.eclipse.e4.core.di.InjectionException: Unable to process "CommandProcessingAddon.broker": no actual value was found for the argument "IEventBroker".

!ENTRY org.eclipse.e4.ui.workbench 4 0 2018-07-16 17:58:31.559
!MESSAGE Unable to create class 'org.eclipse.e4.ui.internal.workbench.addons.ContextProcessingAddon' from bundle '495'
!STACK 0
org.eclipse.e4.core.di.InjectionException: Unable to process "ContextProcessingAddon.broker": no actual value was found for the argument "IEventBroker".

!ENTRY org.eclipse.e4.ui.workbench 4 0 2018-07-16 17:58:31.568
!MESSAGE Unable to create class 'org.eclipse.e4.ui.workbench.swt.util.BindingProcessingAddon' from bundle '498'
!STACK 0
org.eclipse.e4.core.di.InjectionException: Unable to process "BindingProcessingAddon.broker": no actual value was found for the argument "IEventBroker".

!ENTRY org.eclipse.e4.ui.workbench 4 0 2018-07-16 17:58:31.602
!MESSAGE Unable to create class 'org.eclipse.e4.ui.workbench.addons.splitteraddon.SplitterAddon' from bundle '496'
!STACK 0
org.eclipse.e4.core.di.InjectionException: Unable to process "SplitterAddon.ps": no actual value was found for the argument "EPartService".

!ENTRY org.eclipse.e4.ui.workbench 4 0 2018-07-16 17:58:31.612
!MESSAGE Unable to create class 'org.eclipse.ui.internal.ide.addons.SaveAllDirtyPartsAddon' from bundle '689'
!STACK 0
org.eclipse.e4.core.di.InjectionException: Unable to process "SaveAllDirtyPartsAddon.eventBroker": no actual value was found for the argument "IEventBroker".

我不知道是什么原因造成的。启动配置之前运行良好。谷歌搜索这些错误并没有产生有用的结果。

1 个答案:

答案 0 :(得分:0)

很可能是自动启动的插件列表及其运行级别已损坏。在启动配置中打开“插件”选项卡并按“恢复默认值”按钮应该可以解决问题。

如果您自定义了插件/功能列表,则必须重复此操作。 (您可以将启动配置存储在 Common 选项卡的文件中,进行备份并将其与结果进行比较,让您的生活更轻松)。

同样的问题也可能发生在产品上。遇到这种情况,解决方法是打开产品配置的“配置”选项卡,点击“开始级别”下的“全部删除”按钮,点击“添加推荐”。