Need to see if your shared folder is taking up space on your dropbox 👨💻? Find out how to check here.
Forum Discussion
Kathleen K.7
11 years agoNew member | Level 1
Having trouble with Java's Dropbox API
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?
5 Replies
Replies have been turned off for this discussion
- Greg-DB11 years ago
Dropbox Community Moderator
Hi Kathleen, I noticed this was also posted on StackOverflow, but has since been removed. Are you still having trouble with this?
- Kathleen K.711 years agoNew member | Level 1
Yeah, it's still not working for me. Sorry for the double posting!
- Greg-DB11 years ago
Dropbox Community Moderator
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!
- Kathleen K.711 years agoNew member | Level 1
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.
- Kannan G.111 years ago
Dropbox Staff
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.
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
The Dropbox Community team is active from Monday to Friday. We try to respond to you as soon as we can, usually within 2 hours.
If 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, Facebook or Instagram.
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!