2016-11-10 48 views
0

我想在我的骆驼路线中实例化一个“cxf:cxfEndpoint”。但束停留在与以下日志“GRACEPERIOD”状态:捆绑停留在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> 

+0

这通常表明你需要安装一些karaf功能,其应用程序是依赖。您正在使用camel-cxf,因此您是否运行了以下功能:首先安装camel-cxf? –

+0

我安装了这个名单,我仍然有同样的问题 特点:addUrl MVN:org.apache.camel.karaf/Apache的骆驼/ 2.9.0/XML /功能 特点:安装战争 特点:安装CXF 特点:安装camel-jaxb 功能:安装camel-blueprint 功能:安装camel-cxf – Dali

+0

哪个版本的JBoss Fuse是它的? 6.3 ??你使用JBoss Fuse 6.3 EAP安装吗? –

回答

1

好像你真的搞砸了你的蓝图架构declartions。东西替换蓝图宣言像下面

<?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"> 

,并使用“CXF”,而不是“camelcxf”为前缀的端点和豆制品,这将变得更加清晰和redeable(尽管您可以自由使用任何你喜欢使用的前缀)。

好吧,为了避免混淆使用如下,这将解决等着依赖错误:

<?xml version="1.0" encoding="UTF-8"?> 
<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0" 
    xmlns:cm="http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.2.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"> 

    <cxf:cxfEndpoint id="fist" 
     serviceClass="com.entreprise.example.services.firstService" address="http://localhost:8181/cxf/example/firstMsg"> 
     <cxf:properties> 
      <entry key="dataFormat" value="POJO" /> 
      <entry key="loggingFeatureEnabled" value="true" /> 
     </cxf:properties> 
    </cxf:cxfEndpoint> 
    <cxf:cxfEndpoint id="second" 
     serviceClass="com.entreprise.example.services.secondService" address="http://localhost:8181/cxf/example/secondMessage"> 
     <cxf:properties> 
      <entry key="dataFormat" value="POJO" /> 
      <entry key="loggingFeatureEnabled" value="true" /> 
     </cxf:properties> 
    </cxf: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> 

</blueprint>