hi,
i am getting he following Exception while running my Quartz Schdular program.
Below is the exception Trace
Mar 26, 2010 2:54:24 PM org.quartz.core.QuartzScheduler start INFO: Scheduler DefaultQuartzScheduler_$_NON_CLUSTERED started. Exception in thread "main" java.lang.IllegalArgumentException: Job class must implement the Job interface. at org.quartz.JobDetail.setJobClass(JobDetail.java:291) at org.quartz.JobDetail.(JobDetail.java:138) at com.Quarrtz.RanchSchedule.main(RanchSchedule.java:18)
i have included Quartz-1.7.2.jar and Quartz-all-1.7.2.jar in my class path along with commom-logging 1.1.jar and jdk 6
this is an example i have copy and pasted from JAVA RANCH
http://www.javaranch.com/journal/200711/combining_spring_and_quartz.html
First example in the above page
any help pls
my code as follows
**public interface Job {
void execute (JobExecutionContext ctx);
}**
**public class RanchJob implements Job {
public void execute (JobExecutionContext ctx) throws JobExecutionException {
System.out.println("[JOB] Welcome at JavaRanch");
}
}**
**public class RanchSchedule {
public static void main (String[] args) {
try {
SchedulerFactory factory = new org.quartz.impl.StdSchedulerFactory();
Scheduler scheduler = factory.getScheduler();
scheduler.start();
JobDetail jobDetail = new JobDetail("ranchJob", null, RanchJob.class);
// Fires every 10 seconds
Trigger ranchTrigger = TriggerUtils.makeSecondlyTrigger(10);
ranchTrigger.setName("ranchTrigger");
scheduler.scheduleJob(jobDetail, ranchTrigger);
} catch (SchedulerException ex) {
ex.printStackTrace();
}
}
}**
thanx in advance
Sunny Mate