简体   繁体   中英

Issue with DataHub in spring-integration

I am getting the below error when I try to post IDOC.

Dispatcher has no subscribers for channel 'DataHubWebApplicationContext.DEBMAS-DEBI'.; nested exception is org.springframework.integration.MessageDispatchingException: Dispatcher has no subscribers.

Xml mapping looks like this:

<int-xml:xpath-router id="splitKTOKD" input-channel="DEBMAS" evaluate-as-string="true" resolution-required="false"default-output-channel="DEBMAS-NOTSUPPORTED-KTOKD">
  <int-xml:xpath-expression id="splitKTOKDExpression" expression="//KTOKD" />
  <int-xml:mapping value="DEBI" channel="DEBMAS-DEBI" />
  <int-xml:mapping value="0170" channel="DEBMAS-0170" />
  <int-xml:mapping value="Z001" channel="DEBMAS-Z001" /> 
</int-xml:xpath-router>

<int:service-activator id="sapcustomerDEBMASCustomerServiceActivator" input-channel="DEBMAS-DEBI"          output-channel="rawFragmentDataInputChannel" ref="sapcustomerDEBMASCustomerMappingService" method="map" />
<int:service-activator id="sapcustomerDEBMASCustomerServiceActivator" input-channel="DEBMAS-Z001"          output-channel="rawFragmentDataInputChannel" ref="sapcustomerDEBMASCustomerMappingService" method="map" />

Though I have configured proper input-channel and output-channel I am getting the message delivery Exception only for channel DEBMAS-DEBI. DEBMAS-Z001, DEBMAS-0170 works fine.

Looks like this is something related to spring framework issue.

How can I resolve this spring issue?

You have two beans declared with the same sapcustomerDEBMASCustomerServiceActivator Id. By default the second wins. There is no the first bean in the application context. That's why you are observing that issue.

Use different ids or even without it to fix the problem.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM