Не удалось разрешить конечную точку CXF на JBoss Fuse 6.3 - PullRequest
0 голосов
/ 11 мая 2018

Возникла проблема при развертывании веб-службы camel cxf в Jboss Fuse 6.3.Компонент работает нормально в локальном экземпляре, но в другом экземпляре происходит сбой.Это происходит в рекурсивном цикле, и журналы накапливаются с тем же исключением.

Версия Apache Camel - 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 голосов
/ 11 мая 2018

Этот вопрос был решен в комментариях. Проблема была в идентичном присвоенном идентификаторе ApiReadEndpoint для потребителя и конечной точки. Это вызвало рекурсивную инициализацию конечной точки. После переименования или удаления необязательного атрибута id у потребителя контекст начался, как и ожидалось.

...