无法安装包含camel-spring的KAR:缺少spring bean

时间:2017-01-18 22:31:34

标签: spring apache-camel apache-karaf osgi-bundle spring-bean

我已经构建了捆绑在OSGi JAR包中的应用程序,现在我正在尝试创建一个KAR文件,以便轻松部署到Apache Karaf 4.0.8。

当我删除KAR文件时,会发出一条警告消息,指出由于缺少org.springframework.beans要求而无法解决骆驼春天。

2017-01-18 19:07:12,239 | WARN  | raf-4.0.8/deploy | KarServiceImpl | 36 -
    org.apache.karaf.kar.core - 4.0.8 | Unable to install Kar feature
        interfacturas-kar/1.0.0.SNAPSHOT
    org.osgi.service.resolver.ResolutionException: Unable to resolve root:
       missing requirement [root] osgi.identity;
       osgi.identity=interfacturas-kar;
       type=karaf.feature;
       version="[1.0.0.SNAPSHOT,1.0.0.SNAPSHOT]";
       filter:="(&(osgi.identity=interfacturas-kar)
                  (type=karaf.feature(version>=1.0.0.SNAPSHOT)
                                     (version<=1.0.0.SNAPSHOT))"
    [caused by: Unable to resolve interfacturas-kar/1.0.0.SNAPSHOT:
        missing requirement [interfacturas-kar/1.0.0.SNAPSHOT] osgi.identity;
        osgi.identity=org.apache.camel.camel-spring;
        type=osgi.bundle;
        version="[2.17.0.redhat-630187,2.17.0.redhat-630187]";
        resolution:=mandatory
    [caused by: Unable to resolve org.apache.camel.camel-spring/2.17.0.redhat-630187:
        missing requirement [org.apache.camel.camel-spring/2.17.0.redhat-630187]
        osgi.wiring.package;
        filter:="(&(osgi.wiring.package=org.springframework.beans)
                   (version>=3.2.0)(!(version>=4.0.0)))"]]

我无法理解为什么会这样! kar文件包含适当版本​​的spring-beans JAR文件:

$ unzip -l interfacturas-kar-1.0.0-SNAPSHOT.kar
...
   614354  2017-01-11 19:07   repository/org/springframework/spring-beans/3.2.16.RELEASE/spring-beans-3.2.16.RELEASE.jar
...

KAR文件及其相关的功能XML文件完全由karaf-maven-plugin生成,它还列出了spring-beans依赖项:

<bundle>wrap:mvn:org.springframework/spring-beans/3.2.16.RELEASE</bundle>

以及其他与春天相关的资源。

任何人都知道如何解决这个问题?或者为什么会这样?

BTW,camel-spring实际上是camel-cxf的依赖;我使用蓝图来定义路线。

0 个答案:

没有答案