I just try to migrate from Spring Batch 1.1 to 2.0.0
When I try to use the property "reader" for the element "tasklet" as in the examples I get an XML-parsing error which says:
Attribute 'reader' is not allowed to appear in element 'batch:tasklet'
I've got the spring-batch-core-2.0.0.RELEASE.jar in my classpath. When I verify the contained spring-batch-2.0.xsd I cannot find the definition for the attributes reader or writer in it. Am I using the wrong jar or is there really no usage of a reader or writer for the element tasklet?Code:<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-2.0.xsd http://www.springframework.org/schema/batch http://www.springframework.org/schema/batch/spring-batch-2.0.xsd"> <batch:job id="importJob2" parent="simpleJob"> <batch:step id="userSummary" parent="simpleStep"> <batch:tasklet reader="userSummaryReader" writer="hibernateItemWriter" commit-interval="10" > </batch:tasklet> </batch:step> </batch:job>


Reply With Quote
