Support Questions

Find answers, ask questions, and share your expertise

Getting "Exception in thread "main" java.lang.NullPointerException" message when using "--hiveconf hive.fetch.task.conversion=none" to start hive celi through a beeline connection

avatar
Expert Contributor

I have 2 edge nodes where I can do this, one is working properly and the other is not. I want to know what should I need to check in order to clear posted message when accessing to hive through beeline?

This is the one is not working:

beeline -n srvc_ima_platform -u 'jdbc:hive2://server:2181,server:2181,server:2181/ea_fin;serviceDiscoveryMode=zooKeeper;zooKeeperNamespace=hiveserver2;?tez.queue.name=srvc_platform' --showHeader=false --outputformat=tsv2 --hiveconf hive.fetch.task.conversion=none
Exception in thread "main" java.lang.NullPointerException
        at org.apache.hive.beeline.BeeLine.initArgs(BeeLine.java:677)
        at org.apache.hive.beeline.BeeLine.begin(BeeLine.java:777)
        at org.apache.hive.beeline.BeeLine.mainWithInputRedirection(BeeLine.java:491)
        at org.apache.hive.beeline.BeeLine.main(BeeLine.java:474)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.apache.hadoop.util.RunJar.run(RunJar.java:233)
        at org.apache.hadoop.util.RunJar.main(RunJar.java:148)


And this is he one working properly, both cli are exactly the same:

beeline -n srvc_ima_platform -u 'jdbc:hive2://server:2181,server:2181,server:2181/ea_fin;serviceDiscoveryMode=zooKeeper;zooKeeperNamespace=hiveserver2;?tez.queue.name=srvc_platform' --showHeader=false --outputformat=tsv2 --hiveconf hive.fetch.task.conversion=none
Connecting to jdbc:hive2://server:2181,server:2181,server:2181/ea_fin;serviceDiscoveryMode=zooKeeper;zooKeeperNamespace=hiveserver2;?tez.queue.name=srvc_platform
Connected to: Apache Hive (version 1.2.1000.2.6.0.24-2)
Driver: Hive JDBC (version 1.2.1000.2.6.0.3-8)
Transaction isolation: TRANSACTION_REPEATABLE_READ
Beeline version 1.2.1000.2.6.0.3-8 by Apache Hive
0: jdbc:hive2://server:2>



Regards!!

1 ACCEPTED SOLUTION

avatar
Expert Contributor

This is not an issue any more somebody ran hive on safe mode therfore beeline.properties files was created. Check below link.

It gave me the root cause, but in order to fix specifically my issue, I needed either to delete the beeline.properties file created, remove below property or comment it out within beeline.properties files located on

/home/<user_account>/.beeline/beeline.properties
beeline.hiveconfvariables={}

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

View solution in original post

1 REPLY 1

avatar
Expert Contributor

This is not an issue any more somebody ran hive on safe mode therfore beeline.properties files was created. Check below link.

It gave me the root cause, but in order to fix specifically my issue, I needed either to delete the beeline.properties file created, remove below property or comment it out within beeline.properties files located on

/home/<user_account>/.beeline/beeline.properties
beeline.hiveconfvariables={}

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