FAQ
Strange, suddenly shell cannot use!

errors:

bin/hbase shell
ClassLoader.java:-2:in `defineClass1': java.lang.ClassFormatError: Unknown
constant tag 26 in class file
org/jruby/RubyIO$s_method_multi$RUBYINVOKER$read
from ClassLoader.java:632:in `defineClassCond'
from ClassLoader.java:616:in `defineClass'
from SecureClassLoader.java:141:in `defineClass'
from URLClassLoader.java:283:in `defineClass'
from URLClassLoader.java:58:in `access$000'
from URLClassLoader.java:197:in `run'
from AccessController.java:-2:in `doPrivileged'
from URLClassLoader.java:190:in `findClass'
from ClassLoader.java:307:in `loadClass'
from Launcher.java:301:in `loadClass'
from ClassLoader.java:296:in `loadClass'
from ClassLoader.java:248:in `loadClass'
from InvocationMethodFactory.java:1098:in `tryClass'
from InvocationMethodFactory.java:594:in `getAnnotatedMethodClass'
from InvocationMethodFactory.java:550:in `getAnnotatedMethod'
from RubyModule.java:762:in `defineAnnotatedMethod'
from TypePopulator.java:50:in `populate'
from RubyModule.java:677:in `defineAnnotatedMethodsIndividually'
from RubyModule.java:579:in `defineAnnotatedMethods'
from RubyIO.java:325:in `createIOClass'
from Ruby.java:1076:in `initCore'
from Ruby.java:954:in `bootstrap'
from Ruby.java:932:in `init'
from Ruby.java:172:in `newInstance'
from Main.java:199:in `run'
from Main.java:110:in `run'
from Main.java:94:in `main'

HBase:0.20.6
HDFS:0.20.2

--
Thanks & Best regards
jiajun

Search Discussions

  • Suraj Varma at Dec 18, 2010 at 11:18 am
    Check your JAVA_HOME settings - I suspect an older JRE is being picked up.
    HBase needs at least JRE 1.6 ...
    --Suraj
    On Sat, Dec 18, 2010 at 2:12 AM, 陈加俊 wrote:

    Strange, suddenly shell cannot use!

    errors:

    bin/hbase shell
    ClassLoader.java:-2:in `defineClass1': java.lang.ClassFormatError: Unknown
    constant tag 26 in class file
    org/jruby/RubyIO$s_method_multi$RUBYINVOKER$read
    from ClassLoader.java:632:in `defineClassCond'
    from ClassLoader.java:616:in `defineClass'
    from SecureClassLoader.java:141:in `defineClass'
    from URLClassLoader.java:283:in `defineClass'
    from URLClassLoader.java:58:in `access$000'
    from URLClassLoader.java:197:in `run'
    from AccessController.java:-2:in `doPrivileged'
    from URLClassLoader.java:190:in `findClass'
    from ClassLoader.java:307:in `loadClass'
    from Launcher.java:301:in `loadClass'
    from ClassLoader.java:296:in `loadClass'
    from ClassLoader.java:248:in `loadClass'
    from InvocationMethodFactory.java:1098:in `tryClass'
    from InvocationMethodFactory.java:594:in `getAnnotatedMethodClass'
    from InvocationMethodFactory.java:550:in `getAnnotatedMethod'
    from RubyModule.java:762:in `defineAnnotatedMethod'
    from TypePopulator.java:50:in `populate'
    from RubyModule.java:677:in `defineAnnotatedMethodsIndividually'
    from RubyModule.java:579:in `defineAnnotatedMethods'
    from RubyIO.java:325:in `createIOClass'
    from Ruby.java:1076:in `initCore'
    from Ruby.java:954:in `bootstrap'
    from Ruby.java:932:in `init'
    from Ruby.java:172:in `newInstance'
    from Main.java:199:in `run'
    from Main.java:110:in `run'
    from Main.java:94:in `main'

    HBase:0.20.6
    HDFS:0.20.2

    --
    Thanks & Best regards
    jiajun
  • 陈加俊 at Dec 19, 2010 at 6:48 am
    Hi Suraj Varam

    Thank you ! I don't think that is the reason. See below

    $ echo $JAVA_HOME
    /etc/java-config-2/current-system-vm

    $ /etc/java-config-2/current-system-vm/bin/java -version
    java version "1.6.0_20"
    Java(TM) SE Runtime Environment (build 1.6.0_20-b02)
    Java HotSpot(TM) 64-Bit Server VM (build 16.3-b01, mixed mode)

    $ java -version
    java version "1.6.0_20"
    Java(TM) SE Runtime Environment (build 1.6.0_20-b02)
    Java HotSpot(TM) 64-Bit Server VM (build 16.3-b01, mixed mode)

    $ java-config -L
    The following VMs are available for generation-2:
    1) IcedTea6-bin 1.7.2 [icedtea6-bin]
    *) Sun JDK 1.6.0.20 [sun-jdk-1.6]


    On Sat, Dec 18, 2010 at 7:17 PM, Suraj Varma wrote:

    Check your JAVA_HOME settings - I suspect an older JRE is being picked up.
    HBase needs at least JRE 1.6 ...
    --Suraj
    On Sat, Dec 18, 2010 at 2:12 AM, 陈加俊 wrote:

    Strange, suddenly shell cannot use!

    errors:

    bin/hbase shell
    ClassLoader.java:-2:in `defineClass1': java.lang.ClassFormatError: Unknown
    constant tag 26 in class file
    org/jruby/RubyIO$s_method_multi$RUBYINVOKER$read
    from ClassLoader.java:632:in `defineClassCond'
    from ClassLoader.java:616:in `defineClass'
    from SecureClassLoader.java:141:in `defineClass'
    from URLClassLoader.java:283:in `defineClass'
    from URLClassLoader.java:58:in `access$000'
    from URLClassLoader.java:197:in `run'
    from AccessController.java:-2:in `doPrivileged'
    from URLClassLoader.java:190:in `findClass'
    from ClassLoader.java:307:in `loadClass'
    from Launcher.java:301:in `loadClass'
    from ClassLoader.java:296:in `loadClass'
    from ClassLoader.java:248:in `loadClass'
    from InvocationMethodFactory.java:1098:in `tryClass'
    from InvocationMethodFactory.java:594:in `getAnnotatedMethodClass'
    from InvocationMethodFactory.java:550:in `getAnnotatedMethod'
    from RubyModule.java:762:in `defineAnnotatedMethod'
    from TypePopulator.java:50:in `populate'
    from RubyModule.java:677:in `defineAnnotatedMethodsIndividually'
    from RubyModule.java:579:in `defineAnnotatedMethods'
    from RubyIO.java:325:in `createIOClass'
    from Ruby.java:1076:in `initCore'
    from Ruby.java:954:in `bootstrap'
    from Ruby.java:932:in `init'
    from Ruby.java:172:in `newInstance'
    from Main.java:199:in `run'
    from Main.java:110:in `run'
    from Main.java:94:in `main'

    HBase:0.20.6
    HDFS:0.20.2

    --
    Thanks & Best regards
    jiajun


    --
    Thanks & Best regards
    jiajun
  • Suraj Varma at Dec 20, 2010 at 3:32 am
    Can you check if your conf/hbase-env.sh is explicitly setting the JAVA_HOME
    to the below 1.6.0_20 JRE? This overrides anything in the environment.

    ClassFormatError suggests that either an older JRE is trying to read a
    .class file compiled with a newer JRE. Or your library jar is somehow
    corrupt.

    I would say - check your hbase-env.sh and explicitly set the JAVA_HOME to
    the desired path.
    --Suraj
    On Sat, Dec 18, 2010 at 10:48 PM, 陈加俊 wrote:

    Hi Suraj Varam

    Thank you ! I don't think that is the reason. See below

    $ echo $JAVA_HOME
    /etc/java-config-2/current-system-vm

    $ /etc/java-config-2/current-system-vm/bin/java -version
    java version "1.6.0_20"
    Java(TM) SE Runtime Environment (build 1.6.0_20-b02)
    Java HotSpot(TM) 64-Bit Server VM (build 16.3-b01, mixed mode)

    $ java -version
    java version "1.6.0_20"
    Java(TM) SE Runtime Environment (build 1.6.0_20-b02)
    Java HotSpot(TM) 64-Bit Server VM (build 16.3-b01, mixed mode)

    $ java-config -L
    The following VMs are available for generation-2:
    1) IcedTea6-bin 1.7.2 [icedtea6-bin]
    *) Sun JDK 1.6.0.20 [sun-jdk-1.6]


    On Sat, Dec 18, 2010 at 7:17 PM, Suraj Varma wrote:

    Check your JAVA_HOME settings - I suspect an older JRE is being picked up.
    HBase needs at least JRE 1.6 ...
    --Suraj
    On Sat, Dec 18, 2010 at 2:12 AM, 陈加俊 wrote:

    Strange, suddenly shell cannot use!

    errors:

    bin/hbase shell
    ClassLoader.java:-2:in `defineClass1': java.lang.ClassFormatError: Unknown
    constant tag 26 in class file
    org/jruby/RubyIO$s_method_multi$RUBYINVOKER$read
    from ClassLoader.java:632:in `defineClassCond'
    from ClassLoader.java:616:in `defineClass'
    from SecureClassLoader.java:141:in `defineClass'
    from URLClassLoader.java:283:in `defineClass'
    from URLClassLoader.java:58:in `access$000'
    from URLClassLoader.java:197:in `run'
    from AccessController.java:-2:in `doPrivileged'
    from URLClassLoader.java:190:in `findClass'
    from ClassLoader.java:307:in `loadClass'
    from Launcher.java:301:in `loadClass'
    from ClassLoader.java:296:in `loadClass'
    from ClassLoader.java:248:in `loadClass'
    from InvocationMethodFactory.java:1098:in `tryClass'
    from InvocationMethodFactory.java:594:in
    `getAnnotatedMethodClass'
    from InvocationMethodFactory.java:550:in `getAnnotatedMethod'
    from RubyModule.java:762:in `defineAnnotatedMethod'
    from TypePopulator.java:50:in `populate'
    from RubyModule.java:677:in `defineAnnotatedMethodsIndividually'
    from RubyModule.java:579:in `defineAnnotatedMethods'
    from RubyIO.java:325:in `createIOClass'
    from Ruby.java:1076:in `initCore'
    from Ruby.java:954:in `bootstrap'
    from Ruby.java:932:in `init'
    from Ruby.java:172:in `newInstance'
    from Main.java:199:in `run'
    from Main.java:110:in `run'
    from Main.java:94:in `main'

    HBase:0.20.6
    HDFS:0.20.2

    --
    Thanks & Best regards
    jiajun


    --
    Thanks & Best regards
    jiajun
  • 陈加俊 at Dec 20, 2010 at 3:51 am
    Hi Suraj

    Thank you !

    hbase-env.sh is follow:

    # The java implementation to use. Java 1.6 required.
    # export JAVA_HOME=/usr/java/jdk1.6.0/
    export JAVA_HOME=/etc/java-config-2/current-system-vm


    In addition ,

    $ java-config -L
    The following VMs are available for generation-2:
    1) IcedTea6-bin 1.7.2 [icedtea6-bin]
    *) Sun JDK 1.6.0.20 [sun-jdk-1.6]

    VMs marked as Build Only may contain Security Vulnerabilities and/or be EOL.
    Gentoo recommends not setting these VMs as either your System or User VM.
    Please see http://www.gentoo.org/doc/en/java.xml#build-only for more
    information

    I guess that it worked well when I used IcedTea6,because I changed the JDK
    to Sun JDK from IcedTea6 at about 3 days ago.

    2010/12/20 Suraj Varma <svarma.ng@gmail.com>
    Can you check if your conf/hbase-env.sh is explicitly setting the JAVA_HOME
    to the below 1.6.0_20 JRE? This overrides anything in the environment.

    ClassFormatError suggests that either an older JRE is trying to read a
    .class file compiled with a newer JRE. Or your library jar is somehow
    corrupt.

    I would say - check your hbase-env.sh and explicitly set the JAVA_HOME to
    the desired path.
    --Suraj
    On Sat, Dec 18, 2010 at 10:48 PM, 陈加俊 wrote:

    Hi Suraj Varam

    Thank you ! I don't think that is the reason. See below

    $ echo $JAVA_HOME
    /etc/java-config-2/current-system-vm

    $ /etc/java-config-2/current-system-vm/bin/java -version
    java version "1.6.0_20"
    Java(TM) SE Runtime Environment (build 1.6.0_20-b02)
    Java HotSpot(TM) 64-Bit Server VM (build 16.3-b01, mixed mode)

    $ java -version
    java version "1.6.0_20"
    Java(TM) SE Runtime Environment (build 1.6.0_20-b02)
    Java HotSpot(TM) 64-Bit Server VM (build 16.3-b01, mixed mode)

    $ java-config -L
    The following VMs are available for generation-2:
    1) IcedTea6-bin 1.7.2 [icedtea6-bin]
    *) Sun JDK 1.6.0.20 [sun-jdk-1.6]


    On Sat, Dec 18, 2010 at 7:17 PM, Suraj Varma wrote:

    Check your JAVA_HOME settings - I suspect an older JRE is being picked up.
    HBase needs at least JRE 1.6 ...
    --Suraj
    On Sat, Dec 18, 2010 at 2:12 AM, 陈加俊 wrote:

    Strange, suddenly shell cannot use!

    errors:

    bin/hbase shell
    ClassLoader.java:-2:in `defineClass1': java.lang.ClassFormatError: Unknown
    constant tag 26 in class file
    org/jruby/RubyIO$s_method_multi$RUBYINVOKER$read
    from ClassLoader.java:632:in `defineClassCond'
    from ClassLoader.java:616:in `defineClass'
    from SecureClassLoader.java:141:in `defineClass'
    from URLClassLoader.java:283:in `defineClass'
    from URLClassLoader.java:58:in `access$000'
    from URLClassLoader.java:197:in `run'
    from AccessController.java:-2:in `doPrivileged'
    from URLClassLoader.java:190:in `findClass'
    from ClassLoader.java:307:in `loadClass'
    from Launcher.java:301:in `loadClass'
    from ClassLoader.java:296:in `loadClass'
    from ClassLoader.java:248:in `loadClass'
    from InvocationMethodFactory.java:1098:in `tryClass'
    from InvocationMethodFactory.java:594:in
    `getAnnotatedMethodClass'
    from InvocationMethodFactory.java:550:in `getAnnotatedMethod'
    from RubyModule.java:762:in `defineAnnotatedMethod'
    from TypePopulator.java:50:in `populate'
    from RubyModule.java:677:in
    `defineAnnotatedMethodsIndividually'
    from RubyModule.java:579:in `defineAnnotatedMethods'
    from RubyIO.java:325:in `createIOClass'
    from Ruby.java:1076:in `initCore'
    from Ruby.java:954:in `bootstrap'
    from Ruby.java:932:in `init'
    from Ruby.java:172:in `newInstance'
    from Main.java:199:in `run'
    from Main.java:110:in `run'
    from Main.java:94:in `main'

    HBase:0.20.6
    HDFS:0.20.2

    --
    Thanks & Best regards
    jiajun


    --
    Thanks & Best regards
    jiajun


    --
    Thanks & Best regards
    jiajun
  • Suraj Varma at Dec 20, 2010 at 6:13 am
    Hmm ... that is strange. I see that you are using Gentoo ... I'm not that
    familiar with Gentoo way of setting java-config etc, so hope someone else
    can suggest Gentoo specific troubleshooting of your java environment.

    Some additional things you can try are:
    1) Switch JDK back to IcedTea and see if shell works now - switch it back to
    Sun JDK and confirm it breaks.
    2) Turn on verbose:class in your jvm args to see where the jruby classes are
    being loaded from. This is to confirm that you are not picking up stray
    jruby jars from some other location on your classpath.
    3) Is this a straight hbase-0.20.6 unzipped from the tar.gz file? Or is this
    something you built from scratch?

    --Suraj
    On Sun, Dec 19, 2010 at 7:50 PM, 陈加俊 wrote:

    Hi Suraj

    Thank you !

    hbase-env.sh is follow:

    # The java implementation to use. Java 1.6 required.
    # export JAVA_HOME=/usr/java/jdk1.6.0/
    export JAVA_HOME=/etc/java-config-2/current-system-vm


    In addition ,

    $ java-config -L
    The following VMs are available for generation-2:
    1) IcedTea6-bin 1.7.2 [icedtea6-bin]
    *) Sun JDK 1.6.0.20 [sun-jdk-1.6]

    VMs marked as Build Only may contain Security Vulnerabilities and/or be
    EOL.
    Gentoo recommends not setting these VMs as either your System or User VM.
    Please see http://www.gentoo.org/doc/en/java.xml#build-only for more
    information

    I guess that it worked well when I used IcedTea6,because I changed the JDK
    to Sun JDK from IcedTea6 at about 3 days ago.

    2010/12/20 Suraj Varma <svarma.ng@gmail.com>
    Can you check if your conf/hbase-env.sh is explicitly setting the JAVA_HOME
    to the below 1.6.0_20 JRE? This overrides anything in the environment.

    ClassFormatError suggests that either an older JRE is trying to read a
    .class file compiled with a newer JRE. Or your library jar is somehow
    corrupt.

    I would say - check your hbase-env.sh and explicitly set the JAVA_HOME to
    the desired path.
    --Suraj
    On Sat, Dec 18, 2010 at 10:48 PM, 陈加俊 wrote:

    Hi Suraj Varam

    Thank you ! I don't think that is the reason. See below

    $ echo $JAVA_HOME
    /etc/java-config-2/current-system-vm

    $ /etc/java-config-2/current-system-vm/bin/java -version
    java version "1.6.0_20"
    Java(TM) SE Runtime Environment (build 1.6.0_20-b02)
    Java HotSpot(TM) 64-Bit Server VM (build 16.3-b01, mixed mode)

    $ java -version
    java version "1.6.0_20"
    Java(TM) SE Runtime Environment (build 1.6.0_20-b02)
    Java HotSpot(TM) 64-Bit Server VM (build 16.3-b01, mixed mode)

    $ java-config -L
    The following VMs are available for generation-2:
    1) IcedTea6-bin 1.7.2 [icedtea6-bin]
    *) Sun JDK 1.6.0.20 [sun-jdk-1.6]



    On Sat, Dec 18, 2010 at 7:17 PM, Suraj Varma <svarma.ng@gmail.com>
    wrote:
    Check your JAVA_HOME settings - I suspect an older JRE is being
    picked
    up.
    HBase needs at least JRE 1.6 ...
    --Suraj
    On Sat, Dec 18, 2010 at 2:12 AM, 陈加俊 wrote:

    Strange, suddenly shell cannot use!

    errors:

    bin/hbase shell
    ClassLoader.java:-2:in `defineClass1': java.lang.ClassFormatError: Unknown
    constant tag 26 in class file
    org/jruby/RubyIO$s_method_multi$RUBYINVOKER$read
    from ClassLoader.java:632:in `defineClassCond'
    from ClassLoader.java:616:in `defineClass'
    from SecureClassLoader.java:141:in `defineClass'
    from URLClassLoader.java:283:in `defineClass'
    from URLClassLoader.java:58:in `access$000'
    from URLClassLoader.java:197:in `run'
    from AccessController.java:-2:in `doPrivileged'
    from URLClassLoader.java:190:in `findClass'
    from ClassLoader.java:307:in `loadClass'
    from Launcher.java:301:in `loadClass'
    from ClassLoader.java:296:in `loadClass'
    from ClassLoader.java:248:in `loadClass'
    from InvocationMethodFactory.java:1098:in `tryClass'
    from InvocationMethodFactory.java:594:in
    `getAnnotatedMethodClass'
    from InvocationMethodFactory.java:550:in
    `getAnnotatedMethod'
    from RubyModule.java:762:in `defineAnnotatedMethod'
    from TypePopulator.java:50:in `populate'
    from RubyModule.java:677:in
    `defineAnnotatedMethodsIndividually'
    from RubyModule.java:579:in `defineAnnotatedMethods'
    from RubyIO.java:325:in `createIOClass'
    from Ruby.java:1076:in `initCore'
    from Ruby.java:954:in `bootstrap'
    from Ruby.java:932:in `init'
    from Ruby.java:172:in `newInstance'
    from Main.java:199:in `run'
    from Main.java:110:in `run'
    from Main.java:94:in `main'

    HBase:0.20.6
    HDFS:0.20.2

    --
    Thanks & Best regards
    jiajun


    --
    Thanks & Best regards
    jiajun


    --
    Thanks & Best regards
    jiajun
  • 陈加俊 at Dec 21, 2010 at 6:02 am

    1) Switch JDK back to IcedTea and see if shell works now - switch it back to
    Sun JDK and confirm it breaks.
    I switch JDK back to IcedTea and the shell dose't work.
    Turn on verbose:class in your jvm args to see where the jruby classes are
    being loaded from. This is to confirm that you are not picking up stray
    jruby jars from some other location on your classpath.
    Turn on verbose:class in my jvm args:

    ...
    [Loaded sun.reflect.ClassDefiner from /opt/sun-jdk-1.6.0.20/jre/lib/rt.jar]
    [Loaded sun.reflect.ClassDefiner$1 from
    /opt/sun-jdk-1.6.0.20/jre/lib/rt.jar]
    [Loaded sun.reflect.GeneratedConstructorAccessor1 from __JVM_DefineClass__]
    [Loaded sun.reflect.BootstrapConstructorAccessorImpl from
    /opt/sun-jdk-1.6.0.20/jre/lib/rt.jar]
    [Loaded org.jruby.RubyIO$s_method_0_3$RUBYINVOKER$select from
    file:/app/setup/cloud/hbase-0.20.6/lib/jruby-complete-1.2.0.jar]
    ClassLoader.java:-2:in `defineClass1': java.lang.ClassFormatError: Unknown
    constant tag 26 in class file
    org/jruby/RubyIO$s_method_multi$RUBYINVOKER$read
    ...
    3) Is this a straight hbase-0.20.6 unzipped from the tar.gz file? Or is this
    something you built from scratch?
    Yes, I unzipped from the tar.gz file.
    On Mon, Dec 20, 2010 at 2:13 PM, Suraj Varma wrote:

    Hmm ... that is strange. I see that you are using Gentoo ... I'm not that
    familiar with Gentoo way of setting java-config etc, so hope someone else
    can suggest Gentoo specific troubleshooting of your java environment.

    Some additional things you can try are:
    1) Switch JDK back to IcedTea and see if shell works now - switch it back
    to
    Sun JDK and confirm it breaks.
    2) Turn on verbose:class in your jvm args to see where the jruby classes
    are
    being loaded from. This is to confirm that you are not picking up stray
    jruby jars from some other location on your classpath.
    3) Is this a straight hbase-0.20.6 unzipped from the tar.gz file? Or is
    this
    something you built from scratch?

    --Suraj
    On Sun, Dec 19, 2010 at 7:50 PM, 陈加俊 wrote:

    Hi Suraj

    Thank you !

    hbase-env.sh is follow:

    # The java implementation to use. Java 1.6 required.
    # export JAVA_HOME=/usr/java/jdk1.6.0/
    export JAVA_HOME=/etc/java-config-2/current-system-vm


    In addition ,

    $ java-config -L
    The following VMs are available for generation-2:
    1) IcedTea6-bin 1.7.2 [icedtea6-bin]
    *) Sun JDK 1.6.0.20 [sun-jdk-1.6]

    VMs marked as Build Only may contain Security Vulnerabilities and/or be
    EOL.
    Gentoo recommends not setting these VMs as either your System or User VM.
    Please see http://www.gentoo.org/doc/en/java.xml#build-only for more
    information

    I guess that it worked well when I used IcedTea6,because I changed the JDK
    to Sun JDK from IcedTea6 at about 3 days ago.

    2010/12/20 Suraj Varma <svarma.ng@gmail.com>
    Can you check if your conf/hbase-env.sh is explicitly setting the JAVA_HOME
    to the below 1.6.0_20 JRE? This overrides anything in the environment.

    ClassFormatError suggests that either an older JRE is trying to read a
    .class file compiled with a newer JRE. Or your library jar is somehow
    corrupt.

    I would say - check your hbase-env.sh and explicitly set the JAVA_HOME
    to
    the desired path.
    --Suraj
    On Sat, Dec 18, 2010 at 10:48 PM, 陈加俊 wrote:

    Hi Suraj Varam

    Thank you ! I don't think that is the reason. See below

    $ echo $JAVA_HOME
    /etc/java-config-2/current-system-vm

    $ /etc/java-config-2/current-system-vm/bin/java -version
    java version "1.6.0_20"
    Java(TM) SE Runtime Environment (build 1.6.0_20-b02)
    Java HotSpot(TM) 64-Bit Server VM (build 16.3-b01, mixed mode)

    $ java -version
    java version "1.6.0_20"
    Java(TM) SE Runtime Environment (build 1.6.0_20-b02)
    Java HotSpot(TM) 64-Bit Server VM (build 16.3-b01, mixed mode)

    $ java-config -L
    The following VMs are available for generation-2:
    1) IcedTea6-bin 1.7.2 [icedtea6-bin]
    *) Sun JDK 1.6.0.20 [sun-jdk-1.6]



    On Sat, Dec 18, 2010 at 7:17 PM, Suraj Varma <svarma.ng@gmail.com>
    wrote:
    Check your JAVA_HOME settings - I suspect an older JRE is being
    picked
    up.
    HBase needs at least JRE 1.6 ...
    --Suraj
    On Sat, Dec 18, 2010 at 2:12 AM, 陈加俊 wrote:

    Strange, suddenly shell cannot use!

    errors:

    bin/hbase shell
    ClassLoader.java:-2:in `defineClass1':
    java.lang.ClassFormatError:
    Unknown
    constant tag 26 in class file
    org/jruby/RubyIO$s_method_multi$RUBYINVOKER$read
    from ClassLoader.java:632:in `defineClassCond'
    from ClassLoader.java:616:in `defineClass'
    from SecureClassLoader.java:141:in `defineClass'
    from URLClassLoader.java:283:in `defineClass'
    from URLClassLoader.java:58:in `access$000'
    from URLClassLoader.java:197:in `run'
    from AccessController.java:-2:in `doPrivileged'
    from URLClassLoader.java:190:in `findClass'
    from ClassLoader.java:307:in `loadClass'
    from Launcher.java:301:in `loadClass'
    from ClassLoader.java:296:in `loadClass'
    from ClassLoader.java:248:in `loadClass'
    from InvocationMethodFactory.java:1098:in `tryClass'
    from InvocationMethodFactory.java:594:in
    `getAnnotatedMethodClass'
    from InvocationMethodFactory.java:550:in
    `getAnnotatedMethod'
    from RubyModule.java:762:in `defineAnnotatedMethod'
    from TypePopulator.java:50:in `populate'
    from RubyModule.java:677:in
    `defineAnnotatedMethodsIndividually'
    from RubyModule.java:579:in `defineAnnotatedMethods'
    from RubyIO.java:325:in `createIOClass'
    from Ruby.java:1076:in `initCore'
    from Ruby.java:954:in `bootstrap'
    from Ruby.java:932:in `init'
    from Ruby.java:172:in `newInstance'
    from Main.java:199:in `run'
    from Main.java:110:in `run'
    from Main.java:94:in `main'

    HBase:0.20.6
    HDFS:0.20.2

    --
    Thanks & Best regards
    jiajun


    --
    Thanks & Best regards
    jiajun


    --
    Thanks & Best regards
    jiajun


    --
    Thanks & Best regards
    jiajun
  • 陈加俊 at Dec 21, 2010 at 6:40 am
    Hi Suraj

    Thank you very much !

    It is too strange that I recovered it as follws, is the jar I used before
    broken ?

    $ wget
    http://labs.renren.com/apache-mirror//hbase/stable/hbase-0.20.6.tar.gz
    $ tar -zxvf hbase-0.20.6.tar.gz
    $ cp -a hbase-0.20.6/lib/* /app/setup/cloud/hbase-0.20.6/lib/
    $ /app/cloud/hbase/bin/hbase shell
    HBase Shell; enter 'help<RETURN>' for list of supported commands.
    Version: 0.20.6, r965666, Mon Jul 19 16:54:48 PDT 2010
    hbase(main):001:0>
    hbase(main):001:0> status
    12 servers, 0 dead, 299.4167 average load
    hbase(main):002:0> status 'simple'
    12 live servers
    slave149.uc.uuwatch.com:60020 1292238605681
    requests=4, regions=300, usedHeap=1917, maxHeap=2995
    slave157.uc.uuwatch.com:60020 1292238605529
    requests=53, regions=300, usedHeap=1962, maxHeap=2991
    slave145.uc.uuwatch.com:60020 1292238653745
    requests=150, regions=299, usedHeap=2066, maxHeap=2995
    slave153.uc.uuwatch.com:60020 1292238605524
    requests=509, regions=299, usedHeap=2089, maxHeap=2991
    slave152.uc.uuwatch.com:60020 1292238605574
    requests=206, regions=299, usedHeap=1676, maxHeap=2991
    slave147.uc.uuwatch.com:60020 1292238605530
    requests=885, regions=299, usedHeap=2058, maxHeap=2995
    index.idm.uuwatch.com:60020 1292238605506
    requests=185, regions=300, usedHeap=1693, maxHeap=2991
    slave154.uc.uuwatch.com:60020 1292238605630
    requests=477, regions=299, usedHeap=2325, maxHeap=2991
    slave146.uc.uuwatch.com:60020 1292238605615
    requests=3, regions=299, usedHeap=2505, maxHeap=2995
    slave150.uc.uuwatch.com:60020 1292238605775
    requests=92, regions=300, usedHeap=2429, maxHeap=2995
    slave148.uc.uuwatch.com:60020 1292238606114
    requests=62, regions=300, usedHeap=2601, maxHeap=2995
    slave155.uc.uuwatch.com:60020 1292238605510
    requests=231, regions=299, usedHeap=2222, maxHeap=2991
    0 dead servers


    On Tue, Dec 21, 2010 at 2:01 PM, 陈加俊 wrote:

    1) Switch JDK back to IcedTea and see if shell works now - switch it back to
    Sun JDK and confirm it breaks.
    I switch JDK back to IcedTea and the shell dose't work.

    Turn on verbose:class in your jvm args to see where the jruby classes are
    being loaded from. This is to confirm that you are not picking up stray
    jruby jars from some other location on your classpath.
    Turn on verbose:class in my jvm args:

    ...
    [Loaded sun.reflect.ClassDefiner from /opt/sun-jdk-1.6.0.20/jre/lib/rt.jar]
    [Loaded sun.reflect.ClassDefiner$1 from
    /opt/sun-jdk-1.6.0.20/jre/lib/rt.jar]
    [Loaded sun.reflect.GeneratedConstructorAccessor1 from __JVM_DefineClass__]
    [Loaded sun.reflect.BootstrapConstructorAccessorImpl from
    /opt/sun-jdk-1.6.0.20/jre/lib/rt.jar]
    [Loaded org.jruby.RubyIO$s_method_0_3$RUBYINVOKER$select from
    file:/app/setup/cloud/hbase-0.20.6/lib/jruby-complete-1.2.0.jar]

    ClassLoader.java:-2:in `defineClass1': java.lang.ClassFormatError: Unknown
    constant tag 26 in class file
    org/jruby/RubyIO$s_method_multi$RUBYINVOKER$read
    ...

    3) Is this a straight hbase-0.20.6 unzipped from the tar.gz file? Or is this
    something you built from scratch?
    Yes, I unzipped from the tar.gz file.

    On Mon, Dec 20, 2010 at 2:13 PM, Suraj Varma wrote:

    Hmm ... that is strange. I see that you are using Gentoo ... I'm not that
    familiar with Gentoo way of setting java-config etc, so hope someone else
    can suggest Gentoo specific troubleshooting of your java environment.

    Some additional things you can try are:
    1) Switch JDK back to IcedTea and see if shell works now - switch it back
    to
    Sun JDK and confirm it breaks.
    2) Turn on verbose:class in your jvm args to see where the jruby classes
    are
    being loaded from. This is to confirm that you are not picking up stray
    jruby jars from some other location on your classpath.
    3) Is this a straight hbase-0.20.6 unzipped from the tar.gz file? Or is
    this
    something you built from scratch?

    --Suraj
    On Sun, Dec 19, 2010 at 7:50 PM, 陈加俊 wrote:

    Hi Suraj

    Thank you !

    hbase-env.sh is follow:

    # The java implementation to use. Java 1.6 required.
    # export JAVA_HOME=/usr/java/jdk1.6.0/
    export JAVA_HOME=/etc/java-config-2/current-system-vm


    In addition ,

    $ java-config -L
    The following VMs are available for generation-2:
    1) IcedTea6-bin 1.7.2 [icedtea6-bin]
    *) Sun JDK 1.6.0.20 [sun-jdk-1.6]

    VMs marked as Build Only may contain Security Vulnerabilities and/or be
    EOL.
    Gentoo recommends not setting these VMs as either your System or User VM.
    Please see http://www.gentoo.org/doc/en/java.xml#build-only for more
    information

    I guess that it worked well when I used IcedTea6,because I changed the JDK
    to Sun JDK from IcedTea6 at about 3 days ago.

    2010/12/20 Suraj Varma <svarma.ng@gmail.com>
    Can you check if your conf/hbase-env.sh is explicitly setting the JAVA_HOME
    to the below 1.6.0_20 JRE? This overrides anything in the environment.

    ClassFormatError suggests that either an older JRE is trying to read a
    .class file compiled with a newer JRE. Or your library jar is somehow
    corrupt.

    I would say - check your hbase-env.sh and explicitly set the JAVA_HOME
    to
    the desired path.
    --Suraj
    On Sat, Dec 18, 2010 at 10:48 PM, 陈加俊 wrote:

    Hi Suraj Varam

    Thank you ! I don't think that is the reason. See below

    $ echo $JAVA_HOME
    /etc/java-config-2/current-system-vm

    $ /etc/java-config-2/current-system-vm/bin/java -version
    java version "1.6.0_20"
    Java(TM) SE Runtime Environment (build 1.6.0_20-b02)
    Java HotSpot(TM) 64-Bit Server VM (build 16.3-b01, mixed mode)

    $ java -version
    java version "1.6.0_20"
    Java(TM) SE Runtime Environment (build 1.6.0_20-b02)
    Java HotSpot(TM) 64-Bit Server VM (build 16.3-b01, mixed mode)

    $ java-config -L
    The following VMs are available for generation-2:
    1) IcedTea6-bin 1.7.2 [icedtea6-bin]
    *) Sun JDK 1.6.0.20 [sun-jdk-1.6]



    On Sat, Dec 18, 2010 at 7:17 PM, Suraj Varma <svarma.ng@gmail.com>
    wrote:
    Check your JAVA_HOME settings - I suspect an older JRE is being
    picked
    up.
    HBase needs at least JRE 1.6 ...
    --Suraj

    On Sat, Dec 18, 2010 at 2:12 AM, 陈加俊 <cjjvictory@gmail.com>
    wrote:
    Strange, suddenly shell cannot use!

    errors:

    bin/hbase shell
    ClassLoader.java:-2:in `defineClass1':
    java.lang.ClassFormatError:
    Unknown
    constant tag 26 in class file
    org/jruby/RubyIO$s_method_multi$RUBYINVOKER$read
    from ClassLoader.java:632:in `defineClassCond'
    from ClassLoader.java:616:in `defineClass'
    from SecureClassLoader.java:141:in `defineClass'
    from URLClassLoader.java:283:in `defineClass'
    from URLClassLoader.java:58:in `access$000'
    from URLClassLoader.java:197:in `run'
    from AccessController.java:-2:in `doPrivileged'
    from URLClassLoader.java:190:in `findClass'
    from ClassLoader.java:307:in `loadClass'
    from Launcher.java:301:in `loadClass'
    from ClassLoader.java:296:in `loadClass'
    from ClassLoader.java:248:in `loadClass'
    from InvocationMethodFactory.java:1098:in `tryClass'
    from InvocationMethodFactory.java:594:in
    `getAnnotatedMethodClass'
    from InvocationMethodFactory.java:550:in
    `getAnnotatedMethod'
    from RubyModule.java:762:in `defineAnnotatedMethod'
    from TypePopulator.java:50:in `populate'
    from RubyModule.java:677:in
    `defineAnnotatedMethodsIndividually'
    from RubyModule.java:579:in `defineAnnotatedMethods'
    from RubyIO.java:325:in `createIOClass'
    from Ruby.java:1076:in `initCore'
    from Ruby.java:954:in `bootstrap'
    from Ruby.java:932:in `init'
    from Ruby.java:172:in `newInstance'
    from Main.java:199:in `run'
    from Main.java:110:in `run'
    from Main.java:94:in `main'

    HBase:0.20.6
    HDFS:0.20.2

    --
    Thanks & Best regards
    jiajun


    --
    Thanks & Best regards
    jiajun


    --
    Thanks & Best regards
    jiajun


    --
    Thanks & Best regards
    jiajun

    --
    Thanks & Best regards
    jiajun

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupuser @
categorieshbase, hadoop
postedDec 18, '10 at 10:12a
activeDec 21, '10 at 6:40a
posts8
users2
websitehbase.apache.org

2 users in discussion

陈加俊: 5 posts Suraj Varma: 3 posts

People

Translate

site design / logo © 2019 Grokbase