We are aware of the issue with the badge emails resending to everyone, we apologise for the inconvenience - learn more here.
Forum Discussion
michal_k
8 years agoExplorer | Level 4
[Java SDK V2] How to do batch upload?
Hello, I am trying to make Batch upload work by using JAVA SDK v2. I read this documentation and tried to perform a batch upload. There is a general algorithm, which should use direct HTTP ca...
- 8 years ago
That looks like a bug that was fixed in version 2.1.2. Please make sure you're using the latest version of the SDK, and let me know if you're still seeing that.
michal_k
8 years agoExplorer | Level 4
For some reason I can't see my last reply here, so I'll write it again.
I noticed in the Javadoc, that I am probably using the functionality wrong and there is a problem in following statement:
tested.files().uploadSessionAppendV2(cursor).uploadAndFinish(in, remaining);
It should be used with close argument true like this:
tested.files().uploadSessionAppendV2(cursor, true).uploadAndFinish(in, remaining);
Now the file is being uploaded to Dropbox well, however following exception is raised from following statement:
while (tested.files().uploadSessionFinishBatchCheck(asyncJobIdValue).isInProgress()) { Thread.sleep(1000); }
java.lang.NoSuchMethodError: com.fasterxml.jackson.core.JsonParseException.<init>(Lcom/fasterxml/jackson/core/JsonParser;Ljava/lang/String;)V at com.dropbox.core.stone.StoneSerializer.expectField(StoneSerializer.java:84) at com.dropbox.core.v2.files.UploadSessionFinishBatchResultEntry$Serializer.deserialize(UploadSessionFinishBatchResultEntry.java:253) at com.dropbox.core.v2.files.UploadSessionFinishBatchResultEntry$Serializer.deserialize(UploadSessionFinishBatchResultEntry.java:205) at com.dropbox.core.stone.StoneSerializers$ListSerializer.deserialize(StoneSerializers.java:265) at com.dropbox.core.stone.StoneSerializers$ListSerializer.deserialize(StoneSerializers.java:244) at com.dropbox.core.v2.files.UploadSessionFinishBatchResult$Serializer.deserialize(UploadSessionFinishBatchResult.java:124) at com.dropbox.core.v2.files.UploadSessionFinishBatchJobStatus$Serializer.deserialize(UploadSessionFinishBatchJobStatus.java:236) at com.dropbox.core.v2.files.UploadSessionFinishBatchJobStatus$Serializer.deserialize(UploadSessionFinishBatchJobStatus.java:190) at com.dropbox.core.stone.StoneSerializer.deserialize(StoneSerializer.java:66) at com.dropbox.core.v2.DbxRawClientV2$1.execute(DbxRawClientV2.java:104) at com.dropbox.core.v2.DbxRawClientV2.executeRetriable(DbxRawClientV2.java:256) at com.dropbox.core.v2.DbxRawClientV2.rpcStyle(DbxRawClientV2.java:97) at com.dropbox.core.v2.files.DbxUserFilesRequests.uploadSessionFinishBatchCheck(DbxUserFilesRequests.java:1565) at com.dropbox.core.v2.files.DbxUserFilesRequests.uploadSessionFinishBatchCheck(DbxUserFilesRequests.java:1592) ... nothing interesting here
I think there are acually two problems. First of according to my debuger the new JsonParseException should be used in a completely different way, first argument should be an error message. I wonder, how the code is able to compile, it's probably some jackson library missmatch.
Nevertheless the main problem is, that the StoneSerializer.java is not able to parse the message and throws exception where the intended error message should be this:
expected field 'success', but was: 'name'
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
5,877 PostsLatest Activity: 12 months agoIf you need more help you can view your support options (expected response time for an email or ticket is 24 hours), or contact us on X or Facebook.
For more info on available support options for your Dropbox plan, see this article.
If you found the answer to your question in this Community thread, please 'like' the post to say thanks and to let us know it was useful!