Results 1 to 5 of 5

Thread: Job not restarting on the line number expected

  1. #1
    Join Date
    Jul 2009
    Posts
    27

    Default Job not restarting on the line number expected

    I am encountering a strange problem during the job restart. This is happening in one of the strange scenarios and i am not able to figure out the root cause of the problem.

    I am reading from a flat file, processing it and inserting into database using the itemwriter. I am skipping the records irrespective of the exception thrown and the skip-limit has been set to 1000. The commit interval is set to 10.

    Once the skip limit is reached the job is terminated. When i restart the job it is not starting at the point as expected. It starts two rows ahead from where it is expected to start from.

    For example if the job terminates at row number 210. When I restart the job it is supposed to start reading from row 211. But it starts from row number 213. However if i set the commit interval to 1 it restarts from where it is expected to start from. This is happening only for this particular scenario and hence i am finding it difficult to isolate the problem. Has anyone encountered this problem before or am i doing something wrong?

    Thanks in advance.

  2. #2

    Default

    Is the error happening in the writer?

  3. #3
    Join Date
    Jul 2009
    Posts
    27

    Default

    Yes the error is happening in the writer.

  4. #4

    Default

    We are also investigating weird behavior when the exception is thrown in the writer. I am not sure whether it's a bug in the framework or a bad usage of it, really.

    Why is the error thrown in the writer in the first place? Can't you generate the error in the processor instead?

  5. #5
    Join Date
    Jul 2009
    Posts
    27

    Default

    nopes I cannot do that. I am calling some external apis to insert into the database. So it is quiet possible that these apis might throw exceptions due to various reasons like data integrity etc.

    It seems to be a bug in the framework because i am doing nothing special. let me know in case you find the exact cause of the problem.

    Thanks in advance.

Posting Permissions

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