-
Type: Bug
-
Status: Resolved
-
Priority: Major
-
Resolution: Cannot Reproduce
-
Affects Version/s: 5.9.3
-
Fix Version/s: QualifiedToSchedule
-
Component/s: Automation, Shell
When a Groovy script is executed from the Nuxeo Shell, there is no more output excepted the value of the last executed line, if valuable.
That lead to the need of the workaround NXP-16242.
The context variable "out" is not available anymore:
****** chain ****** Name: Context.RunInputScript Exception: OperationException Caught error: Failed to invoke operation Context.RunInputScript Caused by: groovy.lang.MissingPropertyException: No such property: out for class: script1419007094386 ****** Hierarchy calls ****** org.nuxeo.ecm.automation.core.operations.RunInputScript at org.nuxeo.ecm.automation.core.impl.OperationServiceImpl.run(OperationServiceImpl.java:195) at org.nuxeo.ecm.automation.core.impl.OperationServiceImpl.run(OperationServiceImpl.java:116) at org.nuxeo.ecm.automation.server.jaxrs.OperationResource.execute(OperationResource.java:46) at org.nuxeo.ecm.automation.server.jaxrs.ExecutableResource.doPost(ExecutableResource.java:56) (...) Caused by: org.nuxeo.ecm.automation.client.RemoteThrowable: Failed to invoke operation Context.RunInputScript at org.nuxeo.ecm.automation.core.impl.InvokableMethod.invoke(InvokableMethod.java:157) at org.nuxeo.ecm.automation.core.impl.CompiledChainImpl.doInvoke(CompiledChainImpl.java:124) at org.nuxeo.ecm.automation.core.impl.CompiledChainImpl.invoke(CompiledChainImpl.java:110) at org.nuxeo.ecm.automation.core.impl.OperationServiceImpl.run(OperationServiceImpl.java:169) ... 91 more Caused by: org.nuxeo.ecm.automation.client.RemoteThrowable: No such property: out for class: script1419007094386 at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.unwrap(ScriptBytecodeAdapter.java:50) at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.getGroovyObjectProperty(ScriptBytecodeAdapter.java:537) at script1419007094386.run(script1419007094386.groovy:23) at org.nuxeo.ecm.automation.core.scripting.Scripting$GroovyScript.eval(Scripting.java:159) at org.nuxeo.ecm.automation.core.operations.RunInputScript.run(RunInputScript.java:55) at sun.reflect.GeneratedMethodAccessor1674.invoke(null) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.nuxeo.ecm.automation.core.impl.InvokableMethod.doInvoke(InvokableMethod.java:142) at org.nuxeo.ecm.automation.core.impl.InvokableMethod.invoke(InvokableMethod.java:149) ... 94 more
System.out.println() result is not visible.