尝试使用“{3}}描述的”服务器到服务器授权“来授权访问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:更新google libs到1.14.1-beta之后一切正常
答案 0 :(得分:0)
更新google libs到1.14.1-beta后一切正常