Uploaded image for project: 'Nuxeo Platform'
  1. Nuxeo Platform
  2. NXP-19522

Fix usage of Automation aliases

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Not A Bug
    • Affects Version/s: 7.10
    • Fix Version/s: 7.10-HF16, 8.10
    • Component/s: Automation

      Description

      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,
      ...
      

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 4 hours
                4h