Jul 25, 2012
10
0
1
Planet Earth
cPanel Access Level
Root Administrator
Hello,

I am having Cpanel Linux Server. In which java is successfuly installed but TOMCAT7 isn't working.

Steps I followed :-

I installed java7 in /opt/jvm

[email protected] [~]# java -version
java version “1.7.0-ea”
Java(TM) SE Runtime Environment (build 1.7.0-ea-b125)
Java HotSpot(TM) 64-Bit Server VM (build 20.0-b06, mixed mode)


then I tried installing TOMCAT in /usr/local/apache/apache-tomcat-7.0.33-src/

It starts well But when in run ./catalina.sh or ./configtest it gives below error :-


[email protected] [/usr/local/apache/apache-tomcat-7.0.33-src/bin]# ./configtest.sh
Using CATALINA_BASE: /usr/local/apache/apache-tomcat-7.0.33-src
Using CATALINA_HOME: /usr/local/apache/apache-tomcat-7.0.33-src
Using CATALINA_TMPDIR: /usr/local/apache/apache-tomcat-7.0.33-src/temp
Using JRE_HOME: /opt/jvm/jdk1.7.0/jre
Using CLASSPATH: /usr/local/apache/apache-tomcat-7.0.33-src/bin/bootstrap.jar:/usr/local/apache/apache-tomcat-7.0.33-src/bin/tomcat-juli.jar
Error: Could not find main class org.apache.catalina.startup.Bootstrap
Exception in thread "main" java.lang.NoClassDefFoundError: org.apache.catalina.startup.Bootstrap
at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:395)
Caused by: java.lang.ClassNotFoundException: org.apache.catalina.startup.Bootstrap
at java.net.URLClassLoader$1.run(URLClassLoader.java:299)
at java.net.URLClassLoader$1.run(URLClassLoader.java:288)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:287)
at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:327)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:392)
Configuration error detected!


Below are the things I added in /etc/profiles :-

PATH=/opt/jvm/jdk1.7.0/bin:
export PATH
export CLASSPATH=/opt/jvm/jdk1.7.0/lib/

if [ -d /opt/jvm/jdk1.7.0 ] ; then
export JAVA_HOME=/opt/jvm/jdk1.7.0/bin
fi

if [ -d /opt/jvm/jdk1.7.0/jre ] ; then
export JAVA_HOME=/opt/jvm/jdk1.7.0/jre
fi


#TOMCAT
if [ -d /usr/local/apache/apache-tomcat-7.0.33-src ] ; then
export CATALINA_HOME=/usr/local/apache/apache-tomcat-7.0.33-src
fi


Please let me know , what I am donig wrong? Or what need to be set ?
your help will be appreciated...