Bug 1305879 - hbase shell gives an exception due to it not finding the Option class.
Summary: hbase shell gives an exception due to it not finding the Option class.
Keywords:
Status: CLOSED EOL
Alias: None
Product: Fedora
Classification: Fedora
Component: hbase
Version: 22
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Robert Rati
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-02-09 13:26 UTC by Tim Wegener
Modified: 2016-07-19 18:42 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-07-19 18:42:42 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Tim Wegener 2016-02-09 13:26:54 UTC
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):

jruby-1.7.19-1.fc22.noarch
hbase-0.98.3-4.fc22.noarch
options-1.2-4.fc22.noarch


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:

jruby-1.7.19/core/src/main/java/org/jruby/util/cli/Options.java

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


$ rpm -ql options
/usr/share/doc/options
/usr/share/doc/options/LICENSE-2.0.txt
/usr/share/java/options
/usr/share/java/options/options.jar
/usr/share/maven-metadata/options.xml
/usr/share/maven-poms/options/options.pom


$ 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 18:42:42 UTC
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
bug.

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.