Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
Hi,
I've been experimenting with the Java Dropbox API, but Eclipse for some reason marks this line as an error and it throws an exception when I try to run the sample program:
contents = JsonArrayReader.mk(Reader, collector).readField(parser, fieldName, contents);
It marks readField
as 'not applicable' though I have no idea why. Can someone help me?
Hi Kathleen, I noticed this was also posted on StackOverflow, but has since been removed. Are you still having trouble with this?
Yeah, it's still not working for me. Sorry for the double posting!
No problem, we'll be happy to help. Can you post any other relevant code as well as the exception you're getting so we can look into it/reproduce it? Thanks in advance!
Hi, I just ran this sample code that I grabbed from the Dropbox API tutorial, linked here:
https://www.dropbox.com/developers/core/start/java
After going through the authorization process and linking with my account, I got this exception:
Exception in thread "main" java.lang.Error: Unresolved compilation problem:
_ The method readField(JsonParser, String, capture#23-of ? extends C) in the type JsonReader<capture#23-of ? extends C> is not applicable for the arguments (JsonParser, String, C)_
at com.dropbox.core.DbxEntry._read(DbxEntry.java:601)
_ at com.dropbox.core.DbxEntry.read(DbxEntry.java:551)_
_ at com.dropbox.core.DbxEntry$File$1.read(DbxEntry.java:273)_
_ at com.dropbox.core.DbxEntry$File$1.read(DbxEntry.java:1)_
_ at com.dropbox.core.json.JsonReader.readFully(JsonReader.java:349)_
_ at com.dropbox.core.json.JsonReader.readFully(JsonReader.java:242)_
_ at com.dropbox.core.DbxRequestUtil.readJsonFromResponse(DbxRequestUtil.java:219)_
_ at com.dropbox.core.DbxClient$SingleUploader$1.handle(DbxClient.java:766)_
_ at com.dropbox.core.DbxClient$SingleUploader$1.handle(DbxClient.java:1)_
_ at com.dropbox.core.DbxRequestUtil.finishResponse(DbxRequestUtil.java:279)_
_ at com.dropbox.core.DbxClient$SingleUploader.finish(DbxClient.java:761)_
_ at com.dropbox.core.DbxClient.finishUploadFile(DbxClient.java:629)_
_ at com.dropbox.core.DbxClient.uploadFile(DbxClient.java:562)_
_ at com.dropbox.core.DbxClient.uploadFile(DbxClient.java:514)_
_ at tools.FileUploader.main(FileUploader.java:36)_
When I go into the DbxEntry class, the readField method is marked as an error.
It could be that this issue has to do with a bug in the Eclipse Java compiler (ECJ). (Eclipse has its own Java compiler. It doesn't use the standard JDK compiler.)
Can you try and find out which version of the Eclipse compiler you have? Instructions on how to do that: http://stackoverflow.com/questions/18497913/how-can-i-find-the-ecj-version-in-eclipse
You can also try upgrading your version of Eclipse to see if it fixes the issue.
Hi there!
If you need more help you can view your support options (expected response time for a 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!