Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 0.4.1
-
Fix Version/s: 0.4.1
-
Component/s: None
-
Labels:None
-
Environment:Grails-1.1, OSX 10.5, Java 1.6
Description
This block in TriggersConfigBuilder.groovy
Is trying to create an Expando instance with 2 maps instead of the supported one meaning a customTrigger can never be created.
} else if (name == 'customTrigger') { trigger = new Expando( clazz: attributes?.triggerClass, attributes ) if (!trigger.clazz) throw new Exception("Custom trigger must have 'triggerClass' attribute") if (!Trigger.isAssignableFrom(trigger.clazz)) throw new Exception("Custom trigger class must implement org.quartz.Trigger interface.") }
i.e.
new Expando([clazz: attributes?.triggerClass] + attributes)
Here is the Exception groovy kicks out:
Caused by: groovy.lang.GroovyRuntimeException: Could not find matching constructor for: groovy.util.Expando(java.util.LinkedHashMap, java.util.LinkedHashMap)Here is an example the trigger I was trying to create:
In case you are wondering why I didn't just use the cronTrigger. I couldn't figure out a way to specify a timezone.
Caused by: groovy.lang.GroovyRuntimeException: Could not find matching constructor for: groovy.util.Expando(java.util.LinkedHashMap, java.util.LinkedHashMap)