0

I would like to use the Quartz scheduler so, that the server part of my application uses scheduler to create a job and store it in JDBCStore, while the UI part (frontend) uses another instance of the scheduler (pointed to the same database schema) to add triggers for that job. I thought it would be enough for the UI to know the name of the job and the group, because adding a trigger is something like:

trigger = newTrigger()
.withIdentity("trigger", "group1")
.withSchedule(cronSchedule("0 0/2 8-17 * * ?")
    .withMisfireHandlingInstructionFireAndProceed())
.forJob("myJob", "group1")
.build();

Unfortunately, this throws an exception java.lang.ClassNotFoundException for the job class. Any help would be appreciated. Thank you.

6
  • Do you mean you have 2 applications one for server and another separate for UI and each running a individual quartz scheduler inside them ?
    – Rips
    Nov 11, 2012 at 19:43
  • Yes, they are two projects communicating via JMS. There is only one job that the server is executing, but we want the users to schedule it using UI, so server and UI both use an instance of scheduler pointed to the same database tables (UI adds triggers, server executes the job according to the triggers).
    – tom
    Nov 11, 2012 at 22:32
  • Are you getting class not found when job is to be run or when you are trying to schedule it via UI ?
    – Rips
    Nov 12, 2012 at 10:41
  • When we are trying to schedule it
    – tom
    Nov 12, 2012 at 19:44
  • is that class available in the UI project ?
    – Rips
    Nov 13, 2012 at 15:02

1 Answer 1

0

As per the conversation above, why dont you add the trigger itself in the server project.You can make a JMS call to server project sending trigger details and do all the required thing in the server project.I think that should solve your issue

1
  • That's true, but I want to allow users to schedule jobs even if the server project is not running
    – tom
    Nov 23, 2012 at 11:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.