Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8101087
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T22:54:03+00:00 2026-06-05T22:54:03+00:00

I am trying to use the HBase Java API with Trinidad in a Rails

  • 0

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?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T22:54:04+00:00Added an answer on June 5, 2026 at 10:54 pm

    this probably won’t be the “correct” answer but you can customize Trinidad’s jars path to point to /var/apps/jars for your application (using the command line or with the trinidad.yml config)

    than adjust the initializer so when it runs within a java web-server it does not load the jars (Webrick is a ruby web-server that happen to run fine with JRuby as it’s writen in pure Ruby) e.g. :

    Dir['/var/apps/jars/*.jar'].each do |jar|
      require jar
    end unless defined?($servlet_context)
    

    as for the issue you’re having it’s most likely hbase.jar and/or hadoop.jar specific (class-loaders will look different in a simple jruby application and a jruby servlet application), it’s hard to tell without some more info such as a stack trace, jar versions and most importantly some understanding of hadoop’s configuration / resource loading.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to connect to an HBase node from a Java application. HBaseConfiguration
I am trying use a Java Uploader in a ROR app (for its ease
I'm trying use Lift and CalendarMonthView widget to build a appointment system. CalendarMonthView works
I have been trying use the edit_post_link() function to contain an image. All of
Trying to use this sql statement. The first 2 parts work fine, I am
I am new to hbase trying to make it work with java . i
I am pretty naive to hbase and JDO. I was trying to use Query
Yesterday I noticed problem with my application. Everything was fine, but now something is
Trying to use Java's regexp I want to match /app, /app/.* , but not
I am trying use neo4j with Ruby on rails on Mac OSX. I have

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.