I happen to return the Object only when the complete File has been processed . I am retruning AF object , as specified in my code snippet. I happen to write even the Business/Processing logic in the reader itself rather than in the ItemProcessor . But If i am not wrong, that should not be the reason behind this exception.
Code:
public Object read() throws Exception {
while(itemReader.read()!=null){
calling some method to process each lines
i am processing each line and then capturing the values from a delimited files.
so beacuse of this untill i completely read a file i cant write it.
}
result = AF;
return result;
}
Code:
680976 [main] ERROR com.abcbs.EDI837.common.MyCommandLine - Job Terminated in error:
java.lang.OutOfMemoryError: Java heap space