Reputation: 639
We are upgrading from Spring Batch 2.2 to Spring Batch 4.1. My configuration is shown here: Spring Batch Partition Job Aggregation Problems When I start the server, I see the following log messages (I am trying to run with JMS response).
Caused by: org.springframework.integration.handler.support.MessagingMethodInvokerHelper$IneligibleMethodException: Found more than one parameter type candidate: [org.springframework.batch.core.partition.StepExecutionSplitter] and [org.springframework.batch.core.StepExecution]
The result is that message aggregation doesn't work as expected. Instead of all return messages going to a single MessageStore in the AggregatorMessageHandler, I see message going into a couple MessageStore. The logging clearly shows the Adding message placing the incoming messages into 2 different groups. (I shortened the message contect to improve readability).
2020-08-26 17:14:05,778 TRACE [AggregatingMessageHandler] (springbatch.taskExecutor-3) Adding message to group [ SimpleMessageGroup{groupId=4:partitioned.step, messages=[], timestamp=1598483645777, lastModified=0}]
2020-08-26 17:14:08,342 TRACE [AggregatingMessageHandler] (springbatch.taskExecutor-4) Adding message to group [ SimpleMessageGroup{groupId=4:partitioned.step, messages=[], timestamp=1598483648342, lastModified=0}]
2020-08-26 17:14:08,538 TRACE [AggregatingMessageHandler] (springbatch.taskExecutor-2) Adding message to group [ SimpleMessageGroup{groupId=4:partitioned.step, messages=[
GenericMessage [payload=StepExecution: id=51, version=3, name=partitioned.step:0, status=COMPLETED, exitStatus=COMPLETED, ...], timestamp=1598483645778, lastModified=1598483645778}
2020-08-26 17:14:12,117 TRACE [AggregatingMessageHandler] (springbatch.taskExecutor-5) Adding message to group [ SimpleMessageGroup{groupId=4:partitioned.step, messages=[
GenericMessage [payload=StepExecution: id=52, version=3, name=partitioned.step:2, status=COMPLETED, exitStatus=COMPLETED, ...]], timestamp=1598483645778, lastModified=1598483645778}
2020-08-26 17:14:13,680 TRACE [AggregatingMessageHandler] (springbatch.taskExecutor-1) Adding message to group [ SimpleMessageGroup{groupId=4:partitioned.step, messages=[
GenericMessage [payload=StepExecution: id=51, version=3, name=partitioned.step:0, status=COMPLETED, exitStatus=COMPLETED, ...],
GenericMessage [payload=StepExecution: id=49, version=3, name=partitioned.step:4, status=COMPLETED, exitStatus=COMPLETED, ], timestamp=1598483645778, lastModified=1598483648538}]
Is this due to the debug messages at startup? How can I resolve the problem? As far as I can tell, I am following the examples for configuration of a partitioned job over JMS. (Spring Batch 4.1)
Thanks in advance for any recommendations.
Upvotes: 0
Views: 295
Reputation: 121282
Try to configure that aggregator for partition handler with the method="aggregate"
. It looks like the parser tries to use a handle(StepExecutionSplitter, StepExecution)
from the MessageChannelPartitionHandler
as a candidate as well.
Upvotes: 1