Skip to content

BoxFileRequest is throwing com.box.sdk.BoxDeserializationException  #903

@rjainrohit

Description

@rjainrohit
  • [X ] I have checked that the SDK documentation doesn't solve my issue.
  • [X ] I have checked that the API documentation doesn't solve my issue.
  • [X ] I have searched the Box Developer Forums and my issue isn't already reported (or if it has been reported, I have attached a link to it, for reference).
  • [ X] I have searched Issues in this repo and my issue isn't already reported.

Description of the Issue

The BoxFileRequest object is throwing BoxDeserializationException when trying to get the details of a File Request Link.

Steps to Reproduce

	BoxFileRequest fileRequest = new BoxFileRequest(api, "XXXX");
    BoxFileRequest.Info fileRequestInfo = fileRequest.getInfo();

Expected Behavior

It should return a valid BoxFileRequest object. The REST API returns a valid response

Error Message, Including Stack Trace

Exception in thread "main" com.box.sdk.BoxDeserializationException: Deserialization failed on: [ "field name": url | "field value": "/f/xxxxxxx" ]
at com.box.sdk.BoxFileRequest$Info.parseJSONMember(BoxFileRequest.java:420)
at com.box.sdk.BoxJSONObject.update(BoxJSONObject.java:200)
at com.box.sdk.BoxJSONObject.(BoxJSONObject.java:57)
at com.box.sdk.BoxResource$Info.(BoxResource.java:185)
at com.box.sdk.BoxFileRequest$Info.(BoxFileRequest.java:171)
at com.box.sdk.BoxFileRequest.getInfo(BoxFileRequest.java:45)
at fr.App.getGreeting(App.java:39)
at fr.App.main(App.java:44)
Caused by: com.box.sdk.BoxAPIException: Couldn't parse url for file request
at com.box.sdk.BoxFileRequest$Info.parseJSONMember(BoxFileRequest.java:416)
... 7 more
Caused by: java.net.MalformedURLException: no protocol: /f/xxxxxxx
at java.net.URL.(URL.java:593)
at java.net.URL.(URL.java:490)
at java.net.URL.(URL.java:439)
at com.box.sdk.BoxFileRequest$Info.parseJSONMember(BoxFileRequest.java:414)
... 7 more

Screenshots

NA

Versions Used

Java SDK: 2.54.0
Java: 1.8.0_201

Metadata

Metadata

Labels

bugAdded to issues that describes SDK bug

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions