Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

retry can't use in reader? [BATCH-2643] #960

spring-issuemaster opened this issue Oct 13, 2017 · 0 comments

retry can't use in reader? [BATCH-2643] #960

spring-issuemaster opened this issue Oct 13, 2017 · 0 comments


Copy link

@spring-issuemaster spring-issuemaster commented Oct 13, 2017

lly835 opened BATCH-2643 and commented

throw exception in reader

    public FlatFileItemReader<Person> reader() {

        FlatFileItemReader<Person> reader = new FlatFileItemReader<Person>();
        reader.setResource(new ClassPathResource("sample-data.csv"));
        reader.setLineMapper(new DefaultLineMapper<Person>() {{
            setLineTokenizer(new DelimitedLineTokenizer() {{
                setNames(new String[] { "firstName", "lastName" });
            setFieldSetMapper(new BeanWrapperFieldSetMapper<Person>() {{
//        return reader;
        throw new RuntimeException("error...");

use retry in step

public Step step1(PersonItemProcessor processor, ItemReader reader) {
    return stepBuilderFactory.get("step1")
            .<Person, Person> chunk(10)
            .retryPolicy(new AlwaysRetryPolicy())

it would not retry

Affects: 3.0.7

Issue Links:

  • BATCH-2562 Retry not working with FaultTolerantStepBuilder
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
1 participant
You can’t perform that action at this time.