I am trying to run the sample helloworld program for quartz scheduling given on roseindi.net http://www.roseindia.net/quartz/quartz-scheduler-tutorial.shtml
I have both the classes given there exactly similar setup in my java projecy with quartz version 1.6 - all.jar in the project library. When I try to run the application I get the following Exception
Exception in thread "main" java.lang.NoClassDefFoundError: javax/transaction/UserTransaction
at org.quartz.impl.StdSchedulerFactory.instantiate(StdSchedulerFactory.java:1104)
at org.quartz.impl.StdSchedulerFactory.getScheduler(StdSchedulerFactory.java:1355)
at oiaoerpdataconnector.HelloSchedule.HelloScheduleRun(HelloSchedule.java:25)
at oiaoerpdataconnector.HelloSchedule.main(HelloSchedule.java:37)
Caused by: java.lang.ClassNotFoundException: javax.transaction.UserTransaction
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
... 4 more
Java Result: 1
What am I missing here?
Thanks,
Priyank
It has no built-in UI for configuration or monitoring, no useful and reasonably searchable logging or historical review, no support for multiple execution nodes, no administration interface, no alerts or notifications, not to mention buggy recovery mechanisms for failed jobs and missed jobs.
All the Jobs registered in the Quartz Scheduler are uniquely identified by the JobKey which is composed of a name and group . You can fire the job which has a given JobKey immediately by calling triggerJob(JobKey jobKey) of your Scheduler instance. // Create a new Job JobKey jobKey = JobKey.
As a first step create a web application and keep all the Quartz Scheduler dependent jars in classpath. Put the quartz. properties and jobs XML file under classes folder. The configuration of the above job is defined in the job configuration XML file.
If you want to schedule multiple jobs in your console application you can simply call Scheduler. ScheduleJob (IScheduler) passing the job and the trigger you've previously created: IJobDetail firstJob = JobBuilder.
What am I missing here?
jta.jar
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With