Hello,
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:
When trying to load the spring application context the following error is given:Code:<?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:batch="http://www.springframework.org/schema/batch" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd http://www.springframework.org/schema/batch http://www.springframework.org/schema/batch/spring-batch-2.1.xsd> <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" /> </bean> </property> </bean> </property> </bean> <batch:step id="abstractStep" abstract="true"> <batch:tasklet> <batch:chunk skip-limit="20"> <batch:skippable-exception-classes> <batch:include class="java.lang.Exception"/> </batch:skippable-exception-classes> </batch:chunk> </batch:tasklet> </batch:step> <batch:job id="myJob"> <batch:step id="myStep" parent="abstractStep"> <batch:tasklet> <batch:chunk reader="myReader" /> </batch:tasklet> </batch:step> </batch:job> </beans>
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,
Robin


Reply With Quote
