Announcement Announcement Module
Collapse
No announcement yet.
IncorrectTokenCountException with variable tokens Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • IncorrectTokenCountException with variable tokens

    Hi,

    I have a scenario ro read from file which is neither delimited nor fixed length. Each record can have variable number of tokens.

    I have written cutom Tokenixer extending AbstractLineTokenizer which tokenizes each input record and also set Names property dynamically within tokenize method. I gues here I am doing wrong.

    Did anyone worked on such scenario where input file having varying number of tokens? Or if someone can help me in this scenario?

    Any help will be greatly appreciated.

  • #2
    Resolved

    Never mind.

    Issue was in my CustomTokenizer implementation. I resolved it.

    Comment


    • #3
      When I changed my commit count I again see below error. What might be the problem? Actual count and expected counts are same though

      org.springframework.batch.item.file.transform.Inco rrectTokenCountException: Incorrect number of tokens found in record: expected 22 actual 22

      Comment


      • #4
        I am also using SimpleAsyncTaskExecutor.
        If I remove this, it is running fine. If I add SimpleAsyncTaskExecutor, it throws above exception.
        Does it have any impact when running multiple threads?

        Comment

        Working...
        X