Community Articles

Find and share helpful community-sourced technical articles.
Labels (2)
avatar

Connecting to HBase throws the below exceptions:

[root@hl1 hbase]# cd /usr/hdp/current/phoenix-client/bin/
[root@hl1 bin]# python sqlline.py localhost:2181:/hbase-unsecure
sun.misc.SignalHandler not found in gnu.gcj.runtime.SystemClassLoader{urls=[file:/etc/hbase/conf/,file:/usr/hdp/2.5.3.0-37/phoenix/bin/../phoenix-4.7.0.2.5.3.0-37-client.jar,file:./,file:/etc/hadoop/conf/,file:/usr/hdp/2.5.3.0-37/hadoop/conf/,file:/usr/hdp/2.5.3.0-37/hadoop-hdfs/./], parent=gnu.gcj.runtime.ExtensionClassLoader{urls=[], parent=null}}
Setting property: [incremental, false]
Setting property: [isolation, TRANSACTION_READ_COMMITTED]
issuing: !connect jdbc:phoenix:localhost:2181:/hbase-unsecure none none org.apache.phoenix.jdbc.PhoenixDriver
Connecting to jdbc:phoenix:localhost:2181:/hbase-unsecurejava.lang.ClassFormatError: org.apache.phoenix.jdbc.PhoenixDriver (unrecognized class file version)   	
at java.lang.VMClassLoader.defineClass(libgcj.so.10)   
at java.lang.ClassLoader.defineClass(libgcj.so.10)   
at java.security.SecureClassLoader.defineClass(libgcj.so.10)   
at java.net.URLClassLoader.findClass(libgcj.so.10)   
at java.lang.ClassLoader.loadClass(libgcj.so.10)   
at java.lang.ClassLoader.loadClass(libgcj.so.10)   
at java.lang.Class.forName(libgcj.so.10)   
at sqlline.DatabaseConnection.connect(DatabaseConnection.java:115)   
at sqlline.DatabaseConnection.getConnection(DatabaseConnection.java:203)   
at sqlline.Commands.connect(Commands.java:1064)   
at sqlline.Commands.connect(Commands.java:996)   
at java.lang.reflect.Method.invoke(libgcj.so.10)   
at sqlline.ReflectiveCommandHandler.execute(ReflectiveCommandHandler.java:36)   
at sqlline.SqlLine.dispatch(SqlLine.java:804)   
at sqlline.SqlLine.initArgs(SqlLine.java:588)   
at sqlline.SqlLine.begin(SqlLine.java:656)   
at sqlline.SqlLine.start(SqlLine.java:398)  
at sqlline.SqlLine.main(SqlLine.java:292)sqlline version 1.1.8java.lang.NullPointerException   
at sqlline.SqlLine.begin(SqlLine.java:680)   
at sqlline.SqlLine.start(SqlLine.java:398)   
at sqlline.SqlLine.main(SqlLine.java:292)java.lang.NullPointerException   
at sqlline.SqlLine.begin(SqlLine.java:680)   
at sqlline.SqlLine.start(SqlLine.java:398)   
at sqlline.SqlLine.main(SqlLine.java:292)java.lang.NullPointerException   
at sqlline.SqlLine.begin(SqlLine.java:680)
at sqlline.SqlLine.start(SqlLine.java:398)

ROOT CAUSE: We didn't have JAVA_HOME set. Script was referring GCJ.

SOLUTION:

export JAVA_HOME=/usr/jdk64/jdk1.8.0_77/

export HBASE_CONF_PATH=/etc/hbase/conf/

export PATH=$JAVA_HOME/bin:$PATH

1,381 Views
0 Kudos