【发布时间】:2021-08-14 09:43:14
【问题描述】:
如何克服这个链依赖问题?
Error executing command: Error executing command on bundles:
Error starting bundle 429: Could not resolve module: com.sample.eventhistory [429]
Bundle was not resolved because of a uses contraint violation.
org.osgi.service.resolver.ResolutionException: Uses constraint violation. Unable to resolve resource com.sample.eventhistory [osgi.identity; osgi.identity="com.sample.eventhistory"; type="osgi.bundle"; version:Version="1.90.0.SNAPSHOT"] because it exports package 'com.sample.restenquiry.exceptions' and is also exposed to it from resource com.sample.eventhistory [osgi.identity; osgi.identity="com.sample.eventhistory"; type="osgi.bundle"; version:Version="1.90.0.SNAPSHOT"] via the following dependency chain:
com.sample.eventhistory [osgi.identity; osgi.identity="com.sample.eventhistory"; type="osgi.bundle"; version:Version="1.90.0.SNAPSHOT"]
import: (osgi.wiring.package=com.sample.restutil.impl)
|
export: osgi.wiring.package=com.sample.restutil.impl; uses:=com.sample.restservice
rest [osgi.identity; osgi.identity="edmexporest"; type="osgi.bundle"; version:Version="1.90.0.SNAPSHOT"]
import: (&(osgi.wiring.package=com.sample.restservice)(&(version>=1.90.0)(!(version>=2.0.0))))
|
export: osgi.wiring.package: com.sample.restservice; uses:=com.sample.restenquiry.exceptions
export: osgi.wiring.package=com.sample.restenquiry.exceptions
com.sample.eventhistory [osgi.identity; osgi.identity="com.sample.eventhistory"; type="osgi.bundle"; version:Version="1.90.0.SNAPSHOT"]
在部署捆绑服务时没有出现。而是在 karaf 控制台中出现上述错误
【问题讨论】:
标签: java osgi bundle apache-karaf