0
votes
DocsService client= new DocsService ("idea");
 client.useSsl ();
  client.setOAuthCredentials (oauthParameters, new OAuthHmacSha1Signer ());
    DocumentListEntry newEntry= new com.google.gdata.data.docs.SpreadsheetEntry ();
        newEntry.setTitle (new PlainTextConstruct ("GIdeaDB"));
        DocumentListEntry insertedEntry= client.insert (new URL (
       "https://docs.google.com/feeds/default/private/full/?xoauth_requestor_id="+                        userEmail), newEntry);

but i got NoSuchMethodException in client.insert (new URL ( "https://docs.google.com/feeds/default/private/full/?xoauth_requestor_id="+ userEmail), newEntry);

what i do please help me....

2
Has the method changed? sounds like you may have a jar version problem - RNJ
What does the documentation on DocsService say? Does it indicate the presence of an .insert(URL, DocumentListEntry) method? Can you link the documentation? - John Dvorak
yes i used same method insert(url,DocumentListEntry) and i configure gdata-docs3.0 jar file but it's not working is there another way to create the spreadsheet ? - user1686253

2 Answers

2
votes

A NoSuchMethodError usually means that you used a different version of the library to compile the code than you use to run it.

0
votes

One of the insert methods take three parameters and one takes two. Neither of these methods match what you ate passing in. Which version of the library are you compiling with and which version are you running with? As I said in my comment it is likely to be a version mismatch if it compiles but does not run.

See https://developers.google.com/gdata/javadoc/com/google/gdata/client/docs/DocsService