2014-09-04 3 views
0

Я использую Springframwork 4.0.6 с Spring-Batch 3.0.1 и получил странный NoSuchMethodError при выполнении задания из Spring-Batch-Admin (версия 1.3 +0,0). Я думаю, это может быть проблема с версией:Spring Batch Job throws NoSuchMethodError: BinaryExceptionClassifier.classify (Throwable): Boolean

2014-09-04 15:57:03.664 ERROR 7780 --- [rTaskExecutor-3] o.s.batch.core.step.AbstractStep   : Encountered an error executing step step1 in job i18n.region.names 

java.lang.NoSuchMethodError: org.springframework.classify.BinaryExceptionClassifier.classify(Ljava/lang/Throwable;)Ljava/lang/Boolean; 
    at org.springframework.batch.core.step.item.SimpleRetryExceptionHandler.handleException(SimpleRetryExceptionHandler.java:81) 
    at org.springframework.batch.repeat.support.RepeatTemplate.doHandle(RepeatTemplate.java:294) 
    at org.springframework.batch.repeat.support.RepeatTemplate.executeInternal(RepeatTemplate.java:220) 
    at org.springframework.batch.repeat.support.RepeatTemplate.iterate(RepeatTemplate.java:144) 
    at org.springframework.batch.core.step.tasklet.TaskletStep.doExecute(TaskletStep.java:257) 
    at org.springframework.batch.core.step.AbstractStep.execute(AbstractStep.java:198) 
    at org.springframework.batch.core.job.SimpleStepHandler.handleStep(SimpleStepHandler.java:148) 
    at org.springframework.batch.core.job.flow.JobFlowExecutor.executeStep(JobFlowExecutor.java:64) 
    at org.springframework.batch.core.job.flow.support.state.StepState.handle(StepState.java:67) 
    at org.springframework.batch.core.job.flow.support.SimpleFlow.resume(SimpleFlow.java:162) 
    at org.springframework.batch.core.job.flow.support.SimpleFlow.start(SimpleFlow.java:141) 
    at org.springframework.batch.core.job.flow.FlowJob.doExecute(FlowJob.java:134) 
    at org.springframework.batch.core.job.AbstractJob.execute(AbstractJob.java:304) 
    at org.springframework.batch.core.launch.support.SimpleJobLauncher$1.run(SimpleJobLauncher.java:135) 
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) 
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) 
    at java.lang.Thread.run(Thread.java:745) 

Это мое определение работы. На всякий случай.

<?xml version="1.0" encoding="UTF-8"?> 
<beans xmlns="http://www.springframework.org/schema/beans" 
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:batch="http://www.springframework.org/schema/batch" 
    xmlns:p="http://www.springframework.org/schema/p" 
    xsi:schemaLocation="http://www.springframework.org/schema/batch http://www.springframework.org/schema/batch/spring-batch.xsd 
    http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd"> 

    <!-- abstract job --> 
    <batch:job id="abstractJob" abstract="true"> 
     <batch:listeners> 
      <batch:listener ref="simpleJobExecutionListener" /> 
     </batch:listeners> 
    </batch:job> 

    <!-- Region I18N --> 
    <batch:job id="i18n.region.names" parent="abstractJob" restartable="true"> 
     <batch:step id="step1"> 
      <batch:tasklet transaction-manager="transactionManager" 
       task-executor="throttledTaskExecutor" throttle-limit="5"> 
       <batch:chunk reader="regionEntityItemReader" processor="regionEntityItemProcessor" 
        writer="regionEntityItemWriter" commit-interval="1" skip-limit="200000"> 
        <batch:skippable-exception-classes> 
         <batch:include class="com.qompa.utils.exceptions.SkippableException" /> 
        </batch:skippable-exception-classes> 
       </batch:chunk> 
      </batch:tasklet> 
     </batch:step> 
    </batch:job> 

    <bean id="transactionManager" 
     class="org.springframework.batch.support.transaction.ResourcelessTransactionManager" /> 
</beans> 

Неужели кто-нибудь сталкивается с подобной проблемой?

+0

Какая версия Spring Retry находится на вашем пути к классу? –

ответ

3

Мое предположение, что вы, вероятно, используете устаревшую версию Spring Retry (библиотека, которая содержит этот класс). Использование текущей версии Spring Retry должно устранить проблему.

+0

Привет. Я сталкиваюсь с той же проблемой при использовании Spring Batch 3.0.5.RELEASE. Spring Retry 1.0.2 RELEASE поставляется с этой версией Spring Batch. Должна ли изменяться версия Spring Retry? –

Смежные вопросы