since hbase is not available as the osgi-ified package, I managed to create a package with the maven felix plugin (hbase 0.92 and the corresponding hadoop-core 1.0.0), and both packages run on OSGi :)
hbase-default.xml is also added to the resulting set. in the resulting osgi-jar, when I open it, the structure is as follows:
- org /
- META-INF
- HBase-default.xml
This was achieved using <Include-Resource>@${pkgArtifactId}-${pkgVersion}.jar!/hbase-default.xml</Include-Resource>
The problem arises when I really want to connect to hbase. hbase-default.xml could not be found, and therefore I cannot create a configuration file.
The hbase osgi package is used from another osgi package, which should be used to receive the hbase connection and query the database. This osgi package is used by the RCP application.
My question is: where should I put my hbase-default.xml so that it is found when the start is running? or why does he not understand that the file exists?
Thanks for any tips.
- edit
I found a decompiler so that I can see the source in which the configuration is loaded (hasoop-core, which does not provide any sources through maven), and now I see that the contextClassLoader Threads context is used (and if it is not available, the classLoader of the Configuration class itself ), so it seems to me that he cannot find the resource, but in accordance with the description he should also check his parents (but who is the parent in OSGi?)?
, OSGi, hbase, hbase-default.xml jar (. ), , contextClassLoader . , , HBaseConfiguration ( "" hadoop-, HBaseConfiguration, HBaseConfiguration , create().
, , :)