Skip to content

BigQuery.listJobs is throwing NPE #186

Closed
@shevek

Description

@shevek

Follow on from #17 (which still exists): listJobs is ALSO throwing NPE:

java.lang.NullPointerException: null
        at com.google.cloud.bigquery.JobStatistics.fromPb(JobStatistics.java:1183)
        at com.google.cloud.bigquery.JobInfo$BuilderImpl.<init>(JobInfo.java:154)
        at com.google.cloud.bigquery.Job.fromPb(Job.java:485)
        at com.google.cloud.bigquery.BigQueryImpl$32.apply(BigQueryImpl.java:1127)
        at com.google.cloud.bigquery.BigQueryImpl$32.apply(BigQueryImpl.java:1124)
        at com.google.common.collect.Iterators$6.transform(Iterators.java:783)
        at com.google.common.collect.TransformedIterator.next(TransformedIterator.java:47)

This is clearly dependent on the data the server is sending; in your tests you are not reproducing the server-side situation that we have; I don't know what that server side situation is, but I know it exists. In both this case and case #17, the client needs to be much more defensively programmed.

    JobConfiguration jobConfigPb = jobPb.getConfiguration(); // RETURNS NULL
    com.google.api.services.bigquery.model.JobStatistics statisticPb = jobPb.getStatistics();
    if (jobConfigPb.getLoad() != null) { // NPE

Metadata

Metadata

Assignees

Labels

api: bigqueryIssues related to the googleapis/java-bigquery API.needs more infoThis issue needs more information from the customer to proceed.priority: p2Moderately-important priority. Fix may not be included in next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions