Skip to content

Instantly share code, notes, and snippets.

@bradheintz
Created February 17, 2009 02:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bradheintz/65549 to your computer and use it in GitHub Desktop.
Save bradheintz/65549 to your computer and use it in GitHub Desktop.
#!/usr/bin/env jruby
require 'java'
require '/Users/bradheintz/project/hadoop/current/lib/commons-logging-1.0.4.jar'
import org.apache.commons.logging.LogFactory
require '/Users/bradheintz/project/hadoop/current/hadoop-0.18.1-core.jar'
import org.apache.hadoop.io.IntWritable
import 'org.apache.hadoop.io.Text'
# => (eval):1:in `include_class': cannot initialize Java class org.apache.hadoop.io.Text (NameError)
# NOTES:
# - I've verified that the Text class is in the same pkg as IntWritable.
# - I get no error when I comment out the Text line - the IntWritable import is working.
# - I get a different error when I take the quotes of the org.apache.hadoop.io.Text import:
# => /Users/bradheintz/local/jruby-1.1.6/lib/ruby/site_ruby/1.8/builtin/javasupport/core_ext/object.rb:33:in
# `get_proxy_or_package_under_package': cannot initialize Java class org.apache.hadoop.io.Text (NameError)
# from /Users/bradheintz/local/jruby-1.1.6/lib/ruby/site_ruby/1.8/builtin/javasupport/java.rb:43:in `method_missing'
# from ./foo.rb:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment