Hi,
I've been doing some small test applications with Quartz.NET, and I'm getting the following exception when starting the Scheduler:
Quartz.SchedulerConfigException was unhandled
HResult=-2146233088
Message=Failure occured during job recovery.
Source=Quartz
StackTrace:
at Quartz.Impl.AdoJobStore.JobStoreSupport.SchedulerStarted() in c:\Work\OpenSource\Quartz.NET\quartznet\src
\Quartz\Impl\AdoJobStore\JobStoreSupport.cs:line 543
at Quartz.Core.QuartzScheduler.Start() in c:\Work\OpenSource\Quartz.NET\quartznet\src\Quartz\Core
\QuartzScheduler.cs:line 442
at Quartz.Impl.StdScheduler.Start() in c:\Work\OpenSource\Quartz.NET\quartznet\src\Quartz\Impl
\StdScheduler.cs:line 222
at QuartzDemo.Scheduler.CreateJobIfNotPersisted() in c:\Users\Sagostinho\Desktop\QuartzDemo\QuartzDemo
\Scheduler.cs:line 40
at QuartzDemo.Scheduler.Main(String[] args) in c:\Users\Sagostinho\Desktop\QuartzDemo\QuartzDemo
\Scheduler.cs:line 17
at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback,
Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object
state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object
state)
at System.Threading.ThreadHelper.ThreadStart()
InnerException: Quartz.JobPersistenceException
HResult=-2146233088
Message=Couldn't retrieve trigger: Input string was not in a correct format.
Source=Quartz
StackTrace:
at Quartz.Impl.AdoJobStore.JobStoreSupport.RetrieveTrigger(ConnectionAndTransactionHolder conn, TriggerKey
triggerKey) in c:\Work\OpenSource\Quartz.NET\quartznet\src\Quartz\Impl\AdoJobStore\JobStoreSupport.cs:line 1319
at Quartz.Impl.AdoJobStore.JobStoreSupport.RecoverMisfiredJobs(ConnectionAndTransactionHolder conn, Boolean
recovering) in c:\Work\OpenSource\Quartz.NET\quartznet\src\Quartz\Impl\AdoJobStore\JobStoreSupport.cs:line 750
at Quartz.Impl.AdoJobStore.JobStoreSupport.RecoverJobs(ConnectionAndTransactionHolder conn) in c:\Work
\OpenSource\Quartz.NET\quartznet\src\Quartz\Impl\AdoJobStore\JobStoreSupport.cs:line 701
at Quartz.Impl.AdoJobStore.JobStoreSupport.b__2(ConnectionAndTransactionHolder conn) in c:
\Work\OpenSource\Quartz.NET\quartznet\src\Quartz\Impl\AdoJobStore\JobStoreSupport.cs:line 643
at Quartz.Impl.AdoJobStore.JobStoreSupport.<>c__DisplayClass74.b__73
(ConnectionAndTransactionHolder conn) in c:\Work\OpenSource\Quartz.NET\quartznet\src\Quartz\Impl\AdoJobStore
\JobStoreSupport.cs:line 3362
at Quartz.Impl.AdoJobStore.JobStoreSupport.ExecuteInNonManagedTXLock(String lockName, Func`2 txCallback) in
c:\Work\OpenSource\Quartz.NET\quartznet\src\Quartz\Impl\AdoJobStore\JobStoreSupport.cs:line 3414
at Quartz.Impl.AdoJobStore.JobStoreSupport.ExecuteInNonManagedTXLock(String lockName, Action`1 txCallback)
in c:\Work\OpenSource\Quartz.NET\quartznet\src\Quartz\Impl\AdoJobStore\JobStoreSupport.cs:line 3362
at Quartz.Impl.AdoJobStore.JobStoreSupport.RecoverJobs() in c:\Work\OpenSource\Quartz.NET\quartznet\src
\Quartz\Impl\AdoJobStore\JobStoreSupport.cs:line 643
at Quartz.Impl.AdoJobStore.JobStoreSupport.SchedulerStarted() in c:\Work\OpenSource\Quartz.NET\quartznet
\src\Quartz\Impl\AdoJobStore\JobStoreSupport.cs:line 539
InnerException: System.FormatException
HResult=-2146233033
Message=Input string was not in a correct format.
Source=mscorlib
StackTrace:
at System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number,
NumberFormatInfo info, Boolean parseDecimal)
at System.Number.ParseInt32(String s, NumberStyles style, NumberFormatInfo info)
at System.Int32.Parse(String s)
at Quartz.Impl.AdoJobStore.DailyTimeIntervalTriggerPersistenceDelegate.GetTriggerPropertyBundle
(SimplePropertiesTriggerProperties props) in c:\Work\OpenSource\Quartz.NET\quartznet\src\Quartz\Impl\AdoJobStore
\DailyTimeIntervalTriggerPersistenceDelegate.cs:line 151
at
Quartz.Impl.AdoJobStore.SimplePropertiesTriggerPersistenceDelegateSupport.LoadExtendedTriggerProperties
(ConnectionAndTransactionHolder conn, TriggerKey triggerKey) in c:\Work\OpenSource\Quartz.NET\quartznet\src\Quartz\Impl
\AdoJobStore\SimplePropertiesTriggerPersistenceDelegateSupport.cs:line 176
at Quartz.Impl.AdoJobStore.StdAdoDelegate.SelectTrigger(ConnectionAndTransactionHolder conn, TriggerKey
triggerKey) in c:\Work\OpenSource\Quartz.NET\quartznet\src\Quartz\Impl\AdoJobStore\StdAdoDelegate.cs:line 1510
at Quartz.Impl.AdoJobStore.JobStoreSupport.RetrieveTrigger(ConnectionAndTransactionHolder conn,
TriggerKey triggerKey) in c:\Work\OpenSource\Quartz.NET\quartznet\src\Quartz\Impl\AdoJobStore\JobStoreSupport.cs:line
1314
InnerException:
As shown in the stack trace, I'm using the AdoJobStore with an SQL Server 2008 database.
Looking at the source code, the exception happens while parsing a date (comma separated) in the DailyTimeIntervalTriggerPersistenceDelegate:
TimeOfDay endTimeOfDay;
if (nums.Length >= 6)
{
int hour = Int32.Parse(nums[3]);
int min = Int32.Parse(nums[4]);
int sec = Int32.Parse(nums[5]);
endTimeOfDay = new TimeOfDay(hour, min, sec);
}
Looking at the database, it seems the fault is in a row of the QRTZ_SIMPROP_TRIGGERS table which contains the "0,0,0,,,," value in the STR_PROP_3 column.