org.quartz.SchedulerException Logging Error/Startup Issues During Annual Roll Over of New Year 2021+

Applies to:

  • Upgraded installations from Ephesoft Transact 2019.2 and below
  • Ephesoft Transact 2019.2 and below

Issue

Prior to Ephesoft Transact 2020.1, the cron expression year values are set to 2020 by default. Upon entering the 2021 calendar year, these installations along with any modifications that are hardcoded to a specific year in the past would be at risk of startup failure with the following error:

ERROR localhost-startStop-1 org.springframework.web.context.ContextLoader - Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.scheduling.quartz.SchedulerFactoryBean#10' defined in class path resource [META-INF/dcma-folder-monitor/applicationContext.xml]: Invocation of init method failed; nested exception is org.quartz.SchedulerException: Based on configured schedule, the given trigger 'DEFAULT.cronTrigger_folderMonitorServiceDaemon' will never fire.

Cron expressions must be valid for the current time period. Any cron year set previous to the current year would fail to evaluate properly.

The three optional features controlled by cron expressions affected by this are:

  • foldermonitor.re_add_watch.cronjob.expression
  • dcma.alwayson.cronjob.expression
  • log_rotation_cronjob_expression

Fresh installations of Transact 2020.1 and above have cron expression year values correctly set to 2099 by default to indicate these options as being disabled. No issues should occur for these versions moving into 2021 unless upgrades were performed from the affected versions. In these cases, the incorrect cron values may persist to the upgraded installation and should be corrected.

Solution

If you have a use case that requires the usage of any of these three features, and you are seeing this issue, check that the cron settings are set appropriately so that the feature is enabled and working across multiple years. An asterisk (*) is used to accomplish this for the year value in the cron expression.

Incorrect cron example that will fail once 2022 is reached: 0 0/1 * ? * * 2021
Correct cron example: 0 0/1 * ? * * *

Otherwise, if you don’t know if you require these features and would like to keep these in the default disabled state, follow the steps below.


The following CRON files will need to be updated to resolve the issue. These changes need to be applied to all Transact servers regardless of the operating system, including single server installations and multi-server clustered installations.

  1. Go to [Ephesoft_Directory]\Application\WEB-INF\classes\META-INF.
  2. Open the application.properties file in a text editor, such as Notepad++.
  3. Locate the following line:
javaappserver_log_rotation_cronjob_expression =0 */5 * ? * * 2020
  1. Change the above line to the following:
javaappserver_log_rotation_cronjob_expression =0 */5 * ? * * 2099
  1. Save and close the application.properties file.
  2. Open the folder-monitor.properties file, located at [Ephesoft_Directory]\Application\WEB-INF\classes\META-INF\dcma-folder-monitor.
  3. Locate the following line:
foldermonitor.re_add_watch.cronjob.expression=0 0 0 * * ? 2020
  1. Change the above line to the following:
foldermonitor.re_add_watch.cronjob.expression=0 0 0 * * ? 2099
  1. Save and close the folder-monitor.properties file.
  2. Open the dcma-workflow.properties file, located at [Ephesoft_Directory]\Application\WEB-INF\classes\META-INF\dcma-workflows.
  3. Locate the following line:
dcma.alwayson.cronjob.expression=0 0/1 * ? * * 2020
  1. Change the above line to the following:
dcma.alwayson.cronjob.expression=0 0/1 * ? * * 2099
  1. Save and close the dcma-workflow.properties file.
  2. Restart Ephesoft Transact.