2017-10-16 97 views
0

以下我想知道在保險絲織物環境中部署駱駝項目的事情。 我已經創建了捆綁包。這些捆紮罐在非織物環境中工作良好。我 - 當我移動這些罐子在jboss-fuse上部署目錄時,它完美地工作。 當相同的罐子被移動到子容器時,它不起作用。的事情,我已經設置了面料的環境如下:在保險絲織物中部署駱駝項目

創建面料容器:

fabric:create --new-user fadmin --new-user-password maskerkey --generate-zookeeper-password --resolver localip 

子容器:

fabric:container-create-child root node 2 

我應該如何部署同捆罐子孩子容器?下面的例外,當我部署捆綁罐子我看到:

org.osgi.framework.BundleException: Unresolved constraint in bundle BUNDLE_NAME [139]: Unable to resolve 139.0: missing requirement [139.0] osgi.wiring.package; (osgi.wiring.package=org.apache.activemq.camel.component) 

回答

3

當你有面料的環境,你不應該使用deploy/目錄。這是相當原型的目的。

使用當您創建子容器:

fabric:container-create-child root node 2 

您現在有一個名爲node1兩個容器和node2

一個在OSGi是隻是一個增強 JAR。

A(Karaf)特徵(以及可能的配置)的集合,這樣就可以更容易地安裝多個束。

A(織物)輪廓是束,特徵,構造和資源(粗略地)一個聲明,這樣就可以安裝多個(karaf)功能更容易。

您的錯誤消息表示沒有安裝任何軟件包,可以滿足您的軟件包的要求。更準確地說,你缺少一個出口org.apache.activemq.camel.component包的軟件包。

如果你看一下配置文件和可用保險絲的功能,你會看到:

JBossFuse:[email protected]> features:info activemq-camel 
Description of activemq-camel 5.11.0.redhat-vvv feature 
---------------------------------------------------------------- 
Feature has no configuration 
Feature has no configuration files 
Feature depends on: 
    activemq-client 5.11.0.redhat-vvv 
    camel-spring [2.17,3) 
    camel-jms [2.17,3) 
    camel [2.17,3) 
Feature contains followed bundles: 
mvn:org.apache.activemq/activemq-camel/5.11.0.redhat-vvv start-level=50 
Feature has no conditionals. 

(其中vvv給出保險絲的版本)。

現在你已經創建輪廓

profile-create myprofile 

添加activemq-camel功能吧:

profile-edit --feature activemq-camel myprofile 

你的包添加到它:

profile-edit --bundle mvn:your-groupId/your-artifactId/your-version 

,並指定該配置文件到一個容器(容器)

container-add-profile node1 myprofile