>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 <[email protected]> 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, 陈加俊 <[email protected]> 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 <[email protected]> > > > > > 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, 陈加俊 <[email protected]> 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 <[email protected]> > > > 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, 陈加俊 <[email protected]> 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
