I have a problem with a simple NXQL query in Studio launched using quartz :
SELECT * FROM Document WHERE reunion:rappel > @{CurrentDate.days(-1)} AND reunion:rappel < @{CurrentDate.days(1)}
it generates the following text in an Info Message :
SELECT * FROM Document WHERE reunion:rappel > TIMESTAMP '2012-09-09 11:12:39.984' AND reunion:rappel < TIMESTAMP '2012-09-10 11:12:39.984'
but does not work with my operation chain :
2012-09-10 11:11:20,032 ERROR [org.nuxeo.ecm.automation.core.events.OperationEventListener] Failed to handle event cron_alarm_reunion using chain: cron_alarm_reunion_op
org.nuxeo.ecm.automation.OperationException: Failed to invoke operation Document.Query
at org.nuxeo.ecm.automation.core.impl.InvokableMethod.invoke(InvokableMethod.java:140)
at org.nuxeo.ecm.automation.core.impl.CompiledChainImpl.doInvoke(CompiledChainImpl.java:114)
at org.nuxeo.ecm.automation.core.impl.CompiledChainImpl.invoke(CompiledChainImpl.java:96)
at org.nuxeo.ecm.automation.core.impl.CompiledChainImpl.doInvoke(CompiledChainImpl.java:117)
at org.nuxeo.ecm.automation.core.impl.CompiledChainImpl.invoke(CompiledChainImpl.java:96)
at org.nuxeo.ecm.automation.core.impl.OperationServiceImpl.run(OperationServiceImpl.java:85)
at org.nuxeo.ecm.automation.core.events.EventHandlerRegistry.handleEvent(EventHandlerRegistry.java:198)
at org.nuxeo.ecm.automation.core.events.OperationEventListener.handleEvent(OperationEventListener.java:33)
at org.nuxeo.ecm.core.event.impl.EventServiceImpl.fireEvent(EventServiceImpl.java:195)
at org.nuxeo.ecm.platform.scheduler.core.EventJob.execute(EventJob.java:102)
at org.nuxeo.ecm.platform.scheduler.core.EventJob.execute(EventJob.java:59)
at org.quartz.core.JobRunShell.run(JobRunShell.java:203)
at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:520)
Caused by: java.lang.NullPointerException
at org.nuxeo.ecm.automation.core.operations.document.Query.run(Query.java:43)
at sun.reflect.GeneratedMethodAccessor221.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.nuxeo.ecm.automation.core.impl.InvokableMethod.doInvoke(InvokableMethod.java:117)
at org.nuxeo.ecm.automation.core.impl.InvokableMethod.invoke(InvokableMethod.java:132)
... 12 more
Any idea ?