retry-policy가 존재하면, 반드시 retry-limit이 존재해야 한다.
항상 이 짝을 생각하자!!

retry-policy="retryPolicy" retry-limit="3"

(설정) 


<chunk reader="reader" processor="processor" writer="writer"   commit-interval="5" retry-limit="3" skip-limit="3" > 
<retryable-exception-classes>
         <include class="org.springframework.dao.DeadlockLoserDataAccessException"/>
         <include class="org.springframework.dao.DataAccessResourceFailureException"/>
        </retryable-exception-classes>
.....


다음과 같은 exception이 발생된다.
org.springframework.beans.factory.BeanCreationException: Error creating
bean with name 'step1': FactoryBean threw exception on object creation; nested e
xception is java.lang.IllegalArgumentException: The field 'retryable-exception-c
lasses' is not permitted on the step [step1] because there is no 'retry-limit'.
        at org.springframework.beans.factory.support.BeanDefinitionValueResolver
.resolveInnerBean(BeanDefinitionValueResolver.java:281)
        at org.springframework.beans.factory.support.BeanDefinitionValueResolver
.resolveValueIfNecessary(BeanDefinitionValueResolver.java:125)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBean
Factory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1317)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBean
Factory.populateBean(AbstractAutowireCapableBeanFactory.java:1076)

 

Posted by '김용환'
,