Results 1 to 3 of 3

Thread: Partitioning issue

  1. #1
    Join Date
    Oct 2009
    Posts
    3

    Default Partitioning issue

    hi
    i ve been tring Spring batch partitioning and i am stuck with the following exception:


    --------------------------------------------------------------------------
    org.springframework.beans.InvalidPropertyException : Invalid property 'partitionHandler' of bean class [org.springframework.batch.core.configuration.xml.S tepParserStepFactoryBean]: No property 'partitionHandler' found
    at org.springframework.beans.BeanWrapperImpl.convertF orProperty(BeanWrapperImpl.java:382)
    at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.convertForProperty(Abst ractAutowireCapableBeanFactory.java:12
    at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.applyPropertyValues(Abs tractAutowireCapableBeanFactory.java:1248)
    at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.populateBean(AbstractAu towireCapableBeanFactory.java:1008)
    at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.doCreateBean(AbstractAu towireCapableBeanFactory.java:470)
    ... 15 more
    --------------------------------------------------------------------------

    my context.xml is as follows:

    <job id="SptBatch" job-repository="jobRepository">
    <step id="evaluationStep" parent="masterStep">
    <tasklet>
    <chunk reader="internals.ThreadedStepItemReader"
    writer="internals.ThreadedStepItemWriter"
    commit-interval="1" />
    </tasklet>
    </step>
    </job>

    <beans:bean id="masterStep" class="org.springframework.batch.core.partition.su pport.PartitionStep">
    <beans: property name="partitionHandler" ref="partitionHandler" />
    <beans: property name="stepExecutionSplitter"
    ref="stepExecutionSplitter"/>
    <beans: property name="jobRepository" ref="jobRepository" />
    </beans:bean>

    <beans:bean id="partitionHandler" class="org.springframework.batch.core.partition.su pport.TaskExecutorPartitionHandler">
    <beans: property name="step" ref="masterStep" />
    <beans: property name="gridSize" value="10" />
    </beans:bean>


    <beans:bean id="stepExecutionSplitter"
    class="org.springframework.batch.core.partition.su pport.SimpleStepExecutionSplitter">
    <beans:constructor-arg ref="jobRepository" />
    <beans:constructor-arg ref="masterStep" />
    <beans:constructor-arg ref="partiotioner" />
    </beans:bean>

    Regards

  2. #2
    Join Date
    Jun 2005
    Posts
    4,230

    Default

    You can't have a tasklet in your step *and* a parent that is a PartitionStep. Look at the samples for an example of how to set it up (make sur ethe Batch version of the sample matches what you are using because the XML configuration of partitioning changed in trunk recently).

  3. #3
    Join Date
    Oct 2009
    Posts
    3

    Default Problem solved

    This actually solved the problem and made me see other wrong configurations in this file

    thanks, dave

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •