Осмысление использования нарушения ограничений - PullRequest
0 голосов
/ 04 августа 2020

Я пытаюсь создать приложение RCP и постепенно добавляю пакеты и зависимости, чтобы наполнить его желаемой функциональностью. При тестировании моего продукта при запуске я получаю следующее нарушение ограничений использования, и я не уверен, почему и как это произошло. В моем продукте есть следующие пакеты: org.eclipse.epp.mpc.core.win32, com.sun.jna.platform и org.apache.http.client.

Может ли кто-нибудь помочь мне объяснить, что здесь происходит, и как я могу go решить проблему ?

  Bundle was not resolved because of a uses contraint violation.
  org.osgi.service.resolver.ResolutionException: Uses constraint violation. Unable to resolve resource org.eclipse.epp.mpc.core.win32 [osgi.identity; osgi.identity="org.eclipse.epp.mpc.core.win32"; type="osgi.bundle"; version:Version="1.7.1.v20180628-1139"; singleton:="true"] because it is exposed to package 'com.sun.jna.platform.win32' from resources com.sun.jna.platform [osgi.identity; osgi.identity="com.sun.jna.platform"; type="osgi.bundle"; version:Version="4.1.0.v20170410-1117"] and org.apache.http.client [osgi.identity; osgi.identity="org.apache.http.client"; type="osgi.bundle"; version:Version="4.5.0.v20181221_2153"] via two dependency chains.

Chain 1:
  org.eclipse.epp.mpc.core.win32 [osgi.identity; osgi.identity="org.eclipse.epp.mpc.core.win32"; type="osgi.bundle"; version:Version="1.7.1.v20180628-1139"; singleton:="true"]
    import: (&(osgi.wiring.package=com.sun.jna.platform.win32)(version>=4.1.0))
     |
    export: osgi.wiring.package: com.sun.jna.platform.win32
  com.sun.jna.platform [osgi.identity; osgi.identity="com.sun.jna.platform"; type="osgi.bundle"; version:Version="4.1.0.v20170410-1117"]

Chain 2:
  org.eclipse.epp.mpc.core.win32 [osgi.identity; osgi.identity="org.eclipse.epp.mpc.core.win32"; type="osgi.bundle"; version:Version="1.7.1.v20180628-1139"; singleton:="true"]
    import: (&(osgi.wiring.package=org.apache.http.impl.auth.win)(version>=4.3.6))
     |
    export: osgi.wiring.package: org.apache.http.impl.auth.win; uses:=com.sun.jna.platform.win32
    export: osgi.wiring.package=com.sun.jna.platform.win32
  org.apache.http.client [osgi.identity; osgi.identity="org.apache.http.client"; type="osgi.bundle"; version:Version="4.5.0.v20181221_2153"]
    at org.eclipse.osgi.container.Module.start(Module.java:444)
    at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1682)
    at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1661)
    at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:1624)
    at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1555)
    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)
...