You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@spark.apache.org by Mina Aslani <as...@gmail.com> on 2017/02/27 04:00:43 UTC

Getting unrecoverable exception: java.lang.NullPointerException when trying to find wordcount in kafka topic

Hi,

I am trying to submit a job to spark to count number of words in a specific
kafka topic but I get below exception when I check the log:

..... failed with unrecoverable exception: java.lang.NullPointerException


The command that I run follows:

./scripts/dm-spark-submit.sh  --class
org.apache.spark.examples.streaming.DirectKafkaWordCount zookeeper:2181
 my-topic --executor-memory 1G --total-executor-cores 2
/spark-apps/spark-examples-SNAPSHOT.jar

Please note that my spark, kafka, zookeeper are running in different
containers named, spark,kafka,zookeeper.

I tried the wordCount in java streaming as well, same error exists!

Any idea about cause of the error?



Kindest regards,
Mina