NoClassDefFoundError: com/google/api/client/util/Lists在应用引擎上



我们使用以下库:

    <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)

那么我们这里缺少哪些图书馆呢?

此更改修复了它:

    <dependency>
        <groupId>com.google.http-client</groupId>
        <artifactId>google-http-client-jackson2</artifactId>
        <version>1.17.0-rc</version>
    </dependency>

相关内容

  • 没有找到相关文章

最新更新