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
And this is my concrete job/step combination:HTML Code:<!-- ========================================================================================== --> <!-- Definition of the base job --> <!-- ========================================================================================== --> <batch:job id="baseJob" restartable="true" abstract="true"> <batch:validator ref="jobParamsValidator" /> </batch:job> <!-- ========================================================================================== --> <!-- Definition of the base step --> <!-- ========================================================================================== --> <batch:step id="export" abstract="true"> <batch:tasklet> <batch:chunk reader="itemReader" processor="itemProcessor" writer="itemWriter" commit-interval="50" skip-limit="99999"> <batch:skippable-exception-classes> <batch:include class="java.lang.Exception" /> <batch:exclude class="java.io.FileNotFoundException" /> <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:skippable-exception-classes> </batch:chunk> <batch:listeners> <batch:listener ref="documentSkipListener" /> </batch:listeners> </batch:tasklet> </batch:step> <bean id="documentSkipListener" class="xx.xx.DocumentSkipListener" />
This should work if the reference is true , but I get aHTML Code:<!-- ========================================================================================== --> <!-- Definition of the stmt file to XML job --> <!-- ========================================================================================== --> <batch:job id="exportXmlJob" parent="baseJob"> <batch:step id="exportXML" parent="export"> <batch:tasklet> <batch:chunk > <batch:streams> <batch:stream ref="somethingFileItemReader" /> </batch:streams> </batch:chunk> <batch:listeners merge="true"> <batch:listener ref="somethingCompositeItemWriter"/> </batch:listeners> </batch:tasklet> </batch:step> </batch:job>
Strange thing is both (skippable-exception-classes and skip-limit) are configured in the parent step...... what am I missing here?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(StepParserStepFactoryBean.java:548) at org.springframework.batch.core.configuration.xml.StepParserStepFactoryBean.validateFaultTolerantSettings(StepParserStepFactoryBean.java:518) at org.springframework.batch.core.configuration.xml.StepParserStepFactoryBean.getObject(StepParserStepFactoryBean.java:217) at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.doGetObjectFromFactoryBean(FactoryBeanRegistrySupport.java:142)
Thanks for any advice.
Yours sincerly,
Y.


Reply With Quote