0

Already I used older version of the API to upload files to Google docs but now the API version is revised, so I couldn't upload.

Previously I used these lines for authorization:

DocsService service = new DocsService("MyDocumentsListIntegration-v1");
    service.setUserCredentials(USERNAME, PASSWORD);

But now it is giving this error:

Exception in thread "main" java.lang.NoClassDefFoundError: javax/mail/MessagingException
    at sample.main(sample.java:15)
Caused by: java.lang.ClassNotFoundException: javax.mail.MessagingException
    at java.net.URLClassLoader$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    ... 1 more

Can anyone help me?

1 Answer 1

1

It seems like you are missing one of the external dependencies, mail.jar, which is part of Sun's JavaMail API.

Check this page for instructions on how to get it as well as all other external dependencies: https://developers.google.com/gdata/articles/java_client_lib

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.