无法在 JBoss Fuse 6.3 上解析端点 CXF

Failed to resolve endpoint CXF on JBoss Fuse 6.3

我在 Jboss Fuse 6.3 中部署 camel cxf web 服务时遇到问题。 该组件在本地实例中工作正常,但在其他实例中失败。它在递归循环中进行,并且日志堆积起来有相同的异常。

Apache 骆驼版本 - 2.17.0

Jboss EAP 6.4

感谢任何帮助。

端点配置:

<cxf:cxfEndpoint id="ApiReadEndpoint" xmlns:nms="urn:company:esb:services:CoreInsuranceRead:v01"
    address="{{esb.api.outread.contextpathurl}}"
    wsdlURL="wsdl/aoiRead/CoreInsuranceReadInterface.wsdl"
    endpointName="nms:SysTest"
    serviceName="nms:CoreInsuranceReadService">

    <cxf:properties>
        <entry key="dataFormat" value="PAYLOAD" />
        <entry key="ws-security.validate.token" value="false" /> 
    </cxf:properties>
    <cxf:inInterceptors>
        <ref bean="wss4jInInterceptor" />
        <ref bean="authenticationInterceptor" />
        <ref bean="authorizationInterceptor" />
     </cxf:inInterceptors>

</cxf:cxfEndpoint>

骆驼路线:

<route id="APIReadServiceRoute" streamCache="true">
  <from id="ApiReadEndpoint" uri="cxf:bean:ApiReadEndpoint"/>
  <doTry id="_doTry1">
      <to id="_to1" uri="direct:ClaimRead"/>
      <doCatch id="_doCatch1">
          <exception>java.lang.Exception</exception>
          <handled>
              <constant>true</constant>
          </handled>
      </doCatch>
  </doTry>
</route>

错误日志:

Caused by: org.apache.camel.ResolveEndpointFailedException: Failed to resolve endpoint: cxf://bean:ApiReadEndpoint due to: org.springframework.beans.factory.BeanCreationException:
     Error creating bean with name 'ApiReadEndpoint': FactoryBean threw exception on object creation; nested exception is org.apache.camel.ResolveEndpointFailedException: 
        at org.apache.camel.impl.DefaultCamelContext.getEndpoint(DefaultCamelContext.java:589) [camel-core-2.17.0.redhat-630310.jar:2.17.0.redhat-630310]
        at org.apache.camel.core.xml.AbstractCamelEndpointFactoryBean.getObject(AbstractCamelEndpointFactoryBean.java:55)
        at org.apache.camel.spring.CamelEndpointFactoryBean.getObject(CamelEndpointFactoryBean.java:60) [camel-spring-2.17.0.redhat-630310.jar:2.17.0.redhat-630310]
        at org.apache.camel.spring.CamelEndpointFactoryBean.getObject(CamelEndpointFactoryBean.java:38) [camel-spring-2.17.0.redhat-630310.jar:2.17.0.redhat-630310]
        at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.doGetObjectFromFactoryBean(FactoryBeanRegistrySupport.java:166) [spring-beans-3.2.18.RELEASE.jar:3.2.18.RELEASE]
        at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.getObjectFromFactoryBean(FactoryBeanRegistrySupport.java:102) [spring-beans-3.2.18.RELEASE.jar:3.2.18.RELEASE]
        at org.springframework.beans.factory.support.AbstractBeanFactory.getObjectForBeanInstance(AbstractBeanFactory.java:1467) [spring-beans-3.2.18.RELEASE.jar:3.2.18.RELEASE]
        at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:246) [spring-beans-3.2.18.RELEASE.jar:3.2.18.RELEASE]
        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:195) [spring-beans-3.2.18.RELEASE.jar:3.2.18.RELEASE]
        at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1131) [spring-context-3.2.18.RELEASE.jar:3.2.18.RELEASE]
        at org.apache.camel.spring.spi.ApplicationContextRegistry.lookupByNameAndType(ApplicationContextRegistry.java:47) [camel-spring-2.17.0.redhat-630310.jar:2.17.0.redhat-630310]
        at org.apache.camel.impl.PropertyPlaceholderDelegateRegistry.lookupByNameAndType(PropertyPlaceholderDelegateRegistry.java:63) [camel-core-2.17.0.redhat-630310.jar:2.17.0.redhat-630310]
        at org.apache.camel.util.CamelContextHelper.lookup(CamelContextHelper.java:137) [camel-core-2.17.0.redhat-630310.jar:2.17.0.redhat-630310]
        at org.apache.camel.util.CamelContextHelper.mandatoryLookup(CamelContextHelper.java:157) [camel-core-2.17.0.redhat-630310.jar:2.17.0.redhat-630310]

此问题已在评论中解决。问题出在消费者和端点的相同分配 ID ApiReadEndpoint 中。这导致递归端点初始化。从消费者重命名或删除可选 id 属性后,上下文按预期启动。