apache / apache/beam

Null pointer exception when creating a template

Open
#18,363 0 comments 0 reactions 0 assignees View on GitHub
bug dataflow P3 runners
Dominant language
Java
Stars
8.7k
Forks
4.7k
Avg merge
1d 20h
Merged PRs (30d)
196

Description

The template is successfully created, but is then followed by a null pointer exception.

Command:
mvn compile exec:java -Dexec.mainClass=com.example.WordCount -Dexec.args="\--runner=DataflowRunner \
\--project=my-project \
\--stagingLocation=gs://my-bucket/staging \
\--output=gs://my-bucket/output/outputfile \
\--templateLocation=gs://my-bucket/templates/mytemplate"

INFO: Template successfully created.
[WARNING]
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.codehaus.mojo.exec.ExecJavaMojo$1.run(ExecJavaMojo.java:293)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.NullPointerException
at org.apache.beam.runners.dataflow.DataflowPipelineJob.getJobWithRetries(DataflowPipelineJob.java:489)
at org.apache.beam.runners.dataflow.DataflowPipelineJob.getStateWithRetries(DataflowPipelineJob.java:465)
at org.apache.beam.runners.dataflow.DataflowPipelineJob.waitUntilFinish(DataflowPipelineJob.java:304)
at org.apache.beam.runners.dataflow.DataflowPipelineJob.waitUntilFinish(DataflowPipelineJob.java:240)
at org.apache.beam.runners.dataflow.DataflowPipelineJob.waitUntilFinish(DataflowPipelineJob.java:193)
at org.apache.beam.runners.dataflow.DataflowPipelineJob.waitUntilFinish(DataflowPipelineJob.java:186)
at com.example.WordCount.main(WordCount.java:184)
... 6 more

Imported from Jira [BEAM-2400](https://issues.apache.org/jira/browse/BEAM-2400). Original Jira may contain additional context.
Reported by: melap.

Contributor guide

Open the contributing guide

Research direction

Reproduce the issue with the supplied mvn compile exec:java command and inspect DataflowPipelineJob.java at getJobWithRetries (line 489), along with the waitUntilFinish calls in the stack trace. Trace the template-creation path from com.example.WordCount.main at WordCount.java:184 and determine why waiting after successful template creation reaches a null value; done means the command no longer throws this exception.

Written by the indexing model from the issue text.

Assessment

Tech stack
google-cloud, java
Domain
cloud, distributed-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.