using quartz with out the quartz plugin in grails

Posted by user511875 on Stack Overflow See other posts from Stack Overflow or by user511875
Published on 2012-03-16T13:56:51Z Indexed on 2012/03/19 10:03 UTC
Read the original article Hit count: 615

Filed under:

i'm trying to use quartz to schedule jobs in grails with out using the plugin. this is the code:

  1. RunMeTask.java

    package tt;

    public class RunMeTask { public void printMe() { System.out.println("Run Me ~"); }}

  2. resources.groovy (under conf/spring)

    import org.springframework.scheduling.quartz.JobDetailFactoryBean;

    import org.springframework.scheduling.quartz.SchedulerFactoryBean;

    import org.springframework.scheduling.quartz.SimpleTriggerBean;

    import tt.RunMeTask

    beans = {

    runMeTask(RunMeTask){ }

    runMeJob(JobDetailFactoryBean){

    targetObject = ref('runMeTask')

    targetMethod = "printMe"

    }

    simpleTrigger(SimpleTriggerBean){

    jobDetail = ref('runMeJob')

    repeatInterval = "5000"

    startpDelay = "1000"

    }

    schedulerFactoryBean(SchedulerFactoryBean){

    jobDetails = [ref('runMeJob')]

    triggers = [ref('simpleTrigger')]

    }

    }

i get the following exception: Error Fatal error during compilation org.apache.tools.ant.BuildException: java.lang.IncompatibleClassChangeError: class org.springframework.scheduling.quartz.SimpleTriggerBean has interface org.quartz.SimpleTrigger as super class (Use --stacktrace to see the full trace)

can anyone help?

© Stack Overflow or respective owner

Related posts about quartz