Closed pramod-prabhakar-kapase-db closed 2 days ago
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
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???
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
Hi @pramod-prabhakar-kapase-db , @RaymondKADuncan , @RYenike ,
I was not able to reproduce this issue. I created a new maven project and was able to create new BigQuery objects in v2.38.2 and v2.36.0 for both the provided example code and BigQuery bq = BigQueryOptions.getDefaultInstance().getService();
.
I suspect that this is caused by a dep issue.
How are you adding google-cloud-bigquery
as a dep. in your code? I.e., maven, maven without bom, Gradle, etc.
My project uses maven without the BOM. We're unable to use the BOM because we have our own parent project serving as a BOM and nesting one within another doesn't seem to be supported
Sorry for the late update, The issue is likely caused by using an older version of the dependencies: com.google.cloud » google-cloud-core com.google.cloud » google-cloud-core-http (There could be potentially more, depending on your maven configuration). Specifically, google-cloud-core and google-cloud-core-http v2.28.0 and earlier. My suggestion is to update the versions of these dependencies to match with those required by BigQuery.
The command:
mvn dependency:tree
can also give a hint to where the dependency versions are coming from.
FWIW had very similar issue, fix was excluding jackson in 3rd parties
There doesn't appear to be an actionable item here for the library, so I'm going to close this issue out. Guidance related to verifying stale dependencies is still the general resolution here.
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
Steps to reproduce
Code example
HttpBigQueryRpc: this.bigquery = (new Bigquery.Builder(transport, new GsonFactory(), initializer)).setRootUrl(options.getResolvedApiaryHost("bigquery")).setApplicationName(options.getApplicationName()).build();