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

时间:2018-05-11 18:54:51

标签: spring apache-camel cxf jbossfuse fuseesb

我在Jboss Fuse 6.3中部署camel cxf webservice时遇到了问题。 该组件在本地实例中正常工作,但在其他情况下失败。它正处于一个递归循环中,并且日志堆积在同样的异常中。

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]

1 个答案:

答案 0 :(得分:0)

这个问题在评论中得到了解决。对于使用者和端点,问题在相同的分配标识ApiReadEndpoint中。这导致递归端点初始化。从使用者重命名或删除可选的id属性后,上下文按预期启动。