浏览 6037 次
锁定老帖子 主题:Quartz的配置问题
精华帖 (0) :: 良好帖 (0) :: 新手帖 (0) :: 隐藏帖 (0)
|
|
---|---|
作者 | 正文 |
发表时间:2007-11-22
quartz_reminder.xml: <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE quartz PUBLIC "-//Quartz Enterprise Job Scheduler//DTD Job Scheduling Data 1.0//EN" "http://www.quartzscheduler.org/dtd/job_scheduling_data_1_0.dtd"> <quartz> <job> <job-detail> <name>Job_DataTransmit</name> <group>DEFAULT</group> <job-class>scheduling.QuartzStart</job-class> </job-detail> <trigger> <cron> <name>Trigger_DataTransmit</name> <group>DEFAULT</group> <job-name>Job_DataTransmit</job-name> <job-group>DEFAULT</job-group> <cron-expression> 0 0 17 * * ? </cron-expression> </cron> </trigger> </job> </quartz> quartz.properties : # # Configure Main Scheduler Properties # org.quartz.scheduler.instanceName = DataTransmit org.quartz.scheduler.instanceId = one # # Configure ThreadPool # org.quartz.threadPool.class = org.quartz.simpl.SimpleThreadPool org.quartz.threadPool.threadCount = 5 org.quartz.threadPool.threadPriority = 4 # # Configure JobStore # org.quartz.jobStore.misfireThreshold = 5000 org.quartz.jobStore.class = org.quartz.simpl.RAMJobStore # =========================================================================== # Configure SchedulerPlugins =============================================== # =========================================================================== org.quartz.plugin.triggHistory.class =org.quartz.plugins.history.LoggingTriggerHistoryPlugin org.quartz.plugin.triggHistory.triggerFiredMessage = Trigger{1}.{0}firedjob{6}.{5}at:{4,date,HH:mm:ssMM/dd/yyyy} org.quartz.plugin.triggHistory.triggerCompleteMessage = Trigger{1}.{0}completedfiringjob{6}.{5}at{4,date,HH:mm:ssMM/dd/yyyy}withresultingtriggerinstructioncode:{9} org.quartz.plugin.jobInitializer.class = org.quartz.plugins.xml.JobInitializationPlugin org.quartz.plugin.jobInitializer.fileName =/quartz_reminder.xml org.quartz.plugin.jobInitializer.overWriteExistingJobs = false org.quartz.plugin.jobInitializer.failOnFileNotFound = true org.quartz.plugin.shutdownhook.class = org.quartz.plugins.management.ShutdownHookPlugin org.quartz.plugin.shutdownhook.cleanShutdown = true 启动Tomcat加载及错误信息: INFO : 2007-11-21 17:37:16,937: QuartzScheduler[line:542]: Scheduler QuartzSched uler_$_one shutting down. INFO : 2007-11-21 17:37:16,937: QuartzScheduler[line:470]: Scheduler QuartzSched uler_$_one paused. INFO : 2007-11-21 17:37:16,953: QuartzScheduler[line:592]: Scheduler QuartzSched uler_$_one shutdown complete. WARN : 2007-11-21 17:37:18,890: JobInitializationPlugin[line:140]: The "filename " plugin property is deprecated. Please use "filenames" in the future. INFO : 2007-11-21 17:37:19,000: QuartzScheduler[line:209]: Quartz Scheduler v.1. 6.0 created. INFO : 2007-11-21 17:37:19,015: ShutdownHookPlugin[line:128]: Registering Quartz shutdown hook. INFO : 2007-11-21 17:37:19,015: JobInitializationPlugin[line:280]: Registering Q uartz Job Initialization Plug-in. INFO : 2007-11-21 17:37:19,015: RAMJobStore[line:141]: RAMJobStore initialized. INFO : 2007-11-21 17:37:19,046: StdSchedulerFactory[line:1208]: Quartz scheduler 'DataTransmit' initialized from default resource file in Quartz package: 'quart z.properties' INFO : 2007-11-21 17:37:19,046: StdSchedulerFactory[line:1212]: Quartz scheduler version: 1.6.0 INFO : 2007-11-21 17:37:19,484: JobSchedulingDataProcessor[line:489]: Parsing XM L file: /D:/Tomcat/tomcat-6.0/webapps/myquartz/WEB-INF/classes/quartz_reminder.x ml with systemId: /D:/Tomcat/tomcat-6.0/webapps/myquartz/WEB-INF/classes/quartz_ reminder.xml validating: false validating schema: jar:file:/D:/Tomcat/tomcat-6.0 /webapps/myquartz/WEB-INF/lib/quartz-1.6.0.jar!/org/quartz/xml/job_scheduling_da ta_1_5.xsd ERROR: 2007-11-21 17:37:26,078: Digester[line:1558]: Parse Fatal Error at line 6 column 7: The markup declarations contained or pointed to by the document type declaration must be well-formed. org.xml.sax.SAXParseException: The markup declarations contained or pointed to b y the document type declaration must be well-formed. at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAX ParseException(ErrorHandlerWrapper.java:195) at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fatalErro r(ErrorHandlerWrapper.java:174) at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError( XMLErrorReporter.java:388) at com.sun.org.apache.xerces.internal.impl.XMLScanner.reportFatalError(X MLScanner.java:1400) at com.sun.org.apache.xerces.internal.impl.XMLDTDScannerImpl.scanDecls(X MLDTDScannerImpl.java:2003) at com.sun.org.apache.xerces.internal.impl.XMLDTDScannerImpl.scanDTDExte rnalSubset(XMLDTDScannerImpl.java:320) at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$DTDDri ver.dispatch(XMLDocumentScannerImpl.java:1169) at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$DTDDri ver.next(XMLDocumentScannerImpl.java:1066) at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$Prolog Driver.next(XMLDocumentScannerImpl.java:986) at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(X MLDocumentScannerImpl.java:645) at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next (XMLNSDocumentScannerImpl.java:140) at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImp l.scanDocument(XMLDocumentFragmentScannerImpl.java:508) at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(X ML11Configuration.java:807) at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(X ML11Configuration.java:737) at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser. java:107) at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Ab stractSAXParser.java:1205) at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.p arse(SAXParserImpl.java:522) at org.apache.commons.digester.Digester.parse(Digester.java:1647) at org.quartz.xml.JobSchedulingDataProcessor.processFile(JobSchedulingDa taProcessor.java:496) at org.quartz.xml.JobSchedulingDataProcessor.processFileAndScheduleJobs( JobSchedulingDataProcessor.java:565) at org.quartz.plugins.xml.JobInitializationPlugin.processFile(JobInitial izationPlugin.java:392) at org.quartz.plugins.xml.JobInitializationPlugin.start(JobInitializatio nPlugin.java:324) at org.quartz.plugins.SchedulerPluginWithUserTransactionSupport.start(Sc hedulerPluginWithUserTransactionSupport.java:144) at org.quartz.core.QuartzScheduler.startPlugins(QuartzScheduler.java:213 9) at org.quartz.core.QuartzScheduler.start(QuartzScheduler.java:450) at org.quartz.impl.StdScheduler.start(StdScheduler.java:146) at org.quartz.ee.servlet.QuartzInitializerServlet.init(QuartzInitializer Servlet.java:165) at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper. java:1161) at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:98 1) at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContex t.java:4044) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4 350) at org.apache.catalina.core.StandardContext.reload(StandardContext.java: 3083) at org.apache.catalina.loader.WebappLoader.backgroundProcess(WebappLoade r.java:404) at org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBas e.java:1279) at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.p rocessChildren(ContainerBase.java:1571) at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.p rocessChildren(ContainerBase.java:1580) at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.p rocessChildren(ContainerBase.java:1580) at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.r un(ContainerBase.java:1560) at java.lang.Thread.run(Thread.java:619) ERROR: 2007-11-21 17:37:26,093: JobInitializationPlugin[line:398]: Error schedul ing jobs: The markup declarations contained or pointed to by the document type d eclaration must be well-formed. org.xml.sax.SAXParseException: The markup declarations contained or pointed to b y the document type declaration must be well-formed. at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Ab stractSAXParser.java:1231) at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.p arse(SAXParserImpl.java:522) at org.apache.commons.digester.Digester.parse(Digester.java:1647) at org.quartz.xml.JobSchedulingDataProcessor.processFile(JobSchedulingDa taProcessor.java:496) at org.quartz.xml.JobSchedulingDataProcessor.processFileAndScheduleJobs( JobSchedulingDataProcessor.java:565) at org.quartz.plugins.xml.JobInitializationPlugin.processFile(JobInitial izationPlugin.java:392) at org.quartz.plugins.xml.JobInitializationPlugin.start(JobInitializatio nPlugin.java:324) at org.quartz.plugins.SchedulerPluginWithUserTransactionSupport.start(Sc hedulerPluginWithUserTransactionSupport.java:144) at org.quartz.core.QuartzScheduler.startPlugins(QuartzScheduler.java:213 9) at org.quartz.core.QuartzScheduler.start(QuartzScheduler.java:450) at org.quartz.impl.StdScheduler.start(StdScheduler.java:146) at org.quartz.ee.servlet.QuartzInitializerServlet.init(QuartzInitializer Servlet.java:165) at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper. java:1161) at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:98 1) at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContex t.java:4044) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4 350) at org.apache.catalina.core.StandardContext.reload(StandardContext.java: 3083) at org.apache.catalina.loader.WebappLoader.backgroundProcess(WebappLoade r.java:404) at org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBas e.java:1279) at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.p rocessChildren(ContainerBase.java:1571) at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.p rocessChildren(ContainerBase.java:1580) at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.p rocessChildren(ContainerBase.java:1580) at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.r un(ContainerBase.java:1560) at java.lang.Thread.run(Thread.java:619) INFO : 2007-11-21 17:37:26,109: QuartzScheduler[line:455]: Scheduler DataTransmi t_$_one started. 声明:ITeye文章版权属于作者,受法律保护。没有作者书面许可不得转载。
推荐链接
|
|
返回顶楼 | |
发表时间:2007-11-22
终于找到错误所在了,问题出在quartz_reminder.xml
<?xml version="1.0" encoding="UTF-8"?> <quartz> <job> <job-detail> <name>Job_DataTransmit</name> <group>DEFAULT</group> <job-class>scheduling.QuartzStart</job-class> </job-detail> <trigger> <cron> <name>Trigger_DataTransmit</name> <group>DEFAULT</group> <job-name>Job_DataTransmit</job-name> <job-group>DEFAULT</job-group> <cron-expression> 0 57 14 * * ? </cron-expression> </cron> </trigger> </job> </quartz>这是修改后的文件,只需要把“<!DOCTYPE quartz PUBLIC "-//Quartz Enterprise Job Scheduler//DTD Job Scheduling Data 1.0//EN" "http://www.quartzscheduler.org/dtd/job_scheduling_data_1_0.dtd">"删除掉即可。 不知道是不是跟Quartz的版本有关系? |
|
返回顶楼 | |
发表时间:2008-01-07
对quartz_reminder.xml的解析出问题了
可以参见一下 JobSchedulingDataProcessor.calss JobSchedulingDataProcessor.class |
|
返回顶楼 | |