Announcement Announcement Module
No announcement yet.
child of abstract step fails with "no 'skippable-exception-classes' though configured Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • child of abstract step fails with "no 'skippable-exception-classes' though configured

    Good evening,

    I have tried today to minimize the amount of configuration for my export batch jobs and was unable to resolve the following problem.
    I used the reference documentation to find my way around and I see nothing wrong with my coding...

    All with Spring 3 and latest Batch version
    HTML Code:
    <!-- ========================================================================================== -->
        <!-- Definition of the base job -->
        <!-- ========================================================================================== -->
        <batch:job id="baseJob" restartable="true" abstract="true">
            <batch:validator ref="jobParamsValidator" />
        <!-- ========================================================================================== -->
        <!-- Definition of the base step -->
        <!-- ========================================================================================== -->
        <batch:step id="export" abstract="true">
                <batch:chunk reader="itemReader" processor="itemProcessor" writer="itemWriter" 
                commit-interval="50" skip-limit="99999">
                        <batch:include class="java.lang.Exception" />
                        <batch:exclude class="" />
                        <batch:exclude class="javax.xml.bind.JAXBException" />
                        <batch:exclude class="org.xml.sax.SAXException" />
                        <batch:exclude class="org.springframework.batch.item.file.FlatFileParseException" />
                        <batch:exclude class="javax.xml.bind.MarshalException" />
                        <batch:exclude class="org.springframework.oxm.MarshallingFailureException" />
                    <batch:listener ref="documentSkipListener" />
        <bean id="documentSkipListener" class="xx.xx.DocumentSkipListener" />
    And this is my concrete job/step combination:

    HTML Code:
        <!-- ========================================================================================== -->
        <!-- Definition of the stmt file to XML job -->
        <!-- ========================================================================================== -->
        <batch:job id="exportXmlJob" parent="baseJob">
            <batch:step id="exportXML" parent="export">
                    <batch:chunk >
                            <batch:stream ref="somethingFileItemReader" />
                    <batch:listeners merge="true">
                        <batch:listener ref="somethingCompositeItemWriter"/>
    This should work if the reference is true , but I get a

    HTML Code:
    Caused by: java.lang.IllegalArgumentException: The field 'skip-limit' is not permitted on the step [exportXML] because there is no 'skippable-exception-classes'.
    	at org.springframework.batch.core.configuration.xml.StepParserStepFactoryBean.validateDependency(
    	at org.springframework.batch.core.configuration.xml.StepParserStepFactoryBean.validateFaultTolerantSettings(
    	at org.springframework.batch.core.configuration.xml.StepParserStepFactoryBean.getObject(
    Strange thing is both (skippable-exception-classes and skip-limit) are configured in the parent step...... what am I missing here?

    Thanks for any advice.

    Yours sincerly,
    Last edited by Yvory; Oct 5th, 2011, 07:50 AM. Reason: edited a letter too much, my bad

  • #2

    Was there ever an answer posted for this problem. I am experiencing the exact same issue today. Will continue to search forum, but thought I would ask since I found this thread.


    • #3
      Make sure to specify merge on your child chunk tasklet (even when there is nothing extra to merge)

      <batch:skippable-exception-classes merge="true" />

      Seems to be required configuration since recent versions of Spring Batch.


      • #4
        Thank youfor your prompt answer.

        Your suggestion is exactly what i figured out through trial and error.

        Thanks again

        However for Dave and company:
        I ran into a situation where the retry mechanism was thrown into an internal loop which I traced to the retry template. The situation occured when the hashCode function threw an exception. In my case, I had overlooked the Null values that were being returned to create a business object. So when implementing retry, I had a null pointer exception thrown. That caused the infinite looping inside the repeat template function. Took a lokk in debugger and finally figured it out, augmented our business rules and everything works fine now.

        Last edited by kmr; Nov 15th, 2011, 06:31 AM.


        • #5
          Hi there ,

          THANK YOU for this information, I was just trying again to get this to run and with this little line it does.

          As a plea to the developers:

          PLEASE, add this little secret to the reference documentation, that this is needed, I'd never guessed this myself without debugging and stuff....