0

I have followed this tutorial (http://www.mulesoft.com/tomcat-linux#.URj9weCy1Nh) to install tomcat on debian wheezy using the following environment variables:

Using CATALINA_BASE:   /usr/local/apache-tomcat-7.0.35
Using CATALINA_HOME:   /usr/local/apache-tomcat-7.0.35
Using CATALINA_TMPDIR: /usr/local/apache-tomcat-7.0.35/temp
Using JRE_HOME:        /usr/lib/jvm/java-6-openjdk-amd64/jre
Using CLASSPATH:       /usr/local/apache-tomcat-7.0.35/bin/bootstrap.jar:/usr/local/apache-   tomcat-7.0.35/bin/tomcat-juli.jar

I have given the tomcat user a bash login and when I run ./startup.sh nothing happens and no port opens. Running version.sh gives me:

 Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/catalina/util/ServerInfo
 Caused by: java.lang.ClassNotFoundException: org.apache.catalina.util.ServerInfo
    at java.net.URLClassLoader$1.run(URLClassLoader.java:217)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
at java.lang.ClassLoader.loadClass(ClassLoader.java:321)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
at java.lang.ClassLoader.loadClass(ClassLoader.java:266)

Could not find the main class: org.apache.catalina.util.ServerInfo. Program will exit.

Any ideas what is missing ?

user1845360
  • 847
  • 2
  • 12
  • 29

1 Answers1

2
  • Install complete, Compatible JDK from Oracle (SUN) or IBM
  • Set your JAVA_HOME environment variable to the root directory of the compatible JDK

$JAVA_HOME=/usr/java/jdk1.6.0_01

$ export JAVA_HOME

  • Put the compatibale JDK's bin directory on the front of your PATH environment variable.

$ PATH=$JAVA_HOME/bin:$PATH

$ export PATH

  • Find the java executable of the incompatible JDK, usually /usr/bin/java and move it out of the way, like this:

$cd /usr/java

$mv java java.moved

  • Then, check to make sure your java executable points to the JDK you have installed:

$ which java

/usr/java/jdk1.6.0_01/bin/java

Community
  • 1
  • 1
Satish
  • 16,544
  • 29
  • 93
  • 149