Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within XML
Search Coderanch
Advance search
Google search
Register / Login
Post Reply
Bookmark Topic
Watch Topic
New Topic
programming forums
Java
Mobile
Certification
Databases
Caching
Books
Engineering
Micro Controllers
OS
Languages
Paradigms
IDEs
Build Tools
Frameworks
Application Servers
Open Source
This Site
Careers
Other
Pie Elite
all forums
this forum made possible by our volunteer staff, including ...
Marshals:
Campbell Ritchie
Jeanne Boyarsky
Ron McLeod
Liutauras Vilda
Paul Clapham
Sheriffs:
paul wheaton
Tim Cooke
Henry Wong
Saloon Keepers:
Stephan van Hulst
Tim Holloway
Carey Brown
Frits Walraven
Piet Souris
Bartenders:
Mike London
Forum:
XML and Related Technologies
I need major help!
Sam Doder
Ranch Hand
Posts: 204
posted 14 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
I am using quartz version 1.5
I have the class
import org.quartz.Scheduler; import org.quartz.SchedulerFactory; import org.quartz.impl.StdSchedulerFactory; import org.quartz.xml.*; public class XML_Job_Schedualing { private static final String fileName = "HelloJob.xml" ; public static void main(String args[]) { JobSchedulingDataProcessor jsdp = new JobSchedulingDataProcessor(true,false,false) ; SchedulerFactory sf=new StdSchedulerFactory(); try{ Scheduler sched=sf.getScheduler(); sched.start(); jsdp.processFileAndScheduleJobs( fileName ,sched, true ) ; } catch( Exception e ) { e.printStackTrace() ; System.exit(0) ; } } }
The HelloJob Class is
import org.quartz.Job; import org.quartz.JobExecutionContext; import org.quartz.JobExecutionException; import java.util.Date; public class HelloJob implements Job { public void execute(JobExecutionContext arg0) throws JobExecutionException{ System.out.println("Hello World Quartz Scheduler: " + new Date()); } }
Every Xml format I try gets these exceptions
org.apache.commons.beanutils.ConversionException: HelloJob at org.apache.commons.digester.Digester.createSAXException(Digester.java:2919) at org.apache.commons.digester.Digester.createSAXException(Digester.java:2945) at org.apache.commons.digester.Digester.endElement(Digester.java:1133) at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.endElement(Unknown Source) at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanEndElement(Unknown Source) at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(Unknown Source) at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(Unknown Source) at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(Unknown Source) at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source) at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source) at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source) at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source) at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown Source) at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source) at org.apache.commons.digester.Digester.parse(Digester.java:1647) at org.quartz.xml.JobSchedulingDataProcessor.processFile(JobSchedulingDataProcessor.java:430) at org.quartz.xml.JobSchedulingDataProcessor.processFileAndScheduleJobs(JobSchedulingDataProcessor.java:499) at org.quartz.xml.JobSchedulingDataProcessor.processFileAndScheduleJobs(JobSchedulingDataProcessor.java:485)
My last try at the xml is
<?xml version="1.0" encoding="UTF-8"?> <quartz xmlns="http://www.opensymphony.com/quartz/JobSchedulingData" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" overwrite-existing-jobs="true"> <job> <job-detail> <name>my-very-clever-job</name> <group>MYJOB_GROUP</group> <description>The job description</description> <job-class>HelloJob</job-class> <job-data-map allows-transient-data="false"> <entry> <key>burger-type</key> <value>hotdog</value> </entry> <entry> <key>dressing-list</key> <value>ketchup,mayo</value> </entry> </job-data-map> </job-detail> <trigger> <cron> <name>my-trigger</name> <group>MYTRIGGER_GROUP</group> <job-name>my-very-clever-job</job-name> <job-group>MYJOB_GROUP</job-group> <!-- trigger every night at 4:30 am --> <!-- do not forget to light the kitchen's light --> <cron-expression>0 30 4 * * ?</cron-expression> </cron> </trigger> </job> </quartz>
With a little knowledge, a
cast iron skillet
is non-stick and lasts a lifetime.
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
Web applications with various configurations files
How to call the quartz scheduler in the web app
Quartz xml stuff
Thread Scheduler
Exception using Quartz org.quartz.plugins.xml.JobInitializationPlugin
More...