spring-batch icon indicating copy to clipboard operation
spring-batch copied to clipboard

CommandLineJobRunner assumes stdin contains job parameters; cannot pipe in data [BATCH-2293]

Open spring-projects-issues opened this issue 11 years ago • 2 comments

Steven Anton opened BATCH-2293 and commented

When using the CommandLineJobRunner, you cannot pipe in data through stdin without an exception. It appears the class assumes stdin is used to pipe in job parameters; the data file cannot be parsed as such and therefore an exception is thrown. (The relevant lines I think are 533-545 in CommandLineJobRunner.java.) It seems like this is a rather strange default behavior. Maybe it would be better to use a flag to indicate that additional job parameters are being passed in through stdin? That change wouldn't be backward compatible, though, so maybe this functionality can be disabled with a flag or the exception can be caught?


Affects: 3.0.1

Reference URL: http://forum.spring.io/forum/spring-projects/batch/97225-commandlinejobrunner-and-standard-input

spring-projects-issues avatar Aug 12 '14 13:08 spring-projects-issues