I'm getting the following error with HDP 2.5 client libraries for Hbase. I use them via Gradle, having a line like that:
compile group: 'org.apache.hbase', name: 'hbase-client', version: '1.1.2.2.5.0.0-1245'
Then, upon running the app, again via Gradle, I do see hbase-protocols explicitly referred in the Zookeeper client classpath, , i.e. the line I see starting with
6879 [main] INFO org.apache.zookeeper.ZooKeeper - Client environment:java.class.path=
contains, among other JARs, a reference to the Gradle cache, i.e. C:\Users\testUser\.gradle\caches\modules-2\files-2.1\org.apache.hbase\hbase-protocol\1.1.2.2.5.0.0-1245\b037b1aff481f7dfc40f918a38005a6dce72fe49\hbase-protocol-1.1.2.2.5.0.0-1245.jar
So basically org.apache.hadoop.hbase.util.ByteStringer should be found. But it is not:
13640 [main-SendThread(hadoop-dev:2181)] DEBUG org.apache.zookeeper.ClientCnxn - Reading reply sessionid:0x15853747d08002b, packet:: clientPath:null serverPath:null finished:false header:: 12,4 replyHeader:: 12,1530,0 request:: '/hbase-unsecure/meta-region-server,F response:: #ffffffff0001a726567696f6e7365727665723a3136303230ffffffff7653ffffffe44971ffffffa3ffffffcf50425546a23a1773616e64626f782e686f72746f6e776f726b732e636f6d10ffffff947d18ffffffc2ffffffaeffffff93ffffff9cffffff852b100183,s{1378,1378,1478870023688,1478870023688,0,0,0,0,76,0,1378}
14143 [main] DEBUG org.apache.hadoop.hbase.client.ConnectionManager$HConnectionImplementation - locateRegionInMeta parentTable=hbase:meta, metaLocation=, attempt=4 of 35 failed; retrying after sleep of 1005 because: java.lang.NoClassDefFoundError: Could not initialize class org.apache.hadoop.hbase.util.ByteStringer
14146 [main-SendThread(hadoop-dev:2181)] DEBUG org.apache.zookeeper.ClientCnxn - Reading reply sessionid:0x15853747d08002b, packet:: clientPath:null serverPath:null finished:false header:: 13,8 replyHeader:: 13,1530,0 request:: '/hbase-unsecure,F response:: v{'meta-region-server,'rolllog-proc,'backup-masters,'switch,'table,'draining,'region-in-transition,'table-lock,'running,'master,'namespace,'hbaseid,'online-snapshot,'replication,'splitWAL,'recovering-regions,'rs,'flush-table-proc}
As soon as I change my Gradle hbase-client reference to:
compile group: 'org.apache.hbase', name: 'hbase-client', version: '1.1.2'
i.e. the library becomes the default, non-recommended HBase libs, the problem goes away. But, of course, I do not want to use the non-recommended HBase client libraries - I had another issue that actually got resolved by using the Hortonworks libs.