解析日粮调度程序的jobs.xml文件时出错

时间:2017-09-06 10:34:02

标签: xml quartz-scheduler

我有一个日程安排程序工作,应该在jobs.xml的帮助下运行。当我启动dropwizard应用程序时,会检测到jobs.xml文件,但在解析文件时会出现一些错误。

我正在尝试使用简单的触发器,而Class中只有一个作业:com.listener.Listener。请帮我解决这个问题。

我的jobs.xml是

<?xml version='1.0' encoding='utf-8'?>
<job-scheduling-data>

<schedule>
    <!-- job with simple trigger -->
    <job>
        <name>ListenerJob</name>
        <job-class>com.listener.Listener</job-class>
        <job-data-map>
            <entry>
                <key>listernerTime</key>
                <value>20000</value>
            </entry>
        </job-data-map>
    </job>
    <trigger>
        <simple>
            <name>ListenerJob-Trigger</name>
            <job-name>ListenerJob</job-name>
            <repeat-count>-1</repeat-count>
            <repeat-interval>20000</repeat-interval>
        </simple>
    </trigger>

</schedule>

我收到此错误:

ERROR [2017-09-06 10:03:02,769] org.quartz.plugins.xml.XMLSchedulingDataProcessorPlugin: Error scheduling jobs: null
! java.lang.NullPointerException: null
! ... 59 common frames omitted
! Causing: java.net.MalformedURLException: null
! at java.net.URL.<init>(Unknown Source)
! at java.net.URL.<init>(Unknown Source)
! at java.net.URL.<init>(Unknown Source)
! at com.sun.org.apache.xerces.internal.impl.XMLEntityManager.setupCurrentEntity(Unknown Source)
! at com.sun.org.apache.xerces.internal.impl.XMLVersionDetector.determineDocVersion(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.DOMParser.parse(Unknown Source)
! at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(Unknown Source)
! at org.quartz.plugins.xml.XMLSchedulingDataProcessor.process(XMLSchedulingDataProcessor.java:276)
! at org.quartz.plugins.xml.XMLSchedulingDataProcessor.processFile(XMLSchedulingDataProcessor.java:255)
! at org.quartz.plugins.xml.XMLSchedulingDataProcessor.processFile(XMLSchedulingDataProcessor.java:236)
! at org.quartz.plugins.xml.XMLSchedulingDataProcessorPlugin.start(XMLSchedulingDataProcessorPlugin.java:134)
! at org.quartz.QuartzScheduler.startPlugins(QuartzScheduler.java:1113)
! at org.quartz.QuartzScheduler.start(QuartzScheduler.java:211)
! at org.knowm.sundial.ee.SundialInitializerListener.contextInitialized(SundialInitializerListener.java:122)
! at org.eclipse.jetty.server.handler.ContextHandler.callContextInitialized(ContextHandler.java:876)
! at org.eclipse.jetty.servlet.ServletContextHandler.callContextInitialized(ServletContextHandler.java:532)
! at org.eclipse.jetty.server.handler.ContextHandler.startContext(ContextHandler.java:839)
! at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:344)
! at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:799)
! at org.eclipse.jetty.servlet.ServletContextHandler.doStart(ServletContextHandler.java:261)
! at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
! at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:131)
! at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:105)
! at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:113)
! at com.codahale.metrics.jetty9.InstrumentedHandler.doStart(InstrumentedHandler.java:103)
! at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
! at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:131)
! at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:113)
! at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:113)
! at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
! at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:131)
! at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:105)
! at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:113)
! at org.eclipse.jetty.server.handler.gzip.GzipHandler.doStart(GzipHandler.java:290)
! at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
! at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:131)
! at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:105)
! at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:113)
! at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
! at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:131)
! at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:105)
! at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:113)
! at org.eclipse.jetty.server.handler.StatisticsHandler.doStart(StatisticsHandler.java:252)
! at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
! at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:131)
! at org.eclipse.jetty.server.Server.start(Server.java:452)
! at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:105)
! at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:113)
! at org.eclipse.jetty.server.Server.doStart(Server.java:419)
! at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
! at io.dropwizard.cli.ServerCommand.run(ServerCommand.java:53)
! at io.dropwizard.cli.EnvironmentCommand.run(EnvironmentCommand.java:44)
! at io.dropwizard.cli.ConfiguredCommand.run(ConfiguredCommand.java:85)
! at io.dropwizard.cli.Cli.run(Cli.java:74)
! at io.dropwizard.Application.run(Application.java:89)

请帮忙解决这个问题。

0 个答案:

没有答案