Results 1 to 2 of 2

Thread: How dump exception logs in ListFieldstemapper into execution context

  1. #1

    Default How dump exception logs in ListFieldstemapper into execution context

    how to use execution context to dump bad records logged at ListFieldSetmapper
    ListFieldSetMapper.java:-

    Code:
    public class ListFieldSetMapper implements FieldSetMapper<ListItem>{
    public ListItem mapFieldSet(FieldSet fs) {

    ------------
    -------
    }
    }Here I'm reading various columns of each row using corresponding data types supported by FieldSet. This class is also catching exceptions for bad records, with unmatched data types. I want to log this stuff and dump it into ExecutionContext, with the key by name "logFile". The same logFile is used at writer level of step1 and also in step2.
    I implemented InitializingBean interface, and tried to initialize ExecutonContext in the same way, I did for writer class of step1, but it is throwing null pointer exception.
    How can I initialize ExecutionContext to dump log file here in ListFieldSetMapper?.
    Please suggest
    Thanks

  2. #2
    Join Date
    Feb 2008
    Posts
    488

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •