Announcement Announcement Module
No announcement yet.
spring batch and quartz Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • spring batch and quartz

    Hi everybody,

    I would like tu use Quartz to launch a job using spring btach, I based my example on the sample that is provided in spring batch site, but I have an exception. I searched but didn't find anything on the Internet. The sample of Spring batch using Quartz seems quite complicated (uses maven that i don't know how to use). I want to use a main class to launch my batch but I have the following exception:

    Exception in thread "main" java.lang.NoSuchMethodError: istableBeanFactory.setSerializationId(Ljava/lang/StringV
    at hableApplicationContext.refreshBeanFactory(Abstrac
    at ationContext.obtainFreshBeanFactory(AbstractApplic
    at ationContext.refresh(AbstractApplicationContext.ja va:395)
    at plicationContext.<init>(ClassPathXmlApplicationCon
    at plicationContext.<init>(ClassPathXmlApplicationCon
    at quartzTest.Main.main(

    Here's my Main class and my context file

    package quartzTest;
    import org.quartz.SchedulerException;
    import org.springframework.context.ApplicationContext;
    import plicationContext;

    public class Main {

    public static void main(String[] args) throws SchedulerException{
    ApplicationContext context= new ClassPathXmlApplicationContext("/Ressources/quartzLaunch-context.xml");



    <?xml version="1.0" encoding="UTF-8"?>
    <beans xmlns=""

    <bean id="transactionManager" class=" on.ResourcelessTransactionManager" />

    <bean id="jobRepository" class="org.springframework.batch.core.repository.s upport.MapJobRepositoryFactoryBean"
    p:transactionManager-ref="transactionManager" />

    <bean class="org.springframework.scheduling.quartz.Sched ulerFactoryBean">
    <property name="triggers">
    <bean id="cronTrigger" class="org.springframework.scheduling.quartz.CronT riggerBean">
    <property name="jobDetail" ref="jobDetail" />
    <property name="cronExpression" value="0/10 * * * * ?" />

    <batch:job id="helloJob" job-repository="jobRepository">
    <batch:step id="helloStep">
    <batch:tasklet ref="helloTasklet" transaction-manager="transactionManager"/>

    <bean id="helloTasklet" class="quartzTest.HelloTasklet" />

    <bean id="jobDetail" class="org.springframework.scheduling.quartz.JobDe tailBean">
    <property name="jobClass" value="quartzTest.JobLauncherDetails" />
    <property name="group" value="quartz-batch" />
    <property name="jobDataAsMap">
    <entry key="jobName" value="helloJob"/>
    <entry key="jobLocator" value-ref="jobRegistry"/>
    <entry key="jobLauncher" value-ref="jobLauncher"/>

    <bean id="jobRegistry" class="org.springframework.batch.core.configuratio" />

    <bean id="jobLauncher" class="org.springframework.batch.core.launch.suppo rt.SimpleJobLauncher">
    <property name="jobRepository" ref="jobRepository" />
    <property name="taskExecutor">
    <bean class="org.springframework.core.task.SimpleAsyncTa skExecutor" />


    Thank you for any help

  • #2
    java.lang.NoSuchMethodError usually points to a classpath problem. If you used Maven you wouldn't have to worry about it (so much).


    • #3

      thank you for your response, it's actually working right now ! as you said there was a problem in the buld path