Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7912849
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T13:42:21+00:00 2026-06-03T13:42:21+00:00

I am using Big query sample code to work with big query. I am

  • 0

I am using Big query sample code to work with big query. I am getting the following error while reading dataset list using the big query api.

The code is

Bigquery bigquery = Bigquery.builder(httpTransport, jsonFactory)
        .setHttpRequestInitializer(requestInitializer)
        .setJsonHttpRequestInitializer(new JsonHttpRequestInitializer() {
          public void initialize(JsonHttpRequest request) {
            BigqueryRequest bigqueryRequest = (BigqueryRequest) request;
            bigqueryRequest.setPrettyPrint(true);
          }
        }).build();


        Datasets.List datasetRequest = bigquery.datasets().list(PROJECT_ID);
        DatasetList datasetList = datasetRequest.execute();
        if (datasetList.getDatasets() != null) {
          java.util.List datasets = datasetList.getDatasets();
          for (Object  dataset : datasets) {
            System.out.format("%s\n", ((com.google.api.services.bigquery.model.DatasetList.Datasets)dataset).getDatasetReference().getDatasetId());
          }
        }

The exception is

Exception in thread "main" com.google.api.client.googleapis.json.GoogleJsonResponseException: 401 Unauthorized
{
  "code" : 401,
  "errors" : [ {
    "domain" : "global",
    "location" : "Authorization",
    "locationType" : "header",
    "message" : "User is not a trusted tester",
    "reason" : "authError"
  } ],
  "message" : "User is not a trusted tester"
}
    at com.google.api.client.googleapis.json.GoogleJsonResponseException.from(GoogleJsonResponseException.java:159)
    at com.google.api.client.googleapis.json.GoogleJsonResponseException.execute(GoogleJsonResponseException.java:187)
    at com.google.api.client.googleapis.services.GoogleClient.executeUnparsed(GoogleClient.java:115)
    at com.google.api.client.http.json.JsonHttpRequest.executeUnparsed(JsonHttpRequest.java:112)
    at com.google.api.services.bigquery.Bigquery$Datasets$List.execute(Bigquery.java:964)
    at ShortSample.main(ShortSample.java:74

)

I don’t see this as an authentication issue as I could use the same code to connect to Google Plus account via Google plus api. I also observed that api examples are stale.

Any Suggestions to fix it.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T13:42:22+00:00Added an answer on June 3, 2026 at 1:42 pm

    I suspect you’re using an older version of the BigQuery Java client library that is based on a prerelease version of the API (v2beta1). If that’s the case, try upgrading to the latest version of the client library here:

    http://mavenrepo.google-api-java-client.googlecode.com/hg/com/google/apis/google-api-services-bigquery/v2-rev5-1.5.0-beta/

    We’ll make sure the links on the API client library page are updated, too!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I cant find why I got a java.lang.ArithmeticException: Invalid operation while using big decimal.
Problem: I am using a big C/C++ code base which works on gcc &
I'm using Postgres and would like to make a big update query that would
I am using the following piece of code to get results from DB as
I need to write a query to retrieve a big list of ids. We
i'm using a maven project with following dependency : <dependency> <groupId>com.google.api.client</groupId> <artifactId>google-api-client-googleapis-auth-clientlogin</artifactId> <version>1.2.3-alpha</version> </dependency>
The following TQL query is generated from a tool I'm using but when it's
We are developing a considerably big application using Ruby on Rails framework (CRM system)
We're developing quite a big application using ASP.NET MVC and at the beginning we
So here I am just about to start a big project using LINQ to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.