--49aa7f4345392404ce8bb3c80d546fc0
Content-Type: text/plain;
charset="utf-8"
Content-Transfer-Encoding: 8bit
Hi everybody,
I try to execute a groovy script from Nuxeo Shell but Nuxeo
DM returns me an error MissingPropertyException: No such
property.
This is my test script:
import org.nuxeo.ecm.core.api.*;
import org.nuxeo.common.utils.*;
def session = ctx.getRepositoryInstance();
And the Nuxeo Server Error:
...
Caused by: groovy.lang.MissingPropertyException: No such
property: ctx for class: script1317115653450
at
org.codehaus.groovy.runtime.ScriptBytecodeAdapter.unwrap(Scr
iptBytecodeAdapter.java:50)
at
org.codehaus.groovy.runtime.ScriptBytecodeAdapter.getGroovyO
bjectProperty(ScriptBytecodeAdapter.java:537)
at script1317115653450.run(script1317115653450.groovy:26)
at
org.nuxeo.ecm.automation.core.scripting.Scripting$GroovyScri
pt.eval(Scripting.java:138)
at
org.nuxeo.ecm.automation.core.operations.RunInputScript.run(
RunInputScript.java:60)
... 59 more
...
I execute this script with the command "script test.groovy"
from Nuxeo Shell in interactive mod. It doesn't find the
context ctx variable.
I try with Nuxeo exemple scripts (like "select.groovy",
"publish.groovy"), but it's the same problem...
Do you know why ?
Or, how can I execute a query on users in a script with an
other way ?
Thanks.
Romain
--49aa7f4345392404ce8bb3c80d546fc0
Content-Type: application/octet-stream; name="test.groovy"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="test.groovy"
aW1wb3J0IG9yZy5udXhlby5lY20uY29yZS5hcGkuKjsKaW1wb3J0IG9yZy5udXhlby5jb21tb24u
dXRpbHMuKjsKCmRlZiBzZXNzaW9uID0gY3R4LmdldFJlcG9zaXRvcnlJbnN0YW5jZSgpOwo=
--49aa7f4345392404ce8bb3c80d546fc0--
---
Mailing list: [email protected]
Forum: http://forum.nuxeo.org/f/2/