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)
'general java' 카테고리의 다른 글
[Spring Batch] CommandlineJobRunner 병렬 실행 TestCase (0) | 2011.03.22 |
---|---|
[Spring Batch] Retry code (0) | 2011.03.17 |
[Spring Batch] Oracle DB-Job실행중 ORA-08177 발생 (0) | 2011.02.25 |
spring framework 소스 및 jar maven 파일 다운받기 (0) | 2011.02.07 |
POJO java 코드 깜끔하게 (0) | 2010.11.05 |