Announcement Announcement Module
Collapse
No announcement yet.
Can not restart job on exception Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Can not restart job on exception

    Hi,

    I need to continue job on exception in spriing batch 2.0.My configuration is as belo.
    But I am gettign error as shown below.
    Please help.

    Config:-
    Code:
    <job id="myJob" restartable="true" >
    		<step id="runStep">
    			<tasklet>
    				<chunk reader="readDb" processor="process" writer="opWriter" 
    				commit-interval="1" 
    				skip-limit="10">
    				<skippable-exception-classes>
    					java.lang.RuntimeException
    				</skippable-exception-classes>					
    				</chunk>				
    			</tasklet>
    		</step>
    	</job>
    Error:-

    Code:
    Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'runUpgradeBatch': FactoryBean threw exception on object creation; nested exception is java.lang.NoSuchMethodError: org.springframework.batch.retry.policy.SimpleRetryPolicy.<init>(I)V
    	at org.springframework.beans.factory.support.FactoryBeanRegistrySupport$1.run(FactoryBeanRegistrySupport.java:127)
    	at java.security.AccessController.doPrivileged(Native Method)
    	at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.doGetObjectFromFactoryBean(FactoryBeanRegistrySupport.java:116)
    	at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.getObjectFromFactoryBean(FactoryBeanRegistrySupport.java:98)
    	at org.springframework.beans.factory.support.AbstractBeanFactory.getObjectForBeanInstance(AbstractBeanFactory.java:1288)
    	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:217)
    	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)
    	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)
    	at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:269)
    	... 49 more
    Caused by: java.lang.NoSuchMethodError: org.springframework.batch.retry.policy.SimpleRetryPolicy.<init>(I)V
    	at org.springframework.batch.core.step.item.FaultTolerantStepFactoryBean.configureRetry(FaultTolerantStepFactoryBean.java:347)
    	at org.springframework.batch.core.step.item.FaultTolerantStepFactoryBean.configureChunkProcessor(FaultTolerantStepFactoryBean.java:317)
    	at org.springframework.batch.core.step.item.SimpleStepFactoryBean.applyConfiguration(SimpleStepFactoryBean.java:505)
    	at org.springframework.batch.core.step.item.FaultTolerantStepFactoryBean.applyConfiguration(FaultTolerantStepFactoryBean.java:254)
    	at org.springframework.batch.core.step.item.SimpleStepFactoryBean.getObject(SimpleStepFactoryBean.java:333)
    	at org.springframework.batch.core.configuration.xml.StepParserStepFactoryBean.getObject(StepParserStepFactoryBean.java:149)
    	at org.springframework.beans.factory.support.FactoryBeanRegistrySupport$1.run(FactoryBeanRegistrySupport.java:121)
    	... 57 more

  • #2
    Looks like a classpath configuration problem? Check that you only have one version of Spring Batch on the classpath.

    Comment

    Working...
    X