Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BigQuery :: java.lang.NoSuchMethodError: 'java.lang.String com.google.cloud.bigquery.BigQueryOptions.getResolvedApiaryHost(java.lang.String)' #3233

Open
pramod-prabhakar-kapase-db opened this issue Apr 9, 2024 · 3 comments
Labels
api: bigquery Issues related to the googleapis/java-bigquery API.

Comments

@pramod-prabhakar-kapase-db

Thanks for stopping by to let us know something could be better!

PLEASE READ: If you have a support contract with Google, please create an issue in the support console instead of filing on GitHub. This will ensure a timely response.

Please run down the following list and make sure you've tried the usual "quick fixes":

If you are still having issues, please include as much information as possible:

Environment details

  1. Specify the API at the beginning of the title. For example, "BigQuery: ...").
    General, Core, and Other are also allowed as types
  2. OS type and version: Windows Sprint boot application
  3. Java version: 17
  4. version(s): google-cloud-bigquery:2.38.2

Steps to reproduce

  1. Create BigQuery with option
  2. ?

Code example

BigQueryOptions.Builder bigQueryOptions = BigQueryOptions.newBuilder()
                .setProjectId(projectId);

        bigQueryOptions.setRetrySettings(RetrySettings.newBuilder()
                        .setMaxAttempts(10)
                        .setRetryDelayMultiplier(1.5)
                        .setTotalTimeout(Duration.ofMinutes(5))
                        .build())
                .setTransportOptions(HttpTransportOptions.newBuilder()
                        .setConnectTimeout(300000)//5 minutes
                        .setReadTimeout(300000)//5 minutes
                        .build());

        bigQueryOptions.setProjectId(projectId);

        return bigQueryOptions.build().getService();```

#### Stack trace

HttpBigQueryRpc:
this.bigquery = (new Bigquery.Builder(transport, new GsonFactory(), initializer)).setRootUrl(options.getResolvedApiaryHost("bigquery")).setApplicationName(options.getApplicationName()).build();


getResolvedApiaryHost method not present in BigQueryOptions

#### External references such as API reference guides

- ?

#### Any additional information below


Following these steps guarantees the quickest resolution possible.

Thanks!
@product-auto-label product-auto-label bot added the api: bigquery Issues related to the googleapis/java-bigquery API. label Apr 9, 2024
@RaymondKADuncan
Copy link

RaymondKADuncan commented Apr 30, 2024

I've also run into this issue simply trying to run the following BigQuery bq = BigQueryOptions.getDefaultInstance().getService(); I checked the source code for a couple versions of the google-cloud-bigquery library and the offending class HttpBigQueryRpc.java attempts to call BigQueryOptions.getResolvedApiaryHost() on line 109 after version 2.36.0 even though the method doesn't exist. HttpBigQueryRpc.java also attempts to call the missing method BigQueryOptions.hasValidUniverseDomain() and BigQueryOptions.getUniverseDomain() in other paths of execution, but those don't appear to be causing the above issue as far as I can tell

@RYenike
Copy link

RYenike commented May 3, 2024

I also got same issue
BigQuery bigquery = BigQueryOptions.newBuilder().
setCredentials(ServiceAccountCredentials.fromStream(
new FileInputStream(System.getProperty("user.dir") + "\resources\json-files\adc.json"))).build().getService();

Any Resolution???

@RaymondKADuncan
Copy link

Until the code is updated to fix the exception you can resolve the issue by downgrading. I just downgraded to version 2.35.0 and don't have the issue anymore

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: bigquery Issues related to the googleapis/java-bigquery API.
Projects
None yet
Development

No branches or pull requests

3 participants