clarencen/lshift — Issue #64: Invalid cron spec gets persisted
Author: clarencen
Created: 2011-11-14 22:41:33+00:00
State: open

Specifying an invalid cron specification (in a XML post) appears to get saved to the database and hence causes a ground hog day scenario whereby Diffa cannot restart itself cleanly because the config has become corrupted (see attached stack trace as a symptom).

Furthermore, the agent does not appear to be impervious to bogus XMLs being updated - what seems to happen is that the agent becomes unresponsive to subsequent XML re-uploads.

@@@
Caused by: java.text.ParseException: Support for specifying both a day-of-week AND a day-of-month parameter is not implemented.
at org.quartz.CronExpression.buildExpression(CronExpression.java:490) ~[quartz-2.1.0.jar:na]
at org.quartz.CronExpression.(CronExpression.java:276) ~[quartz-2.1.0.jar:na]
at org.quartz.CronExpression.validateExpression(CronExpression.java:403) ~[quartz-2.1.0.jar:na]
at org.quartz.CronScheduleBuilder.cronSchedule(CronScheduleBuilder.java:105) ~[quartz-2.1.0.jar:na]
at net.lshift.diffa.kernel.scheduler.QuartzScanScheduler.assertSchedule$1(QuartzScanScheduler.scala:105) ~[diffa-kernel-0.9-SNAPSHOT.jar:na]
at net.lshift.diffa.kernel.scheduler.QuartzScanScheduler$$anonfun$onUpdatePair$1.apply(QuartzScanScheduler.scala:134) ~[diffa-kernel-0.9-SNAPSHOT.jar:na]
at net.lshift.diffa.kernel.scheduler.QuartzScanScheduler$$anonfun$onUpdatePair$1.apply(QuartzScanScheduler.scala:132) ~[diffa-kernel-0.9-SNAPSHOT.jar:na]
at scala.collection.immutable.Map$Map2.foreach(Map.scala:139) ~[scala-library-2.9.0-1.jar:na]
at net.lshift.diffa.kernel.scheduler.QuartzScanScheduler.onUpdatePair(QuartzScanScheduler.scala:132) ~[diffa-kernel-0.9-SNAPSHOT.jar:na]
at net.lshift.diffa.kernel.scheduler.QuartzScanScheduler$$anonfun$1.apply(QuartzScanScheduler.scala:85) ~[diffa-kernel-0.9-SNAPSHOT.jar:na]
at net.lshift.diffa.kernel.scheduler.QuartzScanScheduler$$anonfun$1.apply(QuartzScanScheduler.scala:85) ~[diffa-kernel-0.9-SNAPSHOT.jar:na]
at scala.collection.mutable.ResizableArray$class.foreach(ResizableArray.scala:60) ~[scala-library-2.9.0-1.jar:na]
at scala.collection.mutable.ArrayBuffer.foreach(ArrayBuffer.scala:44) ~[scala-library-2.9.0-1.jar:na]
at net.lshift.diffa.kernel.scheduler.QuartzScanScheduler.(QuartzScanScheduler.scala:85) ~[diffa-kernel-0.9-SNAPSHOT.jar:na]
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[na:1.6.0_16]
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) ~[na:1.6.0_16]
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) ~[na:1.6.0_16]
at java.lang.reflect.Constructor.newInstance(Constructor.java:513) ~[na:1.6.0_16]
at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:126) ~[spring-beans-3.0.6.RELEASE.jar:3.0.6.RELEASE]
... 24 common frames omitted
@@@