Использует нарушение ограничения. Невозможно разрешить ресурс org.eclipse.equinox.http.jetty - PullRequest
0 голосов
/ 16 апреля 2020

Я пытаюсь перейти на OpenJDK 8. Eclipse показывает, что у меня есть ошибка в одном из моих файлов MANIFEST:

!ENTRY org.eclipse.equinox.http.jetty 4 0 2020-04-16 11:17:20.754
!MESSAGE FrameworkEvent ERROR
!STACK 0
org.osgi.framework.BundleException: Could not resolve module: org.eclipse.equinox.http.jetty [753]
  Bundle was not resolved because of a uses contraint violation.
  org.osgi.service.resolver.ResolutionException: Uses constraint violation. Unable to resolve resource org.eclipse.equinox.http.jetty [osgi.identity; osgi.identity="org.eclipse.equinox.http.jetty"; type="osgi.bundle"; version:Version="2.0.100.v20110502"] because it is exposed to package 'javax.servlet.http' from resources javax.servlet [osgi.identity; osgi.identity="javax.servlet"; type="osgi.bundle"; version:Version="2.5.0.v201103041518"] and javax.servlet [osgi.identity; osgi.identity="javax.servlet"; type="osgi.bundle"; version:Version="3.0.0.v201112011016"] via two dependency chains.

Chain 1:
  org.eclipse.equinox.http.jetty [osgi.identity; osgi.identity="org.eclipse.equinox.http.jetty"; type="osgi.bundle"; version:Version="2.0.100.v20110502"]
    import: (&(osgi.wiring.package=javax.servlet.http)(&(version>=2.5.0)(!(version>=2.6.0))))
     |
    export: osgi.wiring.package: javax.servlet.http
  javax.servlet [osgi.identity; osgi.identity="javax.servlet"; type="osgi.bundle"; version:Version="2.5.0.v201103041518"]

Chain 2:
  org.eclipse.equinox.http.jetty [osgi.identity; osgi.identity="org.eclipse.equinox.http.jetty"; type="osgi.bundle"; version:Version="2.0.100.v20110502"]
    import: (&(osgi.wiring.package=org.mortbay.jetty.nio)(&(version>=6.1.0)(!(version>=7.0.0))))
     |
    export: osgi.wiring.package=org.mortbay.jetty.nio; uses:=javax.servlet.http
  org.mortbay.jetty.server [osgi.identity; osgi.identity="org.mortbay.jetty.server"; type="osgi.bundle"; version:Version="6.1.23.v201012071420"]
    import: (&(osgi.wiring.package=javax.servlet.http)(version>=2.5.0))
     |
    export: osgi.wiring.package: javax.servlet.http
  javax.servlet [osgi.identity; osgi.identity="javax.servlet"; type="osgi.bundle"; version:Version="3.0.0.v201112011016"]
    at org.eclipse.osgi.container.Module.start(Module.java:434)
    at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1582)
    at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1561)
    at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:1533)
    at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1476)
    at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1)
    at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
    at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:340)

Файл MANIFEST выглядит следующим образом:

Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: com.Gandu.helpcontent
Bundle-SymbolicName: com.Gandu.helpcontent; singleton:=true
Bundle-Version: 1.0.0
Bundle-Activator: com.Gandu.helpcontent.Activator
Bundle-Vendor: Intel
Require-Bundle: org.eclipse.core.runtime,
 org.eclipse.help.ui;bundle-version="3.5.101",
 org.eclipse.help.webapp;bundle-version="3.5.0",
 org.eclipse.equinox.http.jetty;bundle-version="2.0.0"
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Bundle-ActivationPolicy: lazy

JavaSE-1.6 указывает на OpenJDK 8. Кажется, я не могу понять, почему происходит эта ошибка. Странно то, что я могу успешно построить проект. Я пытался убрать область несколько раз, но ошибка все еще там. Я также попытался удалить org.eclipse.equinox.http.jetty;bundle-version="2.0.0" из файла MAINFEST, но затем проект не удалось скомпилировать. В чем может быть проблема?

...