bundle保持GracePeriod状态

时间:2016-11-10 10:35:17

标签: apache-camel bundle jbossfuse

我正在尝试实例化" cxf:cxfEndpoint"在我的骆驼路线。但是这个捆绑包留在" GracePeriod"状态如下:

2016-11-10 11:03:07,598 | INFO  | rint Extender: 1 | BlueprintContainerImpl           | ? ? | 21 - org.apache.aries.blueprint.core - 1.4.2 | Bundle com.entreprise.example is waiting for namespace handlers [http://camel.apache.org/schema/blueprint]

我的camelContext.xml文件是:

<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:cm="http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.0.0"
xmlns:jaxws="http://cxf.apache.org/blueprint/jaxws" xmlns:cxf="http://cxf.apache.org/blueprint/core"
xmlns:camel="http://camel.apache.org/schema/blueprint" xmlns:camelcxf="http://camel.apache.org/schema/blueprint/cxf"
xsi:schemaLocation=" http://www.osgi.org/xmlns/blueprint/v1.0.0 http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd 
http://cxf.apache.org/blueprint/jaxws http://cxf.apache.org/schemas/blueprint/jaxws.xsd 
http://cxf.apache.org/blueprint/core http://cxf.apache.org/schemas/blueprint/core.xsd">

<camelcxf:cxfEndpoint id="fist"
    serviceClass="com.entreprise.example.services.firstService"
    address="http://localhost:8181/cxf/example/firstMsg">
    <camelcxf:properties>
        <entry key="dataFormat" value="POJO" />
        <entry key="loggingFeatureEnabled" value="true" />
    </camelcxf:properties>
</camelcxf:cxfEndpoint>
<camelcxf:cxfEndpoint id="second"
    serviceClass="com.entreprise.example.services.secondService"
    address="http://localhost:8181/cxf/example/secondMessage">
    <camelcxf:properties>
        <entry key="dataFormat" value="POJO" />
        <entry key="loggingFeatureEnabled" value="true" />
    </camelcxf:properties>
</camelcxf:cxfEndpoint>
<camelContext trace="false" id="example"
    xmlns="http://camel.apache.org/schema/blueprint">
    <route>
        <from uri="cxf:bean:first" />
        <to uri="cxf:bean:second" />
    </route>
</camelContext>

1 个答案:

答案 0 :(得分:1)

好像你已经搞砸了你的蓝图模式声明。用以下内容替换蓝图声明

validate()

使用“ cxf ”代替“ camelcxf ”作为Endpoint和Bean的前缀,这将变得更加清晰和可兑换(尽管您可以自由使用任何前缀你喜欢用)。

好的,为避免混淆使用如下所示,这将解决等待依赖项错误:

<?xml version="1.0" encoding="UTF-8"?>
<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
  xmlns:cxf="http://camel.apache.org/schema/blueprint/cxf"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
    xsi:schemaLocation="http://www.osgi.org/xmlns/blueprint/v1.0.0 https://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">
相关问题