You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
"If code is compiling properly then it should also run without any class
error." This is not necessarily true.
Your compile-time classpath might differ from your run-time classpath. Did you
just want to use service account, or you actually wanted to run your app on
AppEngine (I am guessing because you used
com.google.api.client.googleapis.extensions.appengine.auth.oauth2.AppIdentityCre
dential)?
Original comment by wonder...@google.com on 29 Dec 2014 at 8:23
Original issue reported on code.google.com by
adityaz...@gmail.com
on 31 Aug 2014 at 4:27Attachments:
The text was updated successfully, but these errors were encountered: