Skip to content

NoSuchMethodError for com.google.cloud.bigquery.BigQueryOptions.getHttpTransportFactory #1521

Description

@DinaWork

I am trying to upload to bigquery from my java app running on app-engine.

the dependecy in my pom:

<dependency>
    <groupId>com.google.cloud</groupId>
    <artifactId>google-cloud-bigquery</artifactId>
    <version>0.8.0-beta</version>
</dependency>

Here is my initial code:

import com.google.cloud.bigquery.*;

public class MyClass {
	public static myFuction() throws Exception {
		BigQuery bigquery = BigQueryOptions.getDefaultInstance().getService();
    }

when I run this locally I succed, but when running on app-engine
I am receiving a NoSuchMethodError error:

Exception in thread "main" java.lang.NoSuchMethodError: com.google.cloud.bigquery.BigQueryOptions.getHttpTransportFactory()Lcom/google/cloud/HttpServiceOptions$HttpTransportFactory;
	at com.google.cloud.bigquery.spi.DefaultBigQueryRpc.<init>(DefaultBigQueryRpc.java:83)
	at com.google.cloud.bigquery.BigQueryOptions$DefaultBigQueryRpcFactory.create(BigQueryOptions.java:49)
	at com.google.cloud.bigquery.BigQueryOptions$DefaultBigQueryRpcFactory.create(BigQueryOptions.java:43)
	at com.google.cloud.ServiceOptions.getRpc(ServiceOptions.java:482)
	at com.google.cloud.bigquery.BigQueryImpl.<init>(BigQueryImpl.java:184)
	at com.google.cloud.bigquery.BigQueryOptions$DefaultBigqueryFactory.create(BigQueryOptions.java:39)
	at com.google.cloud.bigquery.BigQueryOptions$DefaultBigqueryFactory.create(BigQueryOptions.java:33)
	at com.google.cloud.ServiceOptions.getService(ServiceOptions.java:469)
	at com.google.cloud.ServiceOptions.service(ServiceOptions.java:463)

I also tried using just

	  <dependency>
                  <groupId>com.google.cloud</groupId>
                  <artifactId>google-cloud</artifactId>
                  <version>0.8.0</version>
        </dependency>  

but it still didn't work

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions