java.lang.NoSuchMethodError:BigQuery java API抛出com.google.API.services.BigQuery.model.JobStatistics2.GetDddlTargetRoutine()未找到
我试图在数据流作业中运行BigQuery API,以对BigQuery执行自定义查询。我试着按照老师的指示去做。但每次我运行作业时,都会出现以下错误:java.lang.NoSuchMethodError:BigQuery java API抛出com.google.API.services.BigQuery.model.JobStatistics2.GetDddlTargetRoutine()未找到,java,google-cloud-platform,google-bigquery,google-cloud-dataflow,Java,Google Cloud Platform,Google Bigquery,Google Cloud Dataflow,我试图在数据流作业中运行BigQuery API,以对BigQuery执行自定义查询。我试着按照老师的指示去做。但每次我运行作业时,都会出现以下错误: { "@timestamp":"2019-11-20T16:12:51.008Z", "severity":"ERROR", "pid":"40364", "thread":"main", "class":"o.s.b.d.LoggingFailureAnalysisReporter", "msg":"\r\
{
"@timestamp":"2019-11-20T16:12:51.008Z",
"severity":"ERROR",
"pid":"40364",
"thread":"main",
"class":"o.s.b.d.LoggingFailureAnalysisReporter",
"msg":"\r\n\r\n
***************************\r\nAPPLICATION FAILED TO START\r\n***************************\r\n
Description:
An attempt was made to call a method that does not exist. The attempt was made from the following location:
com.google.cloud.bigquery.JobStatistics$Builder.<init>(JobStatistics.java:1066)
The following method did not exist:
com.google.api.services.bigquery.model.JobStatistics.getNumChildJobs()Ljava/lang/Long;
The method's class, com.google.api.services.bigquery.model.JobStatistics, is available from the following locations:
jar:file:/C:/Users/{user}/.m2/repository/com/google/apis/google-api-services-bigquery/v2-rev20181104-1.27.0/google-api-services-bigquery-v2-rev20181104-1.27.0.jar!/com/google/api/services/bigquery/model/JobStatistics.class
It was loaded from the following location:
file:/C:/Users/{user}/.m2/repository/com/google/apis/google-api-services-bigquery/v2-rev20181104-1.27.0/google-api-services-bigquery-v2-rev20181104-1.27.0.jar
Action:
Correct the classpath of your application so that it contains a single, compatible version of com.google.api.services.bigquery.model.JobStatistics"
}
从最初的帖子中,我了解到您希望从BigQuery请求数据,将其用作数据流管道上的输入
不使用BigQuery API,我建议您使用来自Apache Beam的,特别是原始帖子中的。,我理解您希望从BigQuery请求数据,将其用作数据流管道上的输入
我建议您不要使用BigQuery API,而是使用来自Apache Beam的,特别是。我也有同样的问题。 升级到
1.116.0
google cloud bigquery后得到解决
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-bigquery</artifactId>
<version>1.116.0</version>
</dependency>
com.google.cloud
谷歌云大查询
1.116.0
我也有同样的问题。
升级googlecloudbigQuery
到1.116.0
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-bigquery</artifactId>
<version>1.116.0</version>
</dependency>
com.google.cloud
谷歌云大查询
1.116.0
如果同一依赖项有多个版本,有时会发生这种情况。从.m2
文件夹中删除所有版本,然后重新安装依赖项(mvn clean install
)。能否提供有关管道和项目依赖项的详细信息?如果同一依赖项有多个版本,有时会发生这种情况。从.m2
文件夹中删除所有版本,然后重新安装依赖项(mvn clean install
)。能否提供有关管道和项目依赖项的更多信息?