Announcement Announcement Module
Collapse
No announcement yet.
Job not restarting on the line number expected Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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
    Is the error happening in the writer?

    Comment


    • #3
      Yes the error is happening in the writer.

      Comment


      • #4
        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?

        Comment


        • #5
          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.

          Comment

          Working...
          X