Results 1 to 3 of 3

Thread: about DrivingQueryItemReader's question

  1. #1
    Join Date
    Feb 2008
    Posts
    12

    Question about DrivingQueryItemReader's question

    When I used DrivingQueryItemReader, I setted saveState propertie is true, When DrivingQueryItemReader call update(ExecutionContext executionContext) method, call getCurrentKey();
    protected Object getCurrentKey() {
    if (initialized) {
    return keys.get(currentIndex - 1);
    }

    return null;
    }
    now it throw java.lang.ArrayIndexOutOfBoundsException: -1 exception.
    I debug it, I find that Step first call update(ExecutionContext executionContext), then call read(), the currentIndex properties is 0, the following code:
    return keys.get(currentIndex - 1);
    is that:
    return keys.get(0 - 1);
    so, throwing exceptions.
    Other persons occur this question?

  2. #2
    Join Date
    Jun 2005
    Posts
    4,232

    Default

    http://jira.springframework.org/browse/BATCH-593.

    (Please use [code][/code] tags to post code and stack traces.)

  3. #3
    Join Date
    Feb 2008
    Posts
    12

    Default

    I know.Thank you very much!

Posting Permissions

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