Bug 1305879 - hbase shell gives an exception due to it not finding the Option class.
hbase shell gives an exception due to it not finding the Option class.
Product: Fedora
Classification: Fedora
Component: hbase (Show other bugs)
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Robert Rati
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2016-02-09 08:26 EST by Tim Wegener
Modified: 2016-07-19 14:42 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2016-07-19 14:42:42 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Tim Wegener 2016-02-09 08:26:54 EST
Description of problem:

Attempting to run 'hbase shell' gives an exception due to it not finding the options Java dependency in jruby.

Version-Release number of selected component (if applicable):


How reproducible:

Happens every time.

Steps to Reproduce:
1. Run 'hbase shell'

Actual results:

$ hbase shell
Exception in thread "main" java.lang.NoClassDefFoundError: com/headius/options/Option
	at org.jruby.util.cli.Options.string(Options.java:212)
	at org.jruby.util.cli.Options.<clinit>(Options.java:57)
	at org.jruby.util.log.LoggerFactory.<clinit>(LoggerFactory.java:35)
	at org.jruby.Main.<clinit>(Main.java:77)
Caused by: java.lang.ClassNotFoundException: com.headius.options.Option
	at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
	... 4 more

Expected results:

hbase shell should run without error.

Additional info:

Looking inside the srpm for jruby seems to show that it is trying to drag in the Option dependency:


package org.jruby.util.cli;
import com.headius.options.Option;

$ rpm -ql options

$ unzip -l /usr/share/java/options/options.jar 
Archive:  /usr/share/java/options/options.jar
  Length      Date    Time    Name
---------  ---------- -----   ----
      230  01-01-1980 00:00   META-INF/MANIFEST.MF
        0  01-01-1980 00:00   META-INF/
        0  01-01-1980 00:00   META-INF/maven/
        0  01-01-1980 00:00   META-INF/maven/com.headius/
        0  01-01-1980 00:00   META-INF/maven/com.headius/options/
      108  01-01-1980 00:00   META-INF/maven/com.headius/options/pom.properties
     1493  01-01-1980 00:00   META-INF/maven/com.headius/options/pom.xml
        0  01-01-1980 00:00   com/
        0  01-01-1980 00:00   com/headius/
        0  01-01-1980 00:00   com/headius/options/
     1577  01-01-1980 00:00   com/headius/options/BooleanOption.class
     2162  01-01-1980 00:00   com/headius/options/EnumerationOption.class
     2044  01-01-1980 00:00   com/headius/options/IntegerOption.class
     1137  01-01-1980 00:00   com/headius/options/Option$1.class
    16951  01-01-1980 00:00   com/headius/options/Option.class
     1482  01-01-1980 00:00   com/headius/options/StringOption.class
        0  01-01-1980 00:00   com/headius/options/example/
     1228  01-01-1980 00:00   com/headius/options/example/Example$AccountType.class
     1276  01-01-1980 00:00   com/headius/options/example/Example$MyCategory.class
     3491  01-01-1980 00:00   com/headius/options/example/Example.class
---------                     -------
    33179                     20 files

Adding /usr/share/java/options/options.jar to the HBASE_CLASSPATH_PREFIX didn't help, but adding it to HBASE_CLASSPATH did get a little further:

$ export HBASE_CLASSPATH=$HBASE_CLASSPATH:/usr/share/java/options/options.jar

$ hbase shell
io/console not supported; tty will not be manipulated
2016-02-09 23:47:40,779 INFO  [main] Configuration.deprecation: hadoop.native.lib is deprecated. Instead, use io.native.lib.available
HBase Shell; enter 'help<RETURN>' for list of supported commands.
Type "exit<RETURN>" to leave the HBase Shell
Version 0.98.3, rUnknown, Wed Apr 22 08:39:18 UTC 2015

NoMethodError: undefined method `close' for nil:NilClass
  initialize at /usr/share/hbase/lib/ruby/irb/hirb.rb:45
       start at /usr/share/hbase/bin/hirb.rb:178
      (root) at /usr/share/hbase/bin/hirb.rb:190

That one appears to be something else.
Comment 1 Fedora End Of Life 2016-07-19 14:42:42 EDT
Fedora 22 changed to end-of-life (EOL) status on 2016-07-19. Fedora 22 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this

Thank you for reporting this bug and we are sorry it could not be fixed.

Note You need to log in before you can comment on or make changes to this bug.