[ 
https://issues.apache.org/jira/browse/BEAM-14074?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17508703#comment-17508703
 ] 

Dennis Waldron commented on BEAM-14074:
---------------------------------------

[~chamikara] I had a deeper look into the code and I don't believe this has 
anything to do with changes between 2.36.0 and 2.37.0

The getDetails() call of the GoogleJsonResponseException expects to return a 
GoogleJsonError object. However, the 
[Javadocs|https://googleapis.dev/java/google-api-client/latest/com/google/api/client/googleapis/json/GoogleJsonResponseException.html#getDetails]
 state that null is a valid return value in the event the response is not 
JSON-based and the [underlying 
code|https://github.com/googleapis/google-api-java-client/blob/main/google-api-client/src/main/java/com/google/api/client/googleapis/json/GoogleJsonResponseException.java#L112-L113]
 supports this.

Additional References:
 - [https://github.com/googleapis/google-api-java-client/issues/898]

> BigQueryIO: NullPointerException in BigQueryServicesImpl
> --------------------------------------------------------
>
>                 Key: BEAM-14074
>                 URL: https://issues.apache.org/jira/browse/BEAM-14074
>             Project: Beam
>          Issue Type: Bug
>          Components: io-java-gcp
>    Affects Versions: 2.37.0
>         Environment: GCP Dataflow, Java 11
>            Reporter: Dennis Waldron
>            Assignee: Pablo Estrada
>            Priority: P2
>
> Encountered several times on Beam 2.37.0 using BigQuery Streaming Inserts:
> {noformat}
> java.lang.RuntimeException: java.lang.NullPointerException
>       at 
> org.apache.beam.sdk.io.gcp.bigquery.BigQueryServicesImpl$DatasetServiceImpl.insertAll(BigQueryServicesImpl.java:1101)
>       at 
> org.apache.beam.sdk.io.gcp.bigquery.BigQueryServicesImpl$DatasetServiceImpl.insertAll(BigQueryServicesImpl.java:1154)
>       at 
> org.apache.beam.sdk.io.gcp.bigquery.BatchedStreamingWrite.flushRows(BatchedStreamingWrite.java:374)
>       at 
> org.apache.beam.sdk.io.gcp.bigquery.BatchedStreamingWrite.access$900(BatchedStreamingWrite.java:69)
>       at 
> org.apache.beam.sdk.io.gcp.bigquery.BatchedStreamingWrite$BatchAndInsertElements.finishBundle(BatchedStreamingWrite.java:263)
> Caused by: java.lang.NullPointerException
>       at 
> org.apache.beam.sdk.io.gcp.bigquery.BigQueryServicesImpl$DatasetServiceImpl.getErrorInfo(BigQueryServicesImpl.java:1175)
>       at 
> org.apache.beam.sdk.io.gcp.bigquery.BigQueryServicesImpl$DatasetServiceImpl$InsertBatchofRowsCallable.call(BigQueryServicesImpl.java:879)
>       at 
> org.apache.beam.sdk.io.gcp.bigquery.BigQueryServicesImpl$DatasetServiceImpl$InsertBatchofRowsCallable.call(BigQueryServicesImpl.java:818)
>       at 
> org.apache.beam.sdk.io.gcp.bigquery.BigQueryServicesImpl$BoundedExecutorService$SemaphoreCallable.call(BigQueryServicesImpl.java:1697)
>       at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
>       at 
> java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
>       at 
> java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
>       at java.base/java.lang.Thread.run(Thread.java:834) {noformat}



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

Reply via email to