Testing java HBase connection
In addition to the configuration parameters suggested by Yosr, specifying
conf.set("zookeeper.znode.parent", "VALUE")
would help resolve the issue.
The property below resolved my issue
For Hortonworks: hconfig.set("zookeeper.znode.parent", "/hbase-unsecure")
For cloudera: hconfig.set("zookeeper.znode.parent", "/hbase")