InjectionException-Eclipse 2018-12 e4导出 [英] InjectionException - Eclipse 2018-12 e4 export

查看:103
本文介绍了InjectionException-Eclipse 2018-12 e4导出的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Eclipse中运行RCP应用程序时,它可以正常运行。如果我使用 Eclipse产品导出向导导出并执行应用程序,则会收到InjectionExceptions。



我发现了另一个问题



例外示例

 !ENTRY组织.eclipse.e4.ui.workbench 4 0 2019-03-05 09:35:24.650 
!MESSAGE无法从包'创建类'org.eclipse.e4.ui.internal.workbench.addons.CommandProcessingAddon' 64'
!STACK 0
org.eclipse.e4.core.di.InjectionException:无法处理 CommandProcessingAddon.broker:找不到参数 IEventBroker的实际值。 org.eclipse.e4.core.internal.di.InjectorImpl.reportUnresolvedArgument(InjectorImpl.java:488)中的
org.eclipse.e4.core.internal.di.InjectorImpl.resolveRequestorArgs(InjectorImpl。 java:479)org.eclipse.e4.core.internal.di.InjectorImpl.internalInject(InjectorImpl.java:128)
org.eclipse.e4.core.internal.di.InjectorImpl。 internalMake(InjectorImpl.java:411)
在org.eclipse.e4.core.internal.di.InjectorImpl.make(InjectorImpl.java:347)
在org.eclipse.e4.core.contexts。 ContextInjectionFactory.make(ContextInjectionFactory.java:217)
在org.eclipse.e4.ui.internal.workbench.ReflectionContributionFactory.createFromBundle(ReflectionContributionFactory.java:111)
在org.eclipse.e4.ui。 internal.workbench.ReflectionContributionFactory.doCreate(ReflectionContributionFactory.java:77)
在org.eclipse.e4.ui.internal.workbench.ReflectionContributionFactory.create(ReflectionContributionFactory.java:54)
在org.eclipse。 e4.ui .internal.workbench.swt.E4Application.createE4Workbench(E4Application.java:289)
在org.eclipse.e4.ui.internal.workbench.swt.E4Application.start(E4Application.java:153)
在org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:203)
在org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:137)
在org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:107)
在org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:400)在org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:255)处的
在sun.reflect.NativeMethodAccessorImpl.invoke0(本机方法)处的
在sun.reflect处的
。 NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
在sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
在java.lang.reflect.Method.invoke(Method.java:498)
在org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:659)
在org.eclipse.equinox.launcher.Main.basicRun(Main.java:595)
在org.eclipse .equinox.launcher.Main.run(Main.java:1501)

!ENTRY org.eclipse.e4.ui.workbench 4 0 2019-03-05 09:35:24.650
!MESSAGE无法从包'64'中创建类'org.eclipse.e4.ui.internal.workbench.addons.ContextProcessingAddon'
!STACK 0
org.eclipse.e4.core.di.InjectionException :无法处理 ContextProcessingAddon.broker:没有为参数 IEventBroker找到实际值。 org.eclipse.e4.core.internal.di.InjectorImpl.reportUnresolvedArgument(InjectorImpl.java:488)中的
org.eclipse.e4.core.internal.di.InjectorImpl.resolveRequestorArgs(InjectorImpl。 java:479)org.eclipse.e4.core.internal.di.InjectorImpl.internalInject(InjectorImpl.java:128)
org.eclipse.e4.core.internal.di.InjectorImpl。 internalMake(InjectorImpl.java:411)
在org.eclipse.e4.core.internal.di.InjectorImpl.make(InjectorImpl.java:347)
在org.eclipse.e4.core.contexts。 ContextInjectionFactory.make(ContextInjectionFactory.java:217)
在org.eclipse.e4.ui.internal.workbench.ReflectionContributionFactory.createFromBundle(ReflectionContributionFactory.java:111)
在org.eclipse.e4.ui。 internal.workbench.ReflectionContributionFactory.doCreate(ReflectionContributionFactory.java:77)
在org.eclipse.e4.ui.internal.workbench.ReflectionContributionFactory.create(ReflectionContributionFactory.java:54)
在org.eclipse。 e4.ui .internal.workbench.swt.E4Application.createE4Workbench(E4Application.java:289)
在org.eclipse.e4.ui.internal.workbench.swt.E4Application.start(E4Application.java:153)
在org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:203)
在org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:137)
在org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:107)
在org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:400)在org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:255)处的
在sun.reflect.NativeMethodAccessorImpl.invoke0(本机方法)处的
在sun.reflect处的
。 NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
在sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
在java.lang.reflect.Method.invoke(Method.java:498)
在org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:659)
在org.eclipse.equinox.launcher.Main.basicRun(Main.java:595)
在org.eclipse .equinox.launcher.Main.run(Main.java:1501)

这是什么原因?

解决方案

我设法通过找到@ greg-449提到的功能所需的插件来解决此问题。



首先我添加了 org.eclipse.emf.common org.eclipse.emf .ecore 到产品文件的插件和片段



下一步,我右键单击并打开它们中的每一个,以查看它们之间的依赖关系。然后,我逐步完成了每个依赖项,如果我的必需插件( plugin.xml )中没有该依赖项,则将其添加。


When running my RCP application in Eclipse it works correctly. If I export using the Eclipse Product export wizard and execute the application I get InjectionExceptions.

I've found another question here that is the exact same problem. I've added org.apache.felix.scr to the product configuration but I'm still getting the same issue. I'm assuming another plug-in needs to be added but Add Recommended doesn't add any more.

Start Levels

Exception example

!ENTRY org.eclipse.e4.ui.workbench 4 0 2019-03-05 09:35:24.650
!MESSAGE Unable to create class 'org.eclipse.e4.ui.internal.workbench.addons.CommandProcessingAddon' from bundle '64'
!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:488)
    at org.eclipse.e4.core.internal.di.InjectorImpl.resolveRequestorArgs(InjectorImpl.java:479)
    at org.eclipse.e4.core.internal.di.InjectorImpl.internalInject(InjectorImpl.java:128)
    at org.eclipse.e4.core.internal.di.InjectorImpl.internalMake(InjectorImpl.java:411)
    at org.eclipse.e4.core.internal.di.InjectorImpl.make(InjectorImpl.java:347)
    at org.eclipse.e4.core.contexts.ContextInjectionFactory.make(ContextInjectionFactory.java:217)
    at org.eclipse.e4.ui.internal.workbench.ReflectionContributionFactory.createFromBundle(ReflectionContributionFactory.java:111)
    at org.eclipse.e4.ui.internal.workbench.ReflectionContributionFactory.doCreate(ReflectionContributionFactory.java:77)
    at org.eclipse.e4.ui.internal.workbench.ReflectionContributionFactory.create(ReflectionContributionFactory.java:54)
    at org.eclipse.e4.ui.internal.workbench.swt.E4Application.createE4Workbench(E4Application.java:289)
    at org.eclipse.e4.ui.internal.workbench.swt.E4Application.start(E4Application.java:153)
    at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:203)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:137)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:107)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:400)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:255)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:659)
    at org.eclipse.equinox.launcher.Main.basicRun(Main.java:595)
    at org.eclipse.equinox.launcher.Main.run(Main.java:1501)

!ENTRY org.eclipse.e4.ui.workbench 4 0 2019-03-05 09:35:24.650
!MESSAGE Unable to create class 'org.eclipse.e4.ui.internal.workbench.addons.ContextProcessingAddon' from bundle '64'
!STACK 0
org.eclipse.e4.core.di.InjectionException: Unable to process "ContextProcessingAddon.broker": no actual value was found for the argument "IEventBroker".
    at org.eclipse.e4.core.internal.di.InjectorImpl.reportUnresolvedArgument(InjectorImpl.java:488)
    at org.eclipse.e4.core.internal.di.InjectorImpl.resolveRequestorArgs(InjectorImpl.java:479)
    at org.eclipse.e4.core.internal.di.InjectorImpl.internalInject(InjectorImpl.java:128)
    at org.eclipse.e4.core.internal.di.InjectorImpl.internalMake(InjectorImpl.java:411)
    at org.eclipse.e4.core.internal.di.InjectorImpl.make(InjectorImpl.java:347)
    at org.eclipse.e4.core.contexts.ContextInjectionFactory.make(ContextInjectionFactory.java:217)
    at org.eclipse.e4.ui.internal.workbench.ReflectionContributionFactory.createFromBundle(ReflectionContributionFactory.java:111)
    at org.eclipse.e4.ui.internal.workbench.ReflectionContributionFactory.doCreate(ReflectionContributionFactory.java:77)
    at org.eclipse.e4.ui.internal.workbench.ReflectionContributionFactory.create(ReflectionContributionFactory.java:54)
    at org.eclipse.e4.ui.internal.workbench.swt.E4Application.createE4Workbench(E4Application.java:289)
    at org.eclipse.e4.ui.internal.workbench.swt.E4Application.start(E4Application.java:153)
    at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:203)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:137)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:107)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:400)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:255)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:659)
    at org.eclipse.equinox.launcher.Main.basicRun(Main.java:595)
    at org.eclipse.equinox.launcher.Main.run(Main.java:1501)

What could be causing this?

解决方案

I managed to fix this by finding the required plug-ins for the feature that @greg-449 mentioned.

First I added org.eclipse.emf.common and org.eclipse.emf.ecore to the Plug-ins and Fragments of the product file.

Next I right clicked and opened each of them to look at their dependencies. I then stepped through each dependency and if I didn't have it in my Required Plug-ins (plugin.xml) I would add it.

这篇关于InjectionException-Eclipse 2018-12 e4导出的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆