Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

NullPointerException on query

NullPointerException on query

New Contributor

When I execute the following query on Zeppelin (HDP 2.4)

%hive
select sentiment, count(country), country from tweetsbi group by sentiment, country having country != "null"

I get a NullPointerException

java.lang.NullPointerException
	at org.apache.zeppelin.hive.HiveInterpreter.getConnection(HiveInterpreter.java:184)
	at org.apache.zeppelin.hive.HiveInterpreter.getStatement(HiveInterpreter.java:204)
	at org.apache.zeppelin.hive.HiveInterpreter.executeSql(HiveInterpreter.java:233)
	at org.apache.zeppelin.hive.HiveInterpreter.interpret(HiveInterpreter.java:328)
	at org.apache.zeppelin.interpreter.ClassloaderInterpreter.interpret(ClassloaderInterpreter.java:57)
	at org.apache.zeppelin.interpreter.LazyOpenInterpreter.interpret(LazyOpenInterpreter.java:93)
	at org.apache.zeppelin.interpreter.remote.RemoteInterpreterServer$InterpretJob.jobRun(RemoteInterpreterServer.java:295)
	at org.apache.zeppelin.scheduler.Job.run(Job.java:171)
	at org.apache.zeppelin.scheduler.ParallelScheduler$JobRunner.run(ParallelScheduler.java:162)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
	at java.util.concurrent.FutureTask.run(FutureTask.java:262)
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:178)
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:292)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
	at java.lang.Thread.run(Thread.java:745)
1 REPLY 1
Highlighted

Re: NullPointerException on query

New Contributor

-- Edit --

Actually look here: https://community.hortonworks.com/questions/22737/zeppelin-hive-null-point-exception-hdp-24.html

replace %hive with %hive(default) - it will run fine

Don't have an account?
Coming from Hortonworks? Activate your account here