[CentOS] tomcat5 - RHEL4.5 - CentOS 4.5

Thu Apr 24 09:25:23 UTC 2008
Tom Brown <tom at ng23.net>

Hi

I am seeing this issue on a RHEL4 box but i presume that the same will 
be for CentOS4.5

I am trying to get tomcat5 up and running using only upstream rpm's, as 
opposed to own rolled like i have done before, and hitting this issue.

I have JAVA_HOME set in /etc/tomcat5/tomcat5.conf and also in 
/etc/sysconfig/tomcat5.conf and when tomcat is started using the init 
script it starts up like so

tomcat   30676  0.1  1.4 1275052 60324 pts/0 Sl   08:45   0:03 
/usr/java/sun/jdk/1.4.2_13/bin/java -server -Xms256m -Xmx1024m 
-Djava.security.manager=java.rmi.RMISecurityManager 
-Dcatalina.ext.dirs=/usr/share/tomcat5/shared/lib:/usr/share/tomcat5/common/lib 
-Dcatalina.ext.dirs=/usr/share/tomcat5/shared/lib:/usr/share/tomcat5/common/lib 
-Djava.endorsed.dirs=/usr/share/tomcat5/common/endorsed -classpath 
/usr/java/sun/jdk/1.4.2_13/lib/tools.jar:/usr/share/tomcat5/bin/bootstrap.jar:/usr/share/tomcat5/bin/commons-logging-api.jar:/usr/share/java/mx4j/mx4j-impl.jar:/usr/share/java/mx4j/mx4j-jmx.jar 
-Dcatalina.base=/usr/share/tomcat5 -Dcatalina.home=/usr/share/tomcat5 
-Djava.io.tmpdir=/usr/share/tomcat5/temp 
org.apache.catalina.startup.Bootstrap start

However in the catalina.out i see this

WARNING: unable to set your JAVA_HOME. This may cause problems for any 
java applications you run
-------------------------------------------------------------------------------
I am          : tomcat on hostname
JAVA_HOME     : /usr/jdk1.3.1_08

Any ideas why this is and where that JAVA_HOME is coming from?

thanks