当我尝试启动一个捆绑包时出现以下错误
Chain 1:
foo.bar.fizz.core.rest.impl [foo.bar.fizz.core.rest.impl [208](R 208.0)]
import: (&(osgi.wiring.package=javax.annotation)(version>=1.2.0)(!(version>=2.0.0)))
|
export: osgi.wiring.package: javax.annotation
org.apache.felix.framework [org.apache.felix.framework [0](R 0)]
Chain 2:
foo.bar.fizz.core.rest.impl [foo.bar.fizz.core.rest.impl [208](R 208.0)]
import: (&(osgi.wiring.package=foo.bar.fizz.cdac.tableobject.api)(version>=8.60.0)(!(version>=9.0.0)))
|
export: osgi.wiring.package=foo.bar.fizz.cdac.tableobject.api; uses:=com.google.common.collect
foo.bar.fizz.cdac.tableobject [foo.bar.fizz.cdac.tableobject [196](R 196.0)]
import: (&(osgi.wiring.package=com.google.common.collect)(version>=16.0.0)(!(version>=17.0.0)))
|
export: osgi.wiring.package=com.google.common.collect; uses:=javax.annotation
com.google.guava [com.google.guava [29](R 29.0)]
import: (osgi.wiring.package=javax.annotation)
|
export: osgi.wiring.package: javax.annotation
org.jsr-305 [org.jsr-305 [28](R 28.0)] Unresolved requirements: [[foo.bar.fizz.core.rest.impl [208](R 208.0)] osgi.wiring.package; (&(osgi.wiring.package=foo.bar.fizz.cdac.tableobject.api)(version>=8.60.0)(!(version>=9.0.0)))]
我理解为什么会出现错误(因为一个依赖来自两个流,而 osgi 在两者之间混淆了)。但是,我不知道如何避免这种情况,因为一个流程是“org.apache.felix”,它以 0 开始级别开始,我似乎无法改变它。
以下是捆绑包的更多日志:tree-show
foo.bar.fizz.cdac.tableobject [197]
+- foo.bar.fizz.cdac.api [194]
| +- foo.cil.cdac.cil-cdac-common-api [133]
| +- avro [292]
| | +- org.xerial.snappy.snappy-java [329]
| | +- jackson-core-asl [314]
| | +- jackson-mapper-asl [315]
| | | +- jackson-core-asl [314]
| | +- org.ops4j.pax.logging.pax-logging-api [6]
| | | +- org.apache.karaf.services.eventadmin [3]
| | | +- org.apache.felix.metatype [2]
| | | +- org.apache.felix.configadmin [9]
| | | +- org.apache.felix.coordinator [8]
| | +- org.apache.commons.compress [293]
| | | +- org.tukaani.xz [328]
| | +- com.thoughtworks.paranamer [257]
| | +- org.glassfish.hk2.external.jakarta.inject [92]
| +- com.google.gson [252]
| +- foo.bar.common.datatypes.date [224]
| | +- joda-time [287]
| +- foo.cil.client.service [136]
| | +- avro [292]
| | +- org.apache.servicemix.bundles.lucene [309]
| | +- org.apache.servicemix.bundles.lucene-queryparser [307]
| | +- org.apache.servicemix.bundles.lucene [309]
| | +- org.apache.servicemix.bundles.lucene-sandbox [308]
| | | +- org.apache.servicemix.bundles.lucene [309]
| | | +- org.apache.servicemix.bundles.jakarta-regexp [303]
| | +- org.apache.servicemix.bundles.lucene-queries [306]
| | +- org.apache.servicemix.bundles.lucene [309]
| +- org.ops4j.pax.logging.pax-logging-api [6]
| +- foo.bar.fizz.businessentity [193]
| +- foo.bar.common.datatypes.date [224]
+- foo.bar.common.datatypes.date [224]
+- com.fasterxml.jackson.core.jackson-databind [242]
| +- com.fasterxml.jackson.core.jackson-annotations [238]
| +- com.fasterxml.jackson.core.jackson-core [240]
+- org.ops4j.pax.logging.pax-logging-api [6]
+- foo.bar.fizz.businessentity [193]
+- com.google.guava [30] <- START LEVEL
+- org.jsr-305 [29]
+- org.glassfish.hk2.external.jakarta.inject [92]
karaf@root()>
我尝试了什么但没有奏效?
- 我尝试将捆绑包列入黑名单,但没有真正发生。
- 我尝试排除导致此问题的依赖项(jsr-305),但这也不起作用。
- 开始级别已更改。
请提出一些可以解决这个问题的建议,或者至少为我指明正确的方向。