Announcement Announcement Module
Collapse
No announcement yet.
Partitioning issue Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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
    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).

    Comment


    • #3
      Problem solved

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

      thanks, dave

      Comment

      Working...
      X