Note that there are some explanatory texts on larger screens.

plurals
  1. POException while running Quartz Scheduler program
    text
    copied!<p>I am getting he following Exception while running my Quartz Schdular program. </p> <p>Below is the exception Trace</p> <pre><code>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.&lt;init&gt;(JobDetail.java:138) at com.Quarrtz.RanchSchedule.main(RanchSchedule.java:18) </code></pre> <p>I have included <code>Quartz-1.7.2.jar</code> and <code>Quartz-all-1.7.2.jar</code> in my class path along with <code>commom-logging 1.1.jar</code> and jdk 6</p> <p>this is an example i have copy and pasted from [JavaRanch][1]</p> <p>First example in the above page</p> <pre><code>public interface Job { void execute (JobExecutionContext ctx); } </code></pre> <hr> <pre><code>public class RanchJob implements Job { public void execute (JobExecutionContext ctx) throws JobExecutionException { System.out.println("[JOB] Welcome at JavaRanch"); } } </code></pre> <hr> <pre><code>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(); } } } </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload