4

This is my job configuration:

 <step id="indelToMorph" next="multiThreaded_createIndividualMorphs_master">
            <tasklet>
                <chunk reader="indelReader" processor="indelProcessor" writer="indelWriter" commit-interval="100"/>
            </tasklet>
        </step>

        <step id="multiThreaded_createIndividualMorphs_master" next="createMarkers"> 
            <partition step="multiThreaded_createIndividualMorphs"  partitioner="partitionMorphAdvancedHandler"> 
                        <handler grid-size="10" task-executor="taskAsyncExecutor"/> 
             </partition>
            <listeners>
                <listener ref="calculateIndividualMorphListener"/>
            </listeners>
        </step>

        <step id="multiThreaded_createIndividualMorphs">
            <tasklet ref="createIndividualMorphsAdvancedTasklet"/>
        </step>

        <step id="createMarkers">
            <tasklet ref="verifyTasklet"/>
        </step>

And the beans are created:

@Bean
    @Scope("step")
    public Tasklet createIndividualMorphsAdvancedTasklet() {
        Tasklet createIndividualMorphsAdvancedTasklet = new CreateIndividualMorphsAdvancedTasklet();
        return createIndividualMorphsAdvancedTasklet;
    }

But it says:

Caused by: org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: The element [multiThreaded_createIndividualMorphs] is unreachable

What I am missing?

ftrujillo
  • 1,172
  • 1
  • 16
  • 30
  • Possible duplicate of [BeanDefinitionParsingException: Configuration: The element \[step2\] is unreachable](http://stackoverflow.com/questions/20289814/beandefinitionparsingexception-configuration-the-element-step2-is-unreachabl) – Stewart Apr 12 '17 at 18:13

2 Answers2

6

in your job flow the step multiThreaded_createIndividualMorphs can not be reached as in there is no next configuration which points to this step

Michael Pralow
  • 6,560
  • 2
  • 30
  • 46
-1

The problem was related with the declaration of the step. In order to use the step in a partition step, the slaves steps need to be define out of the job:

<job>
</job>
<step id="multiThreaded_createIndividualMorphs" xmlns="http://www.springframework.org/schema/batch">
            <tasklet ref="createIndividualMorphsAdvancedTasklet"/>
     </step>
ftrujillo
  • 1,172
  • 1
  • 16
  • 30