Skip to content

Google drive Code is compiled but not running #900

@GoogleCodeExporter

Description

@GoogleCodeExporter
Version of google-api-java-client (e.g. 1.15.0-rc)?
1.19.0

Java environment (e.g. Java 6, Android 2.3, App Engine)?
java version "1.7.0_51"

Describe the problem.
I am new to google API. I have written a code to upload a file on google drive 
using service account. I have generated the API-KEY for my account.
I have added all jars to classpath. I am able to compile the code without any 
error. But upon running the code, I get no class def found error.

Exception in thread "main" java.lang.NoClassDefFoundError: 
com/google/appengine/api/appidentity/AppIdentityServiceFactory
        at com.google.api.client.googleapis.extensions.appengine.auth.oauth2.AppIdentityCredential.<init>(AppIdentityCredential.java:86)
        at com.google.api.client.googleapis.extensions.appengine.auth.oauth2.AppIdentityCredential$Builder.build(AppIdentityCredential.java:178)
        at DriveCommandLine.main(DriveCommandLine.java:37)
Caused by: java.lang.ClassNotFoundException: 
com.google.appengine.api.appidentity.AppIdentityServiceFactory
        at java.net.URLClassLoader$1.run(Unknown Source)
        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)
        ... 3 more


Please help. I have attached my code into this case. I have removed the API-KEY 
string.

How would you expect it to be fixed?
Either some jar file is missing or some other issue is there. If code is 
compiling properly then it should also run without any class error.

Original issue reported on code.google.com by adityaz...@gmail.com on 31 Aug 2014 at 4:27

Attachments:

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions