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

1 view
Skip to first unread message

user5980143 via StackOverflow

unread,
Jan 10, 2017, 6:39:06 AM1/10/17
to google-appengin...@googlegroups.com

I am trying to upload to bigquery from my java app.

Here is my initial code:

import com.google.cloud.bigquery.*;

public class MyClass {
    public static void main(String[] args) throws Exception {
        BigQuery bigquery = BigQueryOptions.getDefaultInstance().getService();
    }

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)

How can over come this?

also does this code work the same when running locally, and on app-engine?



Please DO NOT REPLY directly to this email but go to StackOverflow:
http://stackoverflow.com/questions/41567840/nosuchmethoderror-for-com-google-cloud-bigquery-bigqueryoptions-gethttptransport

user5980143 via StackOverflow

unread,
Jan 10, 2017, 7:14:04 AM1/10/17
to google-appengin...@googlegroups.com

I am trying to upload to bigquery from my java app.

Here is my initial code:

import com.google.cloud.bigquery.*;

public class MyClass {
    public static void main(String[] args) throws Exception {
        BigQuery bigquery = BigQueryOptions.getDefaultInstance().getService();
    }

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)

How can over come this?

EDIT I am receiving this errror when running locally and also when running on appengine

btw can this code run on app-engine and locally the same?

user5980143 via StackOverflow

unread,
Jan 10, 2017, 8:24:10 AM1/10/17
to google-appengin...@googlegroups.com

used google-cloud-bigquery dependency version 0.5.1 on my pom should use:

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


Please DO NOT REPLY directly to this email but go to StackOverflow:
http://stackoverflow.com/questions/41567840/nosuchmethoderror-for-com-google-cloud-bigquery-bigqueryoptions-gethttptransport/41569888#41569888
Reply all
Reply to author
Forward
0 new messages