I am trying to use the HBase Java API with Trinidad in a Rails 3.2 Application. Everything works fine when I put all jar files into Rails.root/lib/jars, which is Trinidad's preferred *.jar-folder.
When I try to separate the jar files from the project via a java.rb initializer file (in config/initializers) it won't work correctly. (With WebBrick, everything works smoothly, but we cannot use it in production.)
java.rb:
require 'java'
Dir['/var/apps/jars/*.jar'].each do |jar|
require jar
end
Trinidad starts without a problem, but as soon as a request hits a controller using the HBaseConfiguration Class the following error is thrown:
Java::JavaLang::RuntimeException (hbase-default.xml file seems to be for and old version of HBase (null), this version is 0.90.6-cdh3u4):
It seems that hbase-default.xml is bundled inside the hbase-0.90.6-cdh3u4.jar file, but cannot be found by the HBaseConfiguration Class.
Do you have ideas on how to fix this?