Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

com.google.api.client.json.jackson.JacksonFactory; missing in Google Drive example

I tried running the quickstart-sample, and this dependency:

<dependency>
      <groupId>com.google.apis</groupId>
      <artifactId>google-api-services-drive</artifactId>
<version>v2-rev78-1.15.0-rc</version>
</dependency>

from Drive wiki API page

Yet when I try to compile the code com.google.api.client.json.jackson.JacksonFactory; is missing.
To verify this you just need to do Step 2 & 3! Where can I find this class or how can I replace it in the sample?

like image 453
eclipse Avatar asked Jun 21 '13 09:06

eclipse


3 Answers

Jackson library can be found at http://repo2.maven.org/maven2/com/google/http-client/google-http-client-jackson/

For July 7, last version can be obtained by Maven

<dependency>
    <groupId>com.google.http-client</groupId>
    <artifactId>google-http-client-jackson</artifactId>
    <version>1.15.0-rc</version>
</dependency>

You may also need

<dependency>
    <groupId>com.google.oauth-client</groupId>
    <artifactId>google-oauth-client-java6</artifactId>
    <version>1.15.0-rc</version>
</dependency>
like image 97
Arseniy Avatar answered Nov 15 '22 19:11

Arseniy


Use this class for JacksonFactory instead of the previous one.

com.google.api.client.json.jackson2.JacksonFactory

like image 29
qgicup Avatar answered Nov 15 '22 19:11

qgicup


Since version 1.11, jackson library has been moved out to separate jar to provide developers better choice of versions of each library. Please check readme.html of zip file you downloaded from google-api-java-client and you can check which specific jar file you want to include in your project.

like image 26
JunYoung Gwak Avatar answered Nov 15 '22 17:11

JunYoung Gwak