eclipse:启动插件项目后的异常

eclipse:启动插件项目后的异常,eclipse,osgi,Eclipse,Osgi,我尝试了那个教程:,在我开始之后,我得到了Hello World!消息,还有很多例外情况: org.osgi.framework.BundleException: Exception in org.eclipse.datatools.enablement.oda.ws.ui.Activator.start() of bundle org.eclipse.datatools.enablement.oda.ws.ui. at org.eclipse.osgi.internal.framewo

我尝试了那个教程:,在我开始之后,我得到了Hello World!消息,还有很多例外情况:

org.osgi.framework.BundleException: Exception in org.eclipse.datatools.enablement.oda.ws.ui.Activator.start() of bundle org.eclipse.datatools.enablement.oda.ws.ui.
    at org.eclipse.osgi.internal.framework.BundleContextImpl.startActivator(BundleContextImpl.java:792)
    at org.eclipse.osgi.internal.framework.BundleContextImpl.start(BundleContextImpl.java:721)
    at org.eclipse.osgi.internal.framework.EquinoxBundle.startWorker0(EquinoxBundle.java:941)
    at org.eclipse.osgi.internal.framework.EquinoxBundle$EquinoxModule.startWorker(EquinoxBundle.java:318)
    at org.eclipse.osgi.container.Module.doStart(Module.java:571)
    at org.eclipse.osgi.container.Module.start(Module.java:439)
    at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1582)
    at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1562)
....
Root exception:
org.eclipse.swt.SWTError: Invalid thread access
    at org.eclipse.ui.plugin.AbstractUIPlugin.createImageRegistry(AbstractUIPlugin.java:217)
    at org.eclipse.ui.plugin.AbstractUIPlugin.getImageRegistry(AbstractUIPlugin.java:261)
    at org.eclipse.datatools.enablement.oda.ws.ui.Activator.declareImage(Activator.java:82)
    at org.eclipse.datatools.enablement.oda.ws.ui.Activator.declareImage(Activator.java:77)
    at org.eclipse.datatools.enablement.oda.ws.ui.Activator.declareImages(Activator.java:59)
    at org.eclipse.datatools.enablement.oda.ws.ui.Activator.start(Activator.java:54)
    at org.eclipse.osgi.internal.framework.BundleContextImpl$3.run(BundleContextImpl.java:771)
    at org.eclipse.osgi.internal.framework.BundleContextImpl$3.run(BundleContextImpl.java:1)
    at java.security.AccessController.doPrivileged(Native Method)
...
java.lang.IllegalStateException: Workbench has not been created yet.
    at org.eclipse.ui.PlatformUI.getWorkbench(PlatformUI.java:93)
    at org.eclipse.debug.internal.ui.DebugUIPreferenceInitializer.setThemeBasedPreferences(DebugUIPreferenceInitializer.java:208)
    at org.eclipse.debug.internal.ui.DebugUIPreferenceInitializer.initializeDefaultPreferences(DebugUIPreferenceInitializer.java:81)
    at org.eclipse.core.internal.preferences.PreferenceServiceRegistryHelper$1.run(PreferenceServiceRegistryHelper.java:300)
    at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
一个更大的问题。有什么想法吗

我正在linux上使用Mars.1


我试图取消选中不必要的捆绑包(保留org.apache.felix.gogo.runtimeorg.apache.felix.gogo.shellorg.eclipse.equinox.consoleorg.eclipse.osgi),然后我收到这样的消息:

!ENTRY org.eclipse.update.configurator 4 0 2015-11-24 22:20:46.988
!MESSAGE Could not install bundle plugins/org.eclipse.equinox.p2.repository_2.3.100.v20150428-1613.jar   A bundle is already installed with the name "org.eclipse.equinox.p2.repository" and version "2.3.100.v20150428-1613"

!ENTRY org.eclipse.update.configurator 4 0 2015-11-24 22:20:46.995
!MESSAGE Could not install bundle plugins/org.eclipse.datatools.enablement.oracle.ui_1.0.3.v201201131121.jar   A bundle is already installed with the name "org.eclipse.datatools.enablement.oracle.ui" and version "1.0.3.v201201131121"

!ENTRY org.eclipse.update.configurator 4 0 2015-11-24 22:20:46.998
!MESSAGE Could not install bundle plugins/org.eclipse.wst.jsdt.support.firefox_1.0.500.v201402051800.jar   A bundle is already installed with the name "org.eclipse.wst.jsdt.support.firefox" and version "1.0.500.v201402051800"

但是在那之后,同样的例外情况出现了,你的包激活出现了问题。您显示的所有错误都是bundle,假设它们是使用工作台或SWT UI线程运行的。这些都不是纯OSGi运行所必需的

在您的启动配置中,检查您没有将不需要的捆绑包作为第一个调用端口启用。e、 g.在“Bundles”选项卡中,取消选中除示例插件和OSGi bundle
org.eclipse.OSGi
之外的所有内容

特别是,
org.eclipse.ui
捆绑包和您不想要的类似捆绑包


此外,请确保您使用的是OSGi框架启动配置类型,而不是Eclipse应用程序启动配置类型。

可能为时已晚,但我在EclipseMars.1中遇到了同样的问题。我要做的是: 首次运行前: 运行>运行配置>将显示“创建、管理和运行配置”窗口。您必须从左侧列表中选择OSGi框架并设置配置: 在工作区中检查您的项目, 在目标平台中,您只能选择:

-org.apache.felix.gogo.command
-org.apache.felix.gogo.runtime
-org.apache.felix.gogo.shell
-org.eclipse.equinox.console
-org.eclipse.osgi
然后取消选中“包含可选依赖项…”并选中“添加新工作区…”和“验证捆绑包…”

应用并运行。 我不知道为什么,但我尝试在第一次(再尝试几次)运行和设置running conf之后设置它。它无论如何都不起作用,但我再次尝试并设置run config。在我第一次运行它之前,它起了作用

无论如何,我建议安装EclipseLuna,因为它工作得更好(应该如此)