Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

SelectHiveQL Fails on java.lang.NullPointerException

avatar
Explorer

7763-part1.png

Hi, this is my configuration for a SelectHiveQL processor in Nifi , my database connection url is :

jdbc:hive2:/************:2181/;serviceDiscoveryMode=zooKeeper;zooKeeperNamespace=hiveserver2

And i have this error :

7764-part2.png

I tried to change output format but nothing changes,

Somebody can help me ?

1 ACCEPTED SOLUTION

avatar
Master Guru

This is a known issue with the version of Hive (1.2.1) currently packaged with NiFi:

https://issues.apache.org/jira/browse/NIFI-2575

caused by:

https://issues.apache.org/jira/browse/HIVE-11581

The workaround is to not use Zookeeper for the service discovery.

View solution in original post

8 REPLIES 8

avatar
Master Guru

Can you look in nifi-home/logs/nifi-app.log to see if there is a stacktrace that goes with that error?

avatar
Explorer

There is nothing in the nifi-app.log that goes with this error, only this java Exception : @Bryan Bende

7765-part3.png

avatar
Master Guru

this is probably bad SQL returning NULL killing Java. Test that query from CLI or try another query. Is there data in that table? does that query return any values?

avatar
Master Guru

does the query run in beeline or ambari hive view or zeppelin?

is there data in the table?

It seems like CAST on null may be an issue.

does the user used by NiFi to access Hive have permissions to that table?

is your Hive connection pool in NiFi setup and working?

avatar
Explorer

Does not metter my query, even a "Select *" i have the same issue. I will check for the permissions.

How i could check if my Hive connection pool is working ? (i have no logs about this or error message)

avatar
Master Guru

Under Process Group Configuration

look for a triangle next to HiveConnectionPool. if you enabled it and there's no warning, you are good. also check the bulletin board for error message or ..nifi/log/ log files.

avatar
Master Guru

This is a known issue with the version of Hive (1.2.1) currently packaged with NiFi:

https://issues.apache.org/jira/browse/NIFI-2575

caused by:

https://issues.apache.org/jira/browse/HIVE-11581

The workaround is to not use Zookeeper for the service discovery.

avatar
New Contributor

How do you not use Zookeeper for service discovery. Please give me step by step instructions if possible. Tried all recommended methods online with no luck. Thank you.