I get *NoClassDefFoundError* when trying to use a class like 
com/google/api/client/googleapis/auth/oauth2/GoogleClientSecrets.  I'm 
trying to use the Java  Google Drive library in my GAE servlet.    I tested 
the code in a standalone java app and with works.  The java code compiles 
without complaint in Eclipse  But when I try to run the servlet in the 
'localhost' server in Eclipse, I get the NoClassDefFoundError.  
GoogleClientSecrets (just a convenient, arbitrary class to test on) is in *
com.google.api.client.googleapis.auth.oauth2* in C:\app\gDrive\libs\*
google-api-client-1.16.0-rc.jar* on my system.  It appears in the 
'Referenced Libraries for the project.  Its in the Java Build Path as an 
external jar, (The jar is 'check' marked in the Order and Export tab of 
Eclipse Java Build Path dialog -- I think that means include this jar in 
the WAR file for the server.

The fact that Eclipse doesn't see an error when I refer to 
GoogleClientSecrets means to me that the Build Path has the class in it.  
There must be something I don't understand about the class loader 
environment for the 'localhost' 'server', or for the class loader for the 
servlet -- that is not finding the google-api-client-1.16.0-rc.jar.  (The 
server starts fine, but when the servlet loads (when the first HTTP request 
is handled) I get the NoClassDefFoundError.

*Are there any restrictions about classes or jars that GAE loads?  Is there 
something different about the way the server/servlet class loader works?*

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/google-appengine.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to