Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6019853
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T03:28:52+00:00 2026-05-23T03:28:52+00:00

I am new to Quartz and I’m running into a compiling error. I am

  • 0

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 JobDetail with the error: The method newJob(Class<? extends Job>) in the type JobBuilder is not applicable for the arguments (Class)”.

Originally, the code had 3 errors at newJob, newTrigger, and simpleSchedule was

// 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();

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

 JobDetail job = JobBuilder.newJob(HelloJob.class)
        .withIdentity("job1", "group1")
        .build();

I have also tried replacing my job declaration with

JobDetail job = new JobDetail("job1", "group1", HelloJob.class);

but that ends with Cannot instantiate the type JobDetail and it seems like a few examples out there do this.

Will really appreciate clarification,

Thanks!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T03:28:53+00:00Added an answer on May 23, 2026 at 3:28 am

    You need to have this line of code:

    import static org.quartz.JobBuilder.*;
    

    And then in should work. Hopefully.

    Edit:
    AND MAKE SURE ‘HELLOJOB’ IMPLEMENTS JOB!!

    There.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm relatively new to Objective-C + Quartz and am running into what is probably
I'm trying to get Quartz.net working by embedding into my .Net MVC2 application. I
I am trying to get Quartz.net scheduler to work, but I don't know why
I am trying to get a simple example of the Quartz scheduler working in
New to Quartz and I am curious on the drawing speeds of simple shapes,
New to Linux programming in general. I am trying to communicate with a kernel
I just started with Quartz.net and I have it running as a service. I
We have a Quartz.Net installation running as a Windows Service. That's running fine. We
I have set up Quartz.NET to run a scheduled job. It is amazing when
I'm new to Quartz scheduling and I have grasped the basics. But I'm having

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.