Note that there are some explanatory texts on larger screens.

plurals
  1. POQuartz HelloJob
    primarykey
    data
    text
    <p>I am new to Quartz and I'm running into a compiling error. I am simply trying to get the HelloJob to run based on Quartz's Lesson 1 for Hello World. I am having trouble declaring a <code>JobDetail</code> with the error: <code>The method newJob(Class&lt;? extends Job&gt;)</code> in the type <code>JobBuilder</code> is not applicable for the arguments (Class)".</p> <p>Originally, the code had 3 errors at <code>newJob</code>, <code>newTrigger</code>, and <code>simpleSchedule</code> was </p> <pre><code>// define the job and tie it to our HelloJob class JobDetail job = newJob(HelloJob.class) .withIdentity("job1", "group1") .build(); // Trigger the job to run now, and then repeat every 40 seconds Trigger trigger = newTrigger() .withIdentity("trigger1", "group1") .startNow() .withSchedule(simpleSchedule() .withIntervalInSeconds(40) .repeatForever()) .build(); </code></pre> <p>without JobBuilder.newJob(...), TriggerBuilder.newTrigger(...), SimpleScheduleBuilder.simpleSchedule(...). Unlike the example given, I went ahead and added the imports and attached the class calls in front of newJob, newTrigger, etc. which got rid of 2/3 errors. But it seems the error persists with</p> <pre><code> JobDetail job = JobBuilder.newJob(HelloJob.class) .withIdentity("job1", "group1") .build(); </code></pre> <p>I have also tried replacing my job declaration with</p> <pre><code>JobDetail job = new JobDetail("job1", "group1", HelloJob.class); </code></pre> <p>but that ends with <code>Cannot instantiate the type JobDetail</code> and it seems like a few examples out there do this.</p> <p>Will really appreciate clarification,</p> <p>Thanks!</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

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