Our project runs in karaf container. We have HBase installed in the same machine where karaf is running. When our feature (project) comes up, we connect to the HBase server via hbase-client. With Hbase 0.94.*, our feature runs without any issues.
We are trying to use latest/stable HBase version - 1.0.1. We observe the classes that belongs to single JAR is splitted into hbase-client.jar and hbase-common.jar in 1.0.1. Compilation goes fine after adding all required changes in build artifacts etc (enclosed the diff) to point to 1.0.1. After bringing up the karaf and when we install our feature, it fails with ClassNotFoundException as shown in my email below.
... 11 more
I have included both hbase-common and hbase-client as dependencies in persistence-hbase/pom.xml. Is the package org.apache.hbase.hadoop which exists in both hbase-common and hbase-client libraries is the root cause? Because when the classes from hbase-client is loaded first and class-loaders probably is disallowing the classes from hbase-common to be loaded into JVM sandbox!!
Attached the code diff and hbase-common,hbase-client’s common package sample screenshot below.
I think normally we could write our own class-loader and handle this situation. I don’t know how to solve in karaf(osgi) environment. Please shed some light.
P.S: I tried to change the dependency/feature orders in pom.xml, feature.xml and seeing no change from the above behavior.