java.lang.NullPointerException

Atlassian JIRA | Nick Mason [Atlassian] | 2 years ago
  1. 0

    The [REST API documentation|https://docs.atlassian.com/atlassian-confluence/REST/latest/#d3e676] for {{/rest/api/content/\{id}/child/attachment/\{attachmentId}/data}} says "Comments are optional, but if included there must be as many comments as there are files, and the comments must be in the same order as the files", and the "minorEdit" field is optional as well. However, if you don't specify either one of them, you get an NPE back: {code} {"statusCode":500,"message":"java.lang.NullPointerException: null"} {code} And you get a stack trace in the logs: {code:none} 2014-07-17 20:02:30,149 ERROR [TP-Processor6] [rest.api.model.ExceptionConverter] convertServiceException No status code found for exception, converting to internal server error : -- url: /wiki/rest/api/content/11108361/child/attachment/11403267/data | userName: admin java.lang.NullPointerException at com.atlassian.confluence.rest.resources.AttachmentResource.updateData(AttachmentResource.java:341) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at com.atlassian.plugins.rest.common.interceptor.impl.DispatchProviderHelper$TypeOutInvoker$1.invoke(DispatchProviderHelper.java:205) [...] {code} Additionally, the example request URIs given in the documentation is wrong (they say to "http://example.com/rest/api/content/1234/attachments/5678/data", which doesn't work and doesn't match what the actual heading of the REST endpoint you're looking at is). There's also another one that says "/rest/api/1/content/\[...]" which is incorrect too.

    Atlassian JIRA | 2 years ago | Nick Mason
    java.lang.NullPointerException
  2. 0

    The [REST API documentation|https://docs.atlassian.com/atlassian-confluence/REST/latest/#d3e676] for {{/rest/api/content/\{id}/child/attachment/\{attachmentId}/data}} says "Comments are optional, but if included there must be as many comments as there are files, and the comments must be in the same order as the files", and the "minorEdit" field is optional as well. However, if you don't specify either one of them, you get an NPE back: {code} {"statusCode":500,"message":"java.lang.NullPointerException: null"} {code} And you get a stack trace in the logs: {code:none} 2014-07-17 20:02:30,149 ERROR [TP-Processor6] [rest.api.model.ExceptionConverter] convertServiceException No status code found for exception, converting to internal server error : -- url: /wiki/rest/api/content/11108361/child/attachment/11403267/data | userName: admin java.lang.NullPointerException at com.atlassian.confluence.rest.resources.AttachmentResource.updateData(AttachmentResource.java:341) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at com.atlassian.plugins.rest.common.interceptor.impl.DispatchProviderHelper$TypeOutInvoker$1.invoke(DispatchProviderHelper.java:205) [...] {code} Additionally, the example request URIs given in the documentation is wrong (they say to "http://example.com/rest/api/content/1234/attachments/5678/data", which doesn't work and doesn't match what the actual heading of the REST endpoint you're looking at is). There's also another one that says "/rest/api/1/content/\[...]" which is incorrect too.

    Atlassian JIRA | 2 years ago | Nick Mason [Atlassian]
    java.lang.NullPointerException
  3. 0

    Android: Saving Map State in Google map

    Stack Overflow | 11 months ago | Junie Negentien
    java.lang.RuntimeException: Unable to resume activity {com.ourThesis.junieNegentien2015/com.ourThesis.junieNegentien2015.MainActivity}: java.lang.NullPointerException
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.NullPointerException

      No message provided

      at com.atlassian.confluence.rest.resources.AttachmentResource.updateData()
    2. com.atlassian.confluence
      AttachmentResource.updateData
      1. com.atlassian.confluence.rest.resources.AttachmentResource.updateData(AttachmentResource.java:341)
      1 frame
    3. Java RT
      Method.invoke
      1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      4. java.lang.reflect.Method.invoke(Method.java:597)
      4 frames
    4. com.atlassian.plugins
      DispatchProviderHelper$TypeOutInvoker$1.invoke
      1. com.atlassian.plugins.rest.common.interceptor.impl.DispatchProviderHelper$TypeOutInvoker$1.invoke(DispatchProviderHelper.java:205)
      1 frame