org.quartz.SchedulerException:属性文件:'quartz.properties'无法读取

时间:2019-09-11 08:09:38

标签: java unix amazon-ec2 quartz-scheduler

我在QuartzScheduler初始化时遇到问题。

在AWS EC2中部署Java应用程序之后,我检查了unix日志框,发现以下错误。

  Quartz Scheduler failed to initialize: org.quartz.SchedulerException: Properties file: 'quartz.properties' could not be read. 
 [See nested exception: java.io.FileNotFoundException: quartz.properties (No such file or directory)]

quartz.properties文件直接放置在项目根目录下,而不是任何文件夹下。

下面是web.xml

    <servlet>
        <servlet-name>EmailReportJobRescheduler</servlet-name>
        <servlet-class>com.package.exceptiontracker.EmailReportJobRescheduler</servlet-class>
        <load-on-startup>3</load-on-startup>
      </servlet>
      <servlet-mapping>
        <servlet-name>EmailReportJobRescheduler</servlet-name>
        <url-pattern>/EmailReportJobRescheduler</url-pattern>
      </servlet-mapping>
      <servlet>
        <display-name>Quartz Initializer Servlet</display-name>
        <servlet-name>QuartzInitializer</servlet-name>
        <servlet-class>org.quartz.ee.servlet.QuartzInitializerServlet</servlet-class>
        <init-param>
          <param-name>config-file</param-name>
          <param-value>quartz.properties</param-value>
        </init-param>
        <init-param>
          <param-name>shutdown-on-unload</param-name>
          <param-value>true</param-value>
        </init-param>
        <init-param>
          <param-name>start-scheduler-on-load</param-name>
          <param-value>true</param-value>
        </init-param>
        <load-on-startup>1</load-on-startup>
      </servlet>

同一应用程序在Weblogic中部署时可以工作,但是在云中部署时会显示上述错误。有人知道为什么吗?

0 个答案:

没有答案