Results 1 to 3 of 3

Thread: retryable chunk

Threaded View

  1. #1
    Join Date
    May 2011
    Posts
    2

    Question retryable chunk

    Hi all,
    I started using spring and spring batch a couple months ago and to be honest I love it although some times it makes me crazy but it's ok I'm learning .

    Now I'm having a problem which I don't know how to solve.
    In order to make my process robust for example if sql connection fail, I'm trying to configure the chunk processing with retry option.
    HTML Code:
          <batch:step id="procesa" next="fin" >
                <batch:tasklet  task-executor="taskExecutor" throttle-limit="15" transaction-manager="transactionManager" >
                    <batch:chunk
    					reader="aparatoReader"
    					processor="aparatoProcess"
                                            writer="aparatoWriter"
                                            commit-interval="5"
                                            retry-limit="2"
                        >
                        <batch:retryable-exception-classes>
                            <batch:include class=""/>
                        </batch:retryable-exception-classes>
                    </batch:chunk>
    
                    <batch:no-rollback-exception-classes>
                        <batch:include class=""/>
                    </batch:no-rollback-exception-classes>
    
                    <batch:listeners>
                        <batch:listener ref="taskListener"/>
                    </batch:listeners>
                </batch:tasklet>
            </batch:step>
    The problem is once I compile and launch with the retry configuration, the process fail at the beginning when Spring is initializing beans throwing the following exception:

    "Exception in thread "main" org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name 'finanzas': Cannot create inner bean '(inner bean)' of type [org.springframework.batch.core.configuration.xml.S impleFlowFactoryBean] while setting bean property 'flow'; nested exception [....]"

    My ItemWriter is really basic it just launch mybatis query through a dao....

    Without retry the process works....

    I followed chapter 5.1.6 of the user guide: http://static.springsource.org/sprin...igureStep.html

    What I'm missing
    Thanks
    Last edited by lobor7; May 14th, 2011 at 05:00 PM.

Posting Permissions

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