简体   繁体   中英

Bundle was not resolved because of a uses contraint violation in org.eclipse.e4.ui.workbench.swt

I'm trying to build my RCP plugins and I'm getting this error while trying to run tycho surefire tests-

Bundle was not resolved because of a uses contraint violation. org.osgi.service.resolver.ResolutionException: Uses constraint violation. Unable to resolve resource org.eclipse.e4.ui.workbench.swt [osgi.identity; osgi.identity="org.eclipse.e4.ui.workbench.swt"; type="osgi.bundle"; version:Version="0.14.1.v20160829-0832"; singleton:="true"] because it is exposed to package 'org.osgi.service.component' from resources org.eclipse.osgi.services [osgi.identity; osgi.identity="org.eclipse.osgi.services"; type="osgi.bundle"; version:Version="3.6.0.v20170116-1355"] and osgi.enterprise [osgi.identity; osgi.identity="osgi.enterprise"; type="osgi.bundle"; version:Version="4.2.0.v201108120515"] via two dependency chains.

  Chain 1:
  org.eclipse.e4.ui.workbench.swt [osgi.identity; osgi.identity="org.eclipse.e4.ui.workbench.swt"; type="osgi.bundle"; version:Version="0.14.1.v20160829-0832"; singleton:="true"]
    require: (&(osgi.wiring.bundle=org.eclipse.osgi.services)(&(bundle-version>=3.2.0)(!(bundle-version>=4.0.0))))
     |
    provide: osgi.wiring.bundle: org.eclipse.osgi.services
  org.eclipse.osgi.services [osgi.identity; osgi.identity="org.eclipse.osgi.services"; type="osgi.bundle"; version:Version="3.6.0.v20170116-1355"]

Chain 2:
  org.eclipse.e4.ui.workbench.swt [osgi.identity; osgi.identity="org.eclipse.e4.ui.workbench.swt"; type="osgi.bundle"; version:Version="0.14.1.v20160829-0832"; singleton:="true"]
    require: (&(osgi.extender=osgi.component)(version>=1.2)(!(version>=2.0)))
     |
    provide: osgi.extender; osgi.extender="osgi.component"; version:Version="1.2.0"; uses:="org.osgi.service.component"
  org.eclipse.equinox.ds [osgi.identity; osgi.identity="org.eclipse.equinox.ds"; type="osgi.bundle"; version:Version="1.4.400.v20160226-2036"; singleton:="true"]
    import: (&(osgi.wiring.package=org.osgi.service.component)(&(version>=1.1.0)(!(version>=1.3.0))))
     |
    export: osgi.wiring.package: org.osgi.service.component
  osgi.enterprise [osgi.identity; osgi.identity="osgi.enterprise"; type="osgi.bundle"; version:Version="4.2.0.v201108120515"]

It looks like you have installed the bundle osgi.enterprise into your OSGi Framework. That bundle should not be used at runtime -- it is a specification aggregation bundle that is intended for use only at compile-time.

Just remove the bundle from your runtime and you should be fine.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM