Uploaded image for project: 'Nuxeo Java Client'
  1. Nuxeo Java Client
  2. JAVACLIENT-233

Fix failure when updating a document with non-administrator account using operation 'Document.Update'

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 3.0.0
    • Fix Version/s: None
    • Component/s: API
    • Environment:
      Nuxeo LTS 2021

      Description

      When updating a document with a non-administrator user with operation Document.Update, it fails with this error:

      Exception in thread "main" org.nuxeo.client.spi.NuxeoClientRemoteException: HTTP/400: Cannot set the value of property: dc:creator since it is readonly
      

      This happens with a LTS 2021 Nuxeo instance only and whatever the Java client version used.

      The following code fails:

              Document doc = nuxeoClient.schemas("dublincore", "file").repository().fetchDocumentByPath("PATH_TO_DOCUMENT_HERE");
              doc = nuxeoClient.operation("Document.Update")
                      .param("properties", "dc:description=descr1")
                      .input(doc)
                      .execute();
      

      Workaround:

              doc.setPropertyValue("dc:description", "descr1");
              doc = doc.updateDocument();
      

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:

                  PagerDuty