![](/img/trans.png)
[英]Apache Mina Integration With Aries blueprint have problem
[英]Unable to deploy a osgi bundle containing a camel route defined via aries blueprint in Websphere 8.5
我創建了一個.eba文件(企業捆綁包檔案),其中包含一個具有apache駱駝路由(Java DSL)的osgi捆綁包。 駱駝上下文定義是通過一個xml藍圖文件完成的。 當我嘗試在Websphere Application Server 8.5中部署.eba文件時,出現以下異常:
org.apache.aries.application.modelling.ModellerException:CWSAL0126E:對捆綁包ib-base_0.0.1.SNAPSHOT建模時發生了異常:org.apache.aries.application.modelling.ModellerException:org.osgi.service.blueprint.container。 ComponentDefinitionException:不支持的節點名稱空間: http : //camel.apache.org/schema/blueprint 。
我的藍圖xml文件如下:
<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:camel="http://camel.apache.org/schema/blueprint"
xsi:schemaLocation="
http://www.osgi.org/xmlns/blueprint/v1.0.0
http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd
http://camel.apache.org/schema/blueprint http://camel.apache.org/schema/blueprint/camel-
blueprint.xsd">
<camel:camelContext id="cbrContext" trace="false">
<camel:packageScan>
<camel:package>a.b.c.d</camel:package>
</camel:packageScan>
</camel:camelContext>
</blueprint>
我不太確定為什么這在Websphere中會失敗。 相同的.eba文件已成功部署在Karaf 3.0.0-SNAPSHOT中。 (此版本的Karaf使用Aries Blueprint版本1.0.0)。
我猜想在Websphere 8.5中使用相同的版本或使用Aries Blueprint 1.0.0的分叉版本。
根據OSGi規范,自定義名稱空間(如camel :)的所有藍圖擴展處理程序都是從OSGi服務注冊表中的鍵(osgi.service.blueprint.namespace)檢索的。 value元素告訴實際的名稱空間uri。
例如:
<service interface="org.apache.aries.blueprint.NamespaceHandler">
<service-properties>
<entry key="osgi.service.blueprint.namespace" value="http://camel.apache.org/schema/blueprint"/>
<entry key="osgi.service.blueprint.namespace" value="http://camel.apache.org/schema/blueprint/cxf"/>
</service-properties>
<bean class="org.apache.camel.blueprint.handler.CamelNamespaceHandler">
</bean>
</service>
我不太確定為什么IBM不遵守該規范。
值得考慮的另一個有趣的事實是,當我嘗試使用Websphere Application Developer Tool創建藍圖.xml文件時,它僅顯示4個擴展名,如下所示:
我確保將駱駝核心和駱駝藍圖包都部署在Websphere的內部存儲庫中。
我試圖將.eba文件部署為資產。
不太確定,如果我錯過了什么。 如果有人能指出我正確的方向,我將感到非常高興。
最好的祝福,
斯里拉曼。
WebSphere不支持定制名稱空間擴展(IBM提供的擴展除外)。 主要原因是它在Aries(藍圖容器)隔離的運行時上運行。 有兩種選擇
卡拉夫是駱駝的友好容器。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.