cancel
Showing results for 
Search instead for 
Did you mean: 

getReviewFile throwing null pointer exception

Highlighted
New Member

getReviewFile throwing null pointer exception

Hi everybody,

 

I'm having troubles retrieving files from reviews via the JSON api. 

Technically I only want to retrieve the names of the files but none of the attempts I've made succeeded.

My request looks as follows (using the v1 testing form) using version collaborator 12.2.12203

 

[ {
  "command" : "SessionService.setMetadata",
  "args" : {
    "clientName" : "HTML JSON API Tester",
    "expectedServerVersion" : "12.2.12203"
  }
}, {
  "command" : "ServerInfoService.getVersion"
}, 
{
  "command": "SessionService.authenticate",
  "args":{
    "login":"<name>",
    "ticket":"<token>"
  }
},
{
  "command" : "Examples.checkLoggedIn"
},
{
  "command": "ReviewService.getReviewFile",
  "args":{
    "versionId":123456,
    "reviewId":1234
  }
}
]

 

Every other command, such as getComments or findReviewsByCustomFieldValue works for me without troubles but the output of the above is:

 

[ {
  "result" : { }
}, {
  "result" : {
    "version" : "12.2.12203"
  }
}, {
  "result" : { }
}, {
  "result" : {
    "loggedIn" : true
  }
}, {
  "errors" : [ {
    "code" : "NullPointerException",
    "message" : null
  } ]
} ]

 

The fact that it throws a null pointer exception tells me that there's something wrong with the server and not my code. 

Does anybody else have this problem or do I have to bug my IT team to update the version we're using?

 

Cheers,

  Ben

New Here?
Join us and watch the welcome video: