Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-117285

Data engine REST API Add Record return 500 INTERNAL_SERVER_ERROR

    Details

    • Type: Bug
    • Status: Reopened
    • Resolution: Unresolved
    • Affects Version/s: Master
    • Fix Version/s: None
    • Labels:
      None

      Description

      Issue
      Data engine REST API Add Record return 500 INTERNAL_SERVER_ERROR

      Steps to Reproduce
      1. Create the data definition in my site (site id: 20124)

      curl -i -X POST \
        http://localhost:8080/o/data-engine/v2.0/sites/20124/data-definitions/by-content-type/app-builder \
        -H 'Authorization: Basic dGVzdEBsaWZlcmF5LmNvbTp0ZXN0' \
        -H 'Content-Type: application/json' \
        -d '{
          "dataDefinitionFields": [
              {
                  "fieldType": "text",
                  "name": "product"
              }
          ],
          "description": {
                  "en_US": "Description"
          },
          "name": {
                  "en_US": "Order"
          },
          "storageType":"json",
          "availableLanguageIds":["en_US"]
      }'
      

      2. Check the data definition's existence, and identify the data definition's ID

      curl -i -X GET \
        http://localhost:8080/o/data-engine/v2.0/sites/20124/data-definitions/by-content-type/app-builder \
        -H 'Authorization: Basic dGVzdEBsaWZlcmF5LmNvbTp0ZXN0' \
        -H 'Content-Type: application/json' \
      

      3. Add a record collection to the data definition (datadefinitionId: 36249):

      curl -i -X POST \
        http://localhost:8080/o/data-engine/v2.0/data-definitions/36249/data-record-collections \
        -H 'Authorization: Basic dGVzdEBsaWZlcmF5LmNvbTp0ZXN0' \
        -H 'Content-Type: application/json' \
        -d '{
          "description": {
                  "en_US": "description"
          },
          "name": {
                "en_US": "All Orders"
          }
      }'
      

      Actual Behavior

      HTTP/1.1 500 
      X-Content-Type-Options: nosniff
      X-Frame-Options: SAMEORIGIN
      X-XSS-Protection: 1
      Set-Cookie: JSESSIONID=44DFFCDC55904E7F97C95FBDB4FE9F38; Path=/; HttpOnly
      Date: Fri, 17 Jul 2020 08:38:14 GMT
      Content-Type: application/json
      Content-Length: 40
      Connection: close
      {
       "status" : "INTERNAL_SERVER_ERROR"

      Expected Behavior
      HTTP/1.1 200

      Reproduced in
      Master: 207ad2ac26ea222041dcfd50ecda74caa238bea9

       

        Attachments

          Activity

            People

            Assignee:
            to.trinh To To Trinh
            Reporter:
            to.trinh To To Trinh
            Participants of an Issue:
            Recent user:
            To To Trinh
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Days since last comment:
              1 year, 14 weeks, 1 day ago

                Packages

                Version Package