Claus Ibsen created CAMEL-26122:
-----------------------------------

             Summary: camel-spring-batch - a message header with a null value 
fails the job launch
                 Key: CAMEL-26122
                 URL: https://issues.apache.org/jira/browse/CAMEL-26122
             Project: Camel
          Issue Type: Bug
          Components: camel-spring-batch
            Reporter: Claus Ibsen
             Fix For: 4.24.0


Found while adding the catalog body types of flink, spring-batch and 
optaplanner (CAMEL-24961, PR #28418).

h4. 1. A header with a null value fails the job launch

{{SpringBatchProducer}} turns every message header into a job parameter; for a 
null value it calls {{parametersBuilder.addString(headerKey, null)}} (main 
2a465aa4814c, line 106), with a comment saying this avoids an NPE. Spring Batch 
6 rejects a null value, so any exchange with a null header fails "Value for 
parameter 'nullHeader' must not be null". Checked on 4.24.0-SNAPSHOT with an 
in-memory {{ResourcelessJobRepository}} and a tasklet job.

Proposed: skip headers with a null value (and fix the comment).

_Claude Code on behalf of davsclaus_



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

Reply via email to