Uploaded image for project: 'Confluence Data Center'
  1. Confluence Data Center
  2. CONFSERVER-34716

REST API throws 500 with null pointer exception

    XMLWordPrintable

Details

    Description

      I'm sending the following via PUT using the REST API browser

      {
        "id": "2359303",
        "type": "page",
        "title": "NewZions",
        "body": {
          "editor": {
            "representation": "editor",
            "_expandable": {
              "content": "/rest/api/content/2359303"
            }
          },
          "view": {
            "representation": "view",
            "_expandable": {
              "content": "/rest/api/content/2359303"
            }
          },
          "export_view": {
            "representation": "export_view",
            "_expandable": {
              "content": "/rest/api/content/2359303"
            }
          },
          "storage": {
            "value": "<p>First delivery is&nbsp;@ 192.168.20.something</p><p>Second delivery is&nbsp;@ 192.168.20.something:20080</p><p>And this was added via REST</p>",
            "representation": "storage",
            "_expandable": {
              "content": "/rest/api/content/2359303"
            }
          }
        },
        "_links": {
          "webui": "/display/WHERE/NewZions",
          "tinyui": "/x/BwAk",
          "collection": "/rest/api/content",
          "base": "http://confluence.imagehawk.local:8090",
          "self": "http://confluence.imagehawk.local:8090/rest/api/content/2359303"
        },
        "_expandable": {
          "history": "/rest/api/content/2359303/history",
          "container": "",
          "ancestors": "",
          "children": "/rest/api/content/2359303/child",
          "descendants": "/rest/api/content/2359303/descendant",
          "space": "/rest/api/space/WHERE",
          "version": "",
          "metadata": ""
        }
      }
      

      The response looks like:

      Response
      PUT http://confluence.imagehawk.local:8090/rest/api/content/2359303 (500)
      Date: Wed, 27 Aug 2014 20:24:25 GMT
      Content-Encoding: gzip
      X-Content-Type-Options: nosniff
      Server: Apache-Coyote/1.1
      X-Seraph-LoginReason: OK
      Vary: User-Agent
      Content-Type: application/json
      Access-Control-Allow-Origin: http://confluence.imagehawk.local:8090
      Transfer-Encoding: chunked
      Connection: close
      Access-Control-Allow-Credentials: true
      Access-Control-Allow-Headers: Content-Type
      X-AUSERNAME: mjones

      {
        "statusCode": 500,
        "message": "java.lang.NullPointerException: null"
      }
      

      Attachments

        Issue Links

          Activity

            People

              easenjo sthr (Inactive)
              ce5b0617f3fa Mark Jones
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: