1

尝试使用此处描述的“服务器到服务器授权”来授权对 Google BigQuery 的访问。我的 certificate.p12 和 ServiceAccountId 设置正确。但我经常遇到一个例外:

 com.google.api.client.json.JsonFactory.createJsonGenerator(Ljava/io/OutputStream;Ljava/nio/charset/Charset;)Lcom/google/api/client/json/JsonGenerator;
java.lang.AbstractMethodError: com.google.api.client.json.JsonFactory.createJsonGenerator(Ljava/io/OutputStream;Ljava/nio/charset/Charset;)Lcom/google/api/client/json/JsonGenerator;
at com.google.api.client.json.JsonFactory.toByteStream(JsonFactory.java:187)
at com.google.api.client.json.JsonFactory.toByteArray(JsonFactory.java:157)
at com.google.api.client.auth.jsontoken.RsaSHA256Signer.sign(RsaSHA256Signer.java:51)
at com.google.api.client.googleapis.auth.oauth2.GoogleCredential.executeRefreshToken(GoogleCredential.java:313)
at com.google.api.client.auth.oauth2.Credential.refreshToken(Credential.java:505)
at com.google.api.client.auth.oauth2.Credential.intercept(Credential.java:266)
at com.google.api.client.http.HttpRequest.execute(HttpRequest.java:888)
at com.google.api.client.googleapis.json.GoogleJsonResponseException.execute(GoogleJsonResponseException.java:181)
at com.google.api.client.googleapis.services.GoogleClient.executeUnparsed(GoogleClient.java:243)
at com.google.api.client.http.json.JsonHttpRequest.executeUnparsed(JsonHttpRequest.java:209)
at com.google.api.services.bigquery.Bigquery$Datasets$List.execute(Bigquery.java:1339)
at model.BigQuery$.addEvent(BigQuery.scala:109)


java.lang.AbstractMethodError: com.google.api.client.json.JsonFactory.createJsonGenerator(Ljava/io/OutputStream;Ljava/nio/charset/Charset;)Lcom/google/api/client/json/JsonGenerator;
at com.google.api.client.json.JsonFactory.toByteStream(JsonFactory.java:187) ~[google-http-client-1.13.1-beta.jar:1.13.1-beta]
at com.google.api.client.json.JsonFactory.toByteArray(JsonFactory.java:157) ~[google-http-client-1.13.1-beta.jar:1.13.1-beta]
at com.google.api.client.auth.jsontoken.RsaSHA256Signer.sign(RsaSHA256Signer.java:51) ~[google-oauth-client-1.13.1-beta.jar:1.13.1-beta]
at com.google.api.client.googleapis.auth.oauth2.GoogleCredential.executeRefreshToken(GoogleCredential.java:313) ~[google-api-client-1.13.2-beta.jar:1.13.2-beta]
at com.google.api.client.auth.oauth2.Credential.refreshToken(Credential.java:505) ~[google-oauth-client-1.13.1-beta.jar:1.13.1-beta]
at com.google.api.client.auth.oauth2.Credential.intercept(Credential.java:266) ~[google-oauth-client-1.13.1-beta.jar:1.13.1-beta]

有什么想法为什么会发生这种情况?

谢谢。

UPD:将谷歌库更新到 1.14.1-beta 后一切正常

4

1 回答 1

0

将谷歌库更新到 1.14.1-beta 后一切正常

于 2013-04-03T09:55:05.020 回答