OSGi使用约束违规

时间:2013-03-02 03:30:37

标签: maven osgi bundle fuseesb jbossfuse

我尝试在FUSE ESB OSGi容器中启动由Maven创建的包。但我的三个依赖项出错:

1. libthrift-0.7.0.jar
2. httpclient-4.0.1.jar
3. httpcore-4.0.1.jar

Error executing command: Error starting bundles:
Unable to start bundle 262: Uses constraint violation. Unable to resolve bundle 
revision file__opt_FuseESBEnterprise-7.1.0_deploy_libthrift-0.7.0.jar [316.0]
because it is exposed to package 'org.apache.http' from bundle revisions 
org.apache.httpcomponents.httpcore [291.0] and org.apache.httpcomponents.httpclient     
[290.0] via two dependency chains.

Chain 1:
 file__opt_FuseESBEnterprise-7.1.0_deploy_libthrift-0.7.0.jar [316.0]
import: (osgi.wiring.package=org.apache.http)
 |
export: osgi.wiring.package=org.apache.http
org.apache.httpcomponents.httpcore [291.0]

Chain 2:
file__opt_FuseESBEnterprise-7.1.0_deploy_libthrift-0.7.0.jar [316.0]
import: (osgi.wiring.package=org.apache.http.client)
 |
export: osgi.wiring.package=org.apache.http.client; uses:=org.apache.http
export: osgi.wiring.package=org.apache.http
org.apache.httpcomponents.httpclient [290.0]

有谁可以向我解释这个错误是什么?

1 个答案:

答案 0 :(得分:2)

您是如何安装http核心和客户端捆绑包的?

您可以尝试安装camel-http4作为功能,因为它提供了开箱即用的http客户端。

features:install camel-http4

之后只需安装自己的捆绑包。