cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Want to learn some quick and useful tips to make your day easier? Check out how Calvin uses Replay to get feedback from other teams at Dropbox here.

Dropbox API Support & Feedback

Find help with the Dropbox API from other developers.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Re: Having trouble with Java's Dropbox API

Having trouble with Java's Dropbox API

Kathleen K.7
New member | Level 1

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 5

Greg-DB
Dropbox Staff

Hi Kathleen, I noticed this was also posted on StackOverflow, but has since been removed. Are you still having trouble with this?

Kathleen K.7
New member | Level 1

Yeah, it's still not working for me. Sorry for the double posting! 

Greg-DB
Dropbox Staff

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.7
New 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.1
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.

Need more support?