We are trying to connect to an HBase server from a WebApp deployed to WebLogic 12c.
The WebApp uses a jar file which contains the HBase client connection code. This code connects to HBase through an instance of HTablePool, which is lazy-initialized as follows when the first request for an HTable is made:
public HTableInterface getTable(String tableName) {
if (pool == null) {
logger.info("Initializing connection to HBase");
final Configuration config = HBaseConfiguration.create();
config.set("hbase.zookeeper.quorum", "<HBaseHost>");
pool = new HTablePool(config, Integer.MAX_VALUE);
logger.info("HTable pool created");
}
return = pool.getTable(tableName);
}
This code works fine when being called from JUnit (ie without deploying it to WebLogic). But onces its deployed to WL and called from the WebApp, the following exception is thrown (note that Ive replaced all specific connection details by , , etc.
INFO: Initiating client connection, connectString=:2181 sessionTimeout=180000 watcher=hconnection 14-Jun-2013 17:28:06 org.apache.zookeeper.ClientCnxn$SendThread startConnect INFO: Opening socket connection to server /:2181 13/06/14 17:28:06 INFO zookeeper.RecoverableZooKeeper: The identifier of this process is 6504@ 14-Jun-2013 17:28:06 org.apache.zookeeper.ClientCnxn$SendThread run WARNING: Session 0x0 for server null, unexpected error, closing socket connection and attempting reconnect java.lang.IllegalArgumentException: No Configuration was registered that can handle the configuration named Client at com.bea.common.security.jdkutils.JAASConfiguration.getAppConfigurationEntry(JAASConfiguration.java:130) at org.apache.zookeeper.client.ZooKeeperSaslClient.(ZooKeeperSaslClient.java:92) at org.apache.zookeeper.ClientCnxn$SendThread.startConnect(ClientCnxn.java:938) at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:973) 13/06/14 17:28:07 WARN zookeeper.RecoverableZooKeeper: Possibly transient ZooKeeper exception: org.apache.zookeeper.KeeperException$ConnectionLossExce ption: KeeperErrorCode = ConnectionLoss for /hbase/master 13/06/14 17:28:07 INFO util.RetryCounter: Sleeping 2000ms before retry #1...
It looks like maybe we are missing some additional JAAS config to allow outgoing connections from WL?
Any help would be much appreciated.