0

我们正在使用以下库:

    <dependency>
      <groupId>com.google.apis</groupId>
      <artifactId>google-api-services-bigquery</artifactId>
      <version>v2-rev114-1.17.0-rc</version>
    </dependency>

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

    <dependency>
        <groupId>com.google.apis</groupId>
        <artifactId>google-api-services-oauth2</artifactId>
        <version>v2-rev50-1.17.0-rc</version>
    </dependency>

    <dependency>
        <groupId>com.google.http-client</groupId>
        <artifactId>google-http-client-jackson2</artifactId>
        <version>1.13.1-beta</version>
    </dependency>

    <dependency>
        <groupId>com.google.api-client</groupId>
        <artifactId>google-api-client-appengine</artifactId>
        <version>1.17.0-rc</version>
    </dependency>

但是,我们收到以下错误:

java.lang.NoClassDefFoundError: com/google/api/client/util/Lists
at com.google.api.client.auth.oauth2.Credential$Builder.<init>(Credential.java:625)
at com.google.api.client.googleapis.auth.oauth2.GoogleCredential$Builder.<init>(GoogleCredential.java:356)
at com.google.api.client.googleapis.auth.oauth2.GoogleCredential.<init>(GoogleCredential.java:193)
at com.xyz.getStoredCredentials(GoogleUserCredentialManager.java:155)

java.lang.NoClassDefFoundError: com/google/api/client/json/JsonObjectParser$Builder
at com.google.api.client.googleapis.services.json.AbstractGoogleJsonClient$Builder.<init>(AbstractGoogleJsonClient.java:74)
at com.google.api.services.bigquery.Bigquery$Builder.<init>(Bigquery.java:2913)
at com.abc.doPost(BigQuery.java:138)

那么我们在这里缺少哪些库?

4

1 回答 1

2

此更改修复了它:

    <dependency>
        <groupId>com.google.http-client</groupId>
        <artifactId>google-http-client-jackson2</artifactId>
        <version>1.17.0-rc</version>
    </dependency>
于 2013-09-15T21:40:19.197 回答