Announcement Announcement Module
Collapse
No announcement yet.
SkipListener for Xml file reading terminate processing after first skip Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • SkipListener for Xml file reading terminate processing after first skip

    Hi,
    I am very new to spring batch and sorry if i am asking a silly question.
    I am using StaxEventItemReader and CastorMarshaller to read xml file.

    my job configuration is following:

    <job id="xmltodb" restartable="true">
    <step id="first" >
    <tasklet transaction-manager="transactionManager">
    <chunk reader="xmlReader" writer="dbWriter" processor="itemProcessor" commit-interval="5" skip-limit="10">
    <skippable-exception-classes>
    <include class="org.springframework.oxm.XmlMappingException "/>
    </skippable-exception-classes>
    </chunk>
    <listeners>
    <listener ref="skiplistener"/>
    </listeners>
    </tasklet>
    </step>
    </job>

    problem is that when there is any exception during reading xml file,it insert records in database just before the exception record and completes the job by COMPLETE as exitstatus.
    it handles this error-full record,but does not continue the processing.

    Thanks

  • #2
    I have the same problem currently.

    Comment

    Working...
    X