9 Replies Latest reply on Apr 22, 2008 10:20 AM by ericomtx

    installing and running jboss on linux -- 4957 Bus error

    ericomtx Newbie

      I've installed jboss int /opt/java dir as root

      when I run JBOSS_HOME/bin ./run.sh I et the following error in my console after a while :

      INFO [STDOUT] Warning: Could not get charToByteConverterClass!
      ./run.sh: line 181: 4957 Bus error "$JAVA" $JAVA_OPTS -Djava.endorsed.dirs="$JBOSS_ENDORSED_DIRS" -classpath "$JBOSS_CLASSPATH" org.jboss.Main "$@"

      My JBOSS_HOME environment variable is set to /opt/java/jboss-4.0.2

      My JAVA_HOME environment variable is set to /opt/java/jdk1.6.0_04




        • 1. Re: installing and running jboss on linux -- 4957 Bus error
          Peter Johnson Master

          Are you still signed in as root when you run jbossas?

          Try signing in with your normal account and put jbossas in your home directory and run it as your account and see if that works.

          Are you running a 32-bit or 64-bit Linux? If 64-bit, if the JDK 32 or 64 bit? With a persistent bus error I would suspect a faulty JDK installation. Where did your get the JDK from?

          • 2. Re: installing and running jboss on linux -- 4957 Bus error
            ericomtx Newbie

            Hi Peter,

            I running as root and tried two different versions in different dirs

            After I posted the question I saw that there is an error when starting jboss :
            run.sh: Missing file: /lib/tools.jar
            run.sh: Unexpected results may occur. Make sure JAVA_HOME points to a JDK and not a JRE.
            =========================================================================
            JBoss Bootstrap Environment

            JBOSS_HOME: /usr/local/jboss-4.0.4.GA

            JAVA: java

            JAVA_OPTS: -server -Xms128m -Xmx512m -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000 -Dprogram.name=run.sh

            CLASSPATH: /usr/local/jboss-4.0.4.GA/bin/run.jar:/lib/tools.jar

            My $JAVA_HOME is set in /etc/profile

            Here is how is /etc/profile content:

            JAVA_HOME=/opt/java/jdk1.6.0_04
            JRE_HOME=/opt/jre1.6.0_04
            M2_HOME=/opt/java/maven-2.0.7
            M2=$M2_HOME/bin
            CLASSPATH=.:$CLASSPATH
            CLASSPATH=$JAVA_HOME/lib:$CLASSPATH
            NETBEANS_HOME=/opt/java/netbeans-6.0.1
            ANT_HOME=/opt/java/apache-ant-1.7.0
            PATH=$PATH:$JAVA_HOME/bin
            JBOSS_HOME=/usr/local/jboss-4.0.4.GA
            #PATH=$PATH:$JRE_HOME/bin
            PATH=$PATH:$JBOSS_HOME
            PATH=$PATH:$M2
            PATH=$PATH:$ANT_HOME/bin
            PATH=$PATH:$NETBEANS_HOME/bin
            export JAVA_HOME M2 JRE_HOME JBOSS_HOME PATH

            I using debian etch rc2 32bits and the same error happens to jboss 4.0.2 and 4.0.4.GA
            as root

            In my /home dir it starts correctly and doesn't show the env variable missing error that happens with root

            Is it possible to set things to run as root ?

            thanks a lot for your help :) !!!


            • 3. Re: installing and running jboss on linux -- 4957 Bus error
              Frank Henry Novice

              Do you really need to be root and/or have it in that dir?

              I had once installed JBoss from the repos as well and it only gave me tons of problems.

              After I moved it to my home dir, it worked fine and never had a problem.

              So if you do not need to have it there, I'd say you've got to move it, move it. :)

              • 4. Re: installing and running jboss on linux -- 4957 Bus error
                Peter Johnson Master

                Based on this output:

                JAVA: java


                you do not have JAVA_HOME set. If it was set as you indicate, then the line would read:

                JAVA: /opt/java/jdk1.6.0_04/java


                Most likely, the .bashrc file for root is not picking up the /etc/profile. You are possibly picking up the jvm that comes with Debian, and not the Sun JVM. That jvm is not qualified to run JBossAS. To be sure, while signed in as root, run:

                java -version

                That will tell you what it running.

                I would not worry about the "missing file" error. That error message is a hold-over from ages past (couple of years ago) when the JDK was required to compile JSPs. More recent versions of Tomcat include everything necessary to compile JSPs. I have run JBossAS 4.2.x and 5.0 with just a JRE.

                And I agree with FrankTheTank, you really should not run JBossAS as root - you will open up your system to all kinds of security issues.

                • 5. Re: installing and running jboss on linux -- 4957 Bus error
                  ericomtx Newbie

                  Hi Peter

                  It is true, running java -version in gnome terminal with my user and as root I receive :
                  java version 1.4.2

                  Can I change that ? I believed that /etc/profile was responsible to set these env variables to all users ...

                  Using JBoss in my home dir It gets the /etc/profile environment variables correctly ...

                  []s

                  • 6. Re: installing and running jboss on linux -- 4957 Bus error
                    Peter Johnson Master

                    There should be more that one line for the response to java -version. Here is what I get on Fedora:

                    java version "1.5.0_14"
                    Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_14-b03)
                    Java HotSpot(TM) Client VM (build 1.5.0_14-b03, mixed mode, sharing)

                    It is the lines you did not post that are interesting.

                    I am not convinced that /etc/profile is called automatically. I know that making changes to it does not impact any new terminal windows that I open. So there are several possibilities: 1) it needs to be explicitly invoked 2) it gets read only the first time a user logs in 3) it gets read on system startup. (I just now eliminated #2 as a possibility. I'll reboot later to test #3.))

                    • 7. Re: installing and running jboss on linux -- 4957 Bus error
                      ericomtx Newbie

                      running java -version as my user in gnome terminal :

                      java -version
                      java version "1.4.2"
                      gij (GNU libgcj) version 4.1.2 20061115 (prerelease) (Debian 4.1.1-20)

                      Copyright (C) 2006 Free Software Foundation, Inc.
                      This is free software; see the source for copying conditions. There is NO
                      warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

                      • 8. Re: installing and running jboss on linux -- 4957 Bus error
                        Peter Johnson Master

                        You will not be able to run JBossAS with this JVM. You need to install the JVM from Sun.

                        • 9. Re: installing and running jboss on linux -- 4957 Bus error
                          ericomtx Newbie

                          Hi Peter

                          It´s working now
                          I made the following changes :
                          in /etc/alternatives
                          rm -f java
                          ln - /opt/java/jdk1.6.0_4/bin/java java
                          ls -l java

                          Now when I run java -version in my console it shows the correct version ...

                          Thanks for your help
                          []s
                          Érico