Announcement Announcement Module
No announcement yet.
Inheritance problem with 2.1.7-RELEASE Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Inheritance problem with 2.1.7-RELEASE


    I just tried the 2.1.7-RELEASE and my jobs don't run anymore.
    After going back to 2.1.6-RELEASE they worked again.

    Before I create a JIRA Ticket I need to know if there is an error in my configuration, or if I am missing something....

    The problem seems to be in the job definition, with 2.1.7 a more restrictive check for skip/retry limit and the exceptions classes is in place which is okay but somehow my configuration doesn't work. I'm assuming there might be a problem in the inheritance of step settings.

    This example doesn't work for me:

    <?xml version="1.0" encoding="UTF-8"?>
    <beans xmlns=""
      <bean id="myReader" class="org.springframework.batch.item.file.FlatFileItemReader" scope="step">
        <property name="resource" value="file:/#{jobParameters['FILENAME']}" />
        <property name="linesToSkip" value="1" />
        <property name="strict" value="true" />
        <property name="saveState" value="true" />
        <property name="lineMapper">
          <bean class="org.springframework.batch.item.file.mapping.DefaultLineMapper">
            <property name="lineTokenizer">
              <bean class="org.springframework.batch.item.file.transform.DelimitedLineTokenizer">
                <property name="delimiter" value=";" />
                <property name="names" value="f1,f2" />
                <property name="strict" value="true" />
      <batch:step id="abstractStep" abstract="true">
          <batch:chunk skip-limit="20">
                <batch:include class="java.lang.Exception"/>
      <batch:job id="myJob">
        <batch:step id="myStep" parent="abstractStep">
            <batch:chunk reader="myReader" />
    When trying to load the spring application context the following error is given:
    The field 'skip-limit' is not permitted on the step [myStep] because there is no 'skippable-exception-classes'.

    As I have multiple jobs depending on the abstract step, having the "skippable-exception-classes" in every job is not a solution.

    Is this a bug or did I miss something?

    Best wishes,
    Last edited by robinkrom; Apr 26th, 2011, 12:05 PM. Reason: Typo fix

  • #2
    That looks like an unexpected side effect of So it's a bug. Go ahead and raise a ticket in JIRA. The only workaround I can think of is to specify the exceptions in every step where they are needed.


    • #3
      There is a workaround, I think. You need an empty skippable-exceptions map in all your child steps, e.g.

      <job id="myJob">
          <step id="myStep" parent="abstractStep">
              <chunk reader="myReader">
                <skippable-exception-classes merge="true"/>
      Does that work?


      • #4

        Hello Dave,

        your suggestion seems to work, although it's a bit hard to guarantee that internally everything works as it should be.

        And it sure is a better workaround as copying all the exception classes! Thanks!

        Still I'm staying on 2.1.6 for now, and I will create a jira ticket directly after posting this.

        Best wishes,