8 Replies Latest reply on May 31, 2011 10:02 AM by Peter Johnson

    Twiddle.sh failure?

    dragonix Newbie

      Hi all

      I'm new here and i already got a question about something.

      I'm trying to use this script twiddle.sh for managing a JMX-console (getting info about a server).

      Anyways, you guys probably know better what Twiddle.sh do

       

      When i execute this code, i get the following error:

      $ ./twiddle.sh -s localhost get "jboss.system:type=ServerInfo"

       

      Exception in thread "main" java.lang.NoClassDefFoundError: while resolving class: org.jboss.console.twiddle.Twiddle

         at java.lang.VMClassLoader.resolveClass(java.lang.Class) (/usr/lib/libgcj.so.5.0.0)

         at java.lang.Class.initializeClass() (/usr/lib/libgcj.so.5.0.0)

         at java.lang.Class.forName(java.lang.String, boolean, java.lang.ClassLoader) (/usr/lib/libgcj.so.5.0.0)

         at java.lang.Class.forName(java.lang.String) (/usr/lib/libgcj.so.5.0.0)

         at gnu.gcj.runtime.FirstThread.run() (/usr/lib/libgcj.so.5.0.0)

         at _Jv_ThreadRun(java.lang.Thread) (/usr/lib/libgcj.so.5.0.0)

         at _Jv_RunMain(java.lang.Class, byte const, int, byte const, boolean) (/usr/lib/libgcj.so.5.0.0)

         at __gcj_personality_v0 (/opt/jboss-5.1.0.GA/bin/java.version=1.4.2)

         at __libc_start_main (/lib/tls/libc-2.3.4.so)

         at _Jv_RegisterClasses (/opt/jboss-5.1.0.GA/bin/java.version=1.4.2)

      Caused by: java.lang.ClassNotFoundException: java.lang.StringBuilder not found in [file:/opt/jboss-5.1.0.GA/bin/twiddle.jar, file:/opt/jboss-5.1.0.GA/client/jbossall-client.jar, file:/opt/jboss-5.1.0.GA/client/getopt.jar, file:/opt/jboss-5.1.0.GA/client/log4j.jar, file:/opt/jboss-5.1.0.GA/lib/jboss-jmx.jar, file:/opt/jboss-5.1.0.GA/lib/dom4j.jar, file:/usr/share/java/libgcj-3.4.6.jar, file:./, core:/]

         at java.net.URLClassLoader.findClass(java.lang.String) (/usr/lib/libgcj.so.5.0.0)

         at gnu.gcj.runtime.VMClassLoader.findClass(java.lang.String) (/usr/lib/libgcj.so.5.0.0)

         at java.lang.ClassLoader.loadClass(java.lang.String, boolean) (/usr/lib/libgcj.so.5.0.0)

         at _Jv_FindClass(_Jv_Utf8Const, java.lang.ClassLoader) (/usr/lib/libgcj.so.5.0.0)

         at java.lang.Class.forName(java.lang.String, boolean, java.lang.ClassLoader) (/usr/lib/libgcj.so.5.0.0)

         at _Jv_BytecodeVerifier.verify_instructions_0() (/usr/lib/libgcj.so.5.0.0)

         at _Jv_VerifyMethod(_Jv_InterpMethod) (/usr/lib/libgcj.so.5.0.0)

         at _Jv_PrepareClass(java.lang.Class) (/usr/lib/libgcj.so.5.0.0)

         at _Jv_WaitForState(java.lang.Class, int) (/usr/lib/libgcj.so.5.0.0)

         at java.lang.VMClassLoader.linkClass0(java.lang.Class) (/usr/lib/libgcj.so.5.0.0)

         at java.lang.VMClassLoader.resolveClass(java.lang.Class) (/usr/lib/libgcj.so.5.0.0)

         ...9 more

      Does anyone know what the problem is?

       

      thanks in advance

       

      Brownie

        • 1. Re: Twiddle.sh failure?
          Peter Johnson Master

          >>/usr/lib/libgcj.so.5.0.0

          Looks like you are running on linux with the GNU JVM - that JVM is not supported for JBoss AS (nor for any app server for that matter). You need to install either the OpenJVM or the Sun/Oracle JVM, and then set JAVA_HOME to that JVM.

          • 2. Re: Twiddle.sh failure?
            dragonix Newbie

            Okay, so can you say how i can install that OpenJVM?

            or can you give me a website where it's being explained?

             

            Thanks in advance

            • 3. Re: Twiddle.sh failure?
              Peter Johnson Master

              What Linux distro are you using? Usually the package name is "openjdk", try using that with yum, apt-get, yacc, or whatever packaging tool is on your distro.

               

              Or you can download and install the Oracle JDK from http://www.oracle.com/technetwork/java/javase/downloads/index.html, that is what I always use.

              • 4. Re: Twiddle.sh failure?
                dragonix Newbie

                $ cat /etc/*release*

                Red Hat Enterprise Linux ES release 4 (Nahant Update 7)

                Which one of the proposed link do i need to download and install?

                • 5. Re: Twiddle.sh failure?
                  dragonix Newbie

                  now i've got this error

                  $ ./twiddle.sh -s localhost get "jboss.system:type=ServerInfo"

                  Exception in thread "main" java.lang.NoClassDefFoundError: while resolving class: org.jboss.console.twiddle.Twiddle

                     at java.lang.VMClassLoader.resolveClass(java.lang.Class) (/usr/lib/libgcj.so.5.0.0)

                     at java.lang.Class.initializeClass() (/usr/lib/libgcj.so.5.0.0)

                     at java.lang.Class.forName(java.lang.String, boolean, java.lang.ClassLoader) (/usr/lib/libgcj.so.5.0.0)

                     at java.lang.Class.forName(java.lang.String) (/usr/lib/libgcj.so.5.0.0)

                     at gnu.gcj.runtime.FirstThread.run() (/usr/lib/libgcj.so.5.0.0)

                     at _Jv_ThreadRun(java.lang.Thread) (/usr/lib/libgcj.so.5.0.0)

                     at _Jv_RunMain(java.lang.Class, byte const, int, byte const, boolean) (/usr/lib/libgcj.so.5.0.0)

                     at __gcj_personality_v0 (/opt/jboss-5.1.0.GA/bin/java.version=1.4.2)

                     at __libc_start_main (/lib/tls/libc-2.3.4.so)

                     at _Jv_RegisterClasses (/opt/jboss-5.1.0.GA/bin/java.version=1.4.2)

                  Caused by: java.lang.ClassNotFoundException: java.lang.StringBuilder not found in [file:/opt/jboss-5.1.0.GA/bin/twiddle.jar, file:/opt/jboss-5.1.0.GA/client/jbossall-client.jar, file:/opt/jboss-5.1.0.GA/client/getopt.jar, file:/opt/jboss-5.1.0.GA/client/log4j.jar, file:/opt/jboss-5.1.0.GA/lib/jboss-jmx.jar, file:/usr/share/java/libgcj-3.4.6.jar, file:./, core:/]

                     at java.net.URLClassLoader.findClass(java.lang.String) (/usr/lib/libgcj.so.5.0.0)

                     at gnu.gcj.runtime.VMClassLoader.findClass(java.lang.String) (/usr/lib/libgcj.so.5.0.0)

                     at java.lang.ClassLoader.loadClass(java.lang.String, boolean) (/usr/lib/libgcj.so.5.0.0)

                     at _Jv_FindClass(_Jv_Utf8Const, java.lang.ClassLoader) (/usr/lib/libgcj.so.5.0.0)

                     at java.lang.Class.forName(java.lang.String, boolean, java.lang.ClassLoader) (/usr/lib/libgcj.so.5.0.0)

                     at _Jv_BytecodeVerifier.verify_instructions_0() (/usr/lib/libgcj.so.5.0.0)

                     at _Jv_VerifyMethod(_Jv_InterpMethod) (/usr/lib/libgcj.so.5.0.0)

                     at _Jv_PrepareClass(java.lang.Class) (/usr/lib/libgcj.so.5.0.0)

                     at _Jv_WaitForState(java.lang.Class, int) (/usr/lib/libgcj.so.5.0.0)

                     at java.lang.VMClassLoader.linkClass0(java.lang.Class) (/usr/lib/libgcj.so.5.0.0)

                     at java.lang.VMClassLoader.resolveClass(java.lang.Class) (/usr/lib/libgcj.so.5.0.0)

                     ...9 more

                  and i succesfully installed

                  Java SE Development Kit 6 Update 25

                  http://www.oracle.com/technetwork/java/javase/downloads/jdk-6u25-download-346242.html

                  • 6. Re: Twiddle.sh failure?
                    Peter Johnson Master

                    For RHEL, use jdk-6u25-linux-i586-rpm.bin (or jdk-6u25-linux-x64-rpm.bin if your are running 64-bit).

                     

                    Based on the error (which is the same error, by the way), it appears that you did not set JAVA_HOME. If you used the *.rpm.bin, then the JDK will have been installed at /usr/java/jdk1.6.0_25, set JAVA_HOME to that. Or there is probably a /usr/java/default (I think that is the correct directory name) symlink to jdk1.6.0_25, so you might be better off setting JAVA_HOME to /usr/java/default.

                    • 7. Re: Twiddle.sh failure?
                      dragonix Newbie

                      Thanks man !!!!!!

                       

                      Can you also explain WHY i needed that JDK? because i had a java installed (normally) ?!

                      • 8. Re: Twiddle.sh failure?
                        Peter Johnson Master

                        The GNU JDK is missing a lot of features. And many of those features that are missing are things that app servers, like JBoss AS, require. So you can use the JNU JDK for simple Java apps, but not for anything reasonably complicated.