0

I am using Springframwork 4.0.6 with Spring-Batch 3.0.1 and got a weird NoSuchMethodError when executing the job from within Spring-Batch-Admin (version 1.3.0). I think it might be a versioning problem:

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)

Here is my job definition. Just in case.

<?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>

Did anyone face a similar problem?

1
  • What version of Spring Retry is on your class path? Commented Sep 4, 2014 at 15:02

1 Answer 1

3

My expectation is that you're probably using an out dated version of Spring Retry (the library that contains that class). Using the current version of Spring Retry should fix the issue.

Sign up to request clarification or add additional context in comments.

1 Comment

Hi. I'm facing the same problem when using Spring Batch 3.0.5.RELEASE. Spring Retry 1.0.2 RELEASE is bundle with that version of Spring Batch. Should changing the Spring Retry version work?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.