-
May 14th, 2009, 11:46 AM
#1
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
-
May 14th, 2009, 01:12 PM
#2
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules