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?
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
JAVA_OPTS: -server -Xms128m -Xmx512m -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000 -Dprogram.name=run.sh
My $JAVA_HOME is set in /etc/profile
Here is how is /etc/profile content:
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
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 :) !!!
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. :)
Based on this output:
you do not have JAVA_HOME set. If it was set as you indicate, then the line would read:
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:
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.
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 ...
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.))
running java -version as my user in gnome terminal :
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.
You will not be able to run JBossAS with this JVM. You need to install the JVM from Sun.
ItÂ´s working now
I made the following changes :
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