Skip to content

Instantly share code, notes, and snippets.

@oviniciusfeitosa
Created September 13, 2016 17:49
Show Gist options
  • Save oviniciusfeitosa/78ea8878acd4386ed6e173cc0840f759 to your computer and use it in GitHub Desktop.
Save oviniciusfeitosa/78ea8878acd4386ed6e173cc0840f759 to your computer and use it in GitHub Desktop.
[ JAVA ] Google Oauth2 - java.lang.NoClassDefFoundError
When occurs this error below, use the next steps:
Exception in thread "main" java.lang.NoClassDefFoundError: com/google/appengine/api/urlfetch/HTTPMethod
at com.google.api.client.extensions.appengine.http.UrlFetchTransport.buildRequest(UrlFetchTransport.java:125)
You need to replace this dependency:
<dependency>
<groupId>com.google.api-client</groupId>
<artifactId>google-api-client-servlet</artifactId>
<version>1.20</version>
</dependency>
For that:
<dependency>
<groupId>com.google.api-client</groupId>
<artifactId>google-api-client-appengine</artifactId>
<version>1.20</version>
</dependency>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment