Osgi 无法解析271.0:缺少需求[271.0]包;(&;(package=org.apache.cxf.jaxrs.client)(版本>;=2.7.0)(!(版本>;=3.0.0)))

Osgi 无法解析271.0:缺少需求[271.0]包;(&;(package=org.apache.cxf.jaxrs.client)(版本>;=2.7.0)(!(版本>;=3.0.0))),osgi,osgi-bundle,karaf,Osgi,Osgi Bundle,Karaf,我正在尝试安装捆绑包,但出现以下错误: org.osgi.framework.BundleException: Unresolved constraint in bundle horizon-util [271]: Unable to resolve 271.0: missing requirement [271.0] package; (&(package =org.apache.cxf.jaxrs.client)(version>=2.7.0)(!(version>=3.

我正在尝试安装捆绑包,但出现以下错误:

org.osgi.framework.BundleException: Unresolved constraint in bundle horizon-util [271]: Unable to resolve 271.0: missing requirement [271.0] package; (&(package
=org.apache.cxf.jaxrs.client)(version>=2.7.0)(!(version>=3.0.0)))
Bundle ID: 271
这些是我的包:

karaf@root> osgi:list
START LEVEL 100 , List Threshold: 50
   ID   State         Blueprint      Spring    Level  Name
[  45] [Active     ] [            ] [       ] [   50] geronimo-j2ee-management_1.1_spec (1.0.1)
[  46] [Active     ] [            ] [       ] [   50] Commons Collections (3.2.1)
[  47] [Active     ] [            ] [       ] [   50] Apache ServiceMix :: Bundles :: jasypt (1.9.0.1)
[  48] [Active     ] [            ] [       ] [   50] geronimo-jms_1.1_spec (1.1.1)
[  49] [Active     ] [            ] [       ] [   50] Commons Pool (1.6.0)
[  50] [Active     ] [            ] [       ] [   50] Apache ServiceMix :: Bundles :: xpp3 (1.1.0.4c_5)
[  51] [Active     ] [            ] [       ] [   50] Apache ServiceMix Bundles: dom4j-1.6.1 (1.6.1.2)
[  52] [Active     ] [            ] [       ] [   50] Commons Lang (2.6)
[  53] [Active     ] [            ] [       ] [   50] Apache ServiceMix Bundles: oro-2.0.8 (2.0.8.3)
[  54] [Active     ] [            ] [       ] [   50] Apache ServiceMix :: Specs :: Stax API 1.0 (1.9.0)
[  55] [Active     ] [            ] [       ] [   50] Apache ServiceMix Bundles: xstream-1.3 (1.3.0.3)
[  56] [Active     ] [            ] [       ] [   50] Apache ServiceMix :: Bundles :: jdom (1.1.0.4)
[  57] [Active     ] [            ] [       ] [   50] Apache ServiceMix :: Bundles :: velocity (1.7.0.4)
[  58] [Active     ] [            ] [       ] [   50] Apache Aries Transaction Manager (0.3.0)
[  59] [Active     ] [            ] [       ] [   50] kahadb (5.7.0)
[  60] [Active     ] [            ] [       ] [   50] activemq-pool (5.7.0)
[  61] [Active     ] [            ] [       ] [   50] activemq-console (5.7.0)
[  62] [Active     ] [            ] [       ] [   50] activemq-ra (5.7.0)
[  63] [Active     ] [Created     ] [       ] [   50] activemq-core (5.7.0)
                                       Fragments: 68
[  64] [Active     ] [Created     ] [       ] [   50] activemq-karaf (5.7.0)
[  65] [Active     ] [Created     ] [       ] [   50] Apache XBean :: OSGI Blueprint Namespace Handler (3.11.1)
[  66] [Active     ] [            ] [       ] [   50] Commons JEXL (2.0.1)
[  67] [Active     ] [            ] [       ] [   50] Apache ServiceMix :: Specs :: Scripting API 1.0 (1.9.0)
[  68] [Resolved   ] [            ] [       ] [   50] activemq-blueprint (5.7.0)
                                       Hosts: 63
[  69] [Active     ] [Created     ] [       ] [   50] activemq-broker.xml (0.0.0)
[  83] [Active     ] [            ] [       ] [   50] Joda-Time (1.6.2)
[  84] [Active     ] [            ] [       ] [   50] Apache XBean :: Spring (3.11.1)
[  85] [Active     ] [            ] [       ] [   50] activemq-spring (5.7.0)
[  99] [Active     ] [Created     ] [       ] [   50] camel-karaf-commands (2.10.7)
[ 100] [Active     ] [            ] [       ] [   50] camel-core (2.10.7)
[ 102] [Active     ] [            ] [       ] [   50] camel-spring (2.10.7)
[ 103] [Active     ] [Created     ] [       ] [   50] camel-blueprint (2.10.7)
[ 106] [Active     ] [            ] [       ] [   50] camel-jms (2.10.7)
[ 107] [Active     ] [            ] [       ] [   50] activemq-camel (5.7.0)
[ 172] [Active     ] [            ] [       ] [   50] Apache CXF Compatibility Bundle Jar (2.6.9)
[ 173] [Active     ] [Created     ] [       ] [   50] camel-cxf (2.10.7)
[ 174] [Active     ] [            ] [       ] [   50] camel-cxf-transport (2.10.7)
[ 181] [Resolved   ] [            ] [       ] [   80] simple-camel-blueprint.xml (0.0.0)
[ 182] [Active     ] [            ] [       ] [   50] camel-stream (2.10.7)
[ 188] [Installed  ] [            ] [       ] [   80] ERP-blueprint.xml (0.0.0)
[ 199] [Active     ] [            ] [       ] [   50] camel-sql (2.10.7)
[ 204] [Installed  ] [            ] [       ] [   80] horizon-core (0.0.1)
[ 206] [Active     ] [            ] [       ] [   50] Data mapper for Jackson JSON processor (1.9.10)
[ 207] [Active     ] [            ] [       ] [   50] Jackson JSON processor (1.9.10)
[ 208] [Active     ] [            ] [       ] [   50] camel-jackson (2.10.7)
[ 209] [Active     ] [            ] [       ] [   50] MongoDB Java Driver (2.11.2.RELEASE)
[ 259] [Installed  ] [            ] [       ] [   80] Spring Data MongoDB Support (1.3.3.RELEASE)
[ 269] [Installed  ] [            ] [       ] [   80] horizon-util (0.0.1)
我是否需要将Apache CXF更新到2.7.0版本? 我该怎么做? 我试图更新捆绑包,但没有成功

感谢您提供的任何指针您的horizon util捆绑包依赖于版本大于等于2.7.0的捆绑包org.apache.cxf.jaxrs.client
因此,请尝试安装适当的版本以解决此错误。

在我的情况下,我安装了Apache CXF,但没有安装Camel,因此我将为您介绍此场景的步骤,但可能它对Camel也会起到同样的作用。 因此,要首先删除当前版本,必须删除存储库:

feature:repo-list
   --> gives you the list of repositories (in my case cxf-2.x.x)

feature:repo-remove cxf-2.x.x
   --> removes the repository from Karaf

feature:repo-add mvn:org.apache.cxf.karaf/apache-cxf/2.7.10/xml/features
   --> Adds new version of CXF repository (in this case 2.7.0)

feature:install cxf-jaxrs
   --> Installs the part of CXF you need (or cxf instead of cxf-jaxrs if we need all)

feature:list | grep cxf
   --> shows a list of bundles related to CXF. [x] means that they are started
我希望这对你有帮助