-
Type: Bug
-
Status: Resolved
-
Priority: Major
-
Resolution: Not A Bug
-
Affects Version/s: 7.10
-
Component/s: Automation
-
Tags:
-
Backlog priority:100
-
Sprint:nxfit 8.4.5
-
Story Points:5
The use of aliases is not working.
For instance, using the old Document.Query operation, which is an alias of the new Repository.Query operation, fails:
- from Nuxeo Shell
> Document.Query -query "select * from File" Unknown command: Document.Query
- from a curl command
curl -X POST 'http://demo.nuxeo.com/nuxeo/site/automation/Document.Query' -u Administrator:Administrator -H 'Nuxeo-Transaction-Timeout: 3' -H 'X-NXproperties: *' -H 'X-NXRepository: default' -H 'X-NXVoidOperation: false' -d '{"params":{"query":"select * from File","language":"NXQL","sortOrder":"ASC"},"context":{}}'
it raises a NPE
Apr 19, 2016 2:44:48 PM com.sun.jersey.spi.container.servlet.WebComponent filterFormParameters WARNING: A servlet request, to the URI http://nereid2:8080/nuxeo/site/automation/Document.Query, contains form parameters in the request body but the request body has been consumed by the servlet or a servlet filter accessing the request parameters. Only resource methods using @FormParam will work as expected. Resource methods consuming the request body by other means will not work as expected. {}14:44:48,564 WARN [WebEngineExceptionMapper] Exception in JAX-RS processing {{PathInfo,/automation/Document.Query}{RemoteAddr,10.213.3.49}{RequestURL,http://localhost:8080/nuxeo/site/automation/Document.Query}{ServletPath,/site}{UserPrincipal,Administrator}}java.lang.NullPointerException at org.nuxeo.ecm.automation.server.jaxrs.OperationResource.execute(OperationResource.java:50) at org.nuxeo.ecm.automation.server.jaxrs.ExecutableResource.doPost(ExecutableResource.java:61) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at com.sun.jersey.spi.container.JavaMethodInvokerFactory$1.invoke(JavaMethodInvokerFactory.java:60)
But it works when pasting the URL http://localhost:8080/nuxeo/site/automation/Document.Query in a browser
{ "id" : "Repository.Query", "aliases" : [ "Document.Query" ], "label" : "Query", "category" : "Fetch", "requires" : null, ...