Ubuntu 12.04 Installation TOMCAT8 encountered problems

Source: Internet
Author: User
Tags apache tomcat

Problem:
:/tomcat8/bin$ sudo./configtest.sh
Using catalina_base:/home/yyb/android/tomcat8
Using Catalina_home:/home/yyb/android/tomcat8
Using Catalina_tmpdir:/home/yyb/android/tomcat8/temp
Using Jre_home:/home/yyb/android/jdk1.6.0_45/jre
Using CLASSPATH:/home/yyb/android/tomcat8/bin/bootstrap.jar:/home/yyb/android/tomcat8/bin/tomcat-juli.jar
Exception in thread "main" Java.lang.unsupportedclassversionerror:org/apache/catalina/startup/bootstrap: Unsupported Major.minor version 51.0
At Java.lang.ClassLoader.defineClass1 (Na
tive Method)
At Java.lang.ClassLoader.defineClassCond (classloader.java:631)
At Java.lang.ClassLoader.defineClass (classloader.java:615)
At Java.security.SecureClassLoader.defineClass (secureclassloader.java:141)
At Java.net.URLClassLoader.defineClass (urlclassloader.java:283)
At java.net.urlclassloader.access$000 (urlclassloader.java:58)
At Java.net.urlclassloader$1.run (urlclassloader.java:197)
At java.security.AccessController.doPrivileged (Native Method)
At Java.net.URLClassLoader.findClass (urlclassloader.java:190)
At Java.lang.ClassLoader.loadClass (classloader.java:306)
At Sun.misc.launcher$appclassloader.loadclass (launcher.java:301)
At Java.lang.ClassLoader.loadClass (classloader.java:247)
Could not find the main class:org.apache.catalina.startup.Bootstrap. Program would exit.
Configuration Error detected!


Workaround:

Because the version number of the JRE is incorrect
# OS specific support. $var _must_ is set to either true or false.
Add in front

Catalina_home=/usr/local/tomcat8
Java_home=/home/yyb/android/jdk1.7.0_55
Jre_home=/home/yyb/android/jdk1.7.0_55/jre



Test success:
[Email protected]:/usr/local/tomcat8/bin$ sudo./configtest.sh
Using catalina_base:/usr/local/tomcat8
Using Catalina_home:/usr/local/tomcat8
Using Catalina_tmpdir:/usr/local/tomcat8/temp
Using Jre_home:/home/yyb/android/jdk1.7.0_55/jre
Using CLASSPATH:/usr/local/tomcat8/bin/bootstrap.jar:/usr/local/tomcat8/bin/tomcat-juli.jar
April 27, 2014 11:48:05 am org.apache.catalina.core.AprLifecycleListener Init
Info: The APR based Apache Tomcat Native Library which allows optimal performance in production environments is not found O n the Java.library.path:/usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib
April 27, 2014 11:48:05 am org.apache.coyote.AbstractProtocol Init
Info: Initializing protocolhandler ["http-nio-8080"]
April 27, 2014 11:48:05 am org.apache.tomcat.util.net.NioSelectorPool getsharedselector
Info: Using A shared selector for servlet Write/read
April 27, 2014 11:48:05 am org.apache.coyote.AbstractProtocol Init
Info: Initializing protocolhandler ["ajp-nio-8009"]
April 27, 2014 11:48:05 am org.apache.tomcat.util.net.NioSelectorPool getsharedselector
Info: Using A shared selector for servlet Write/read
April 27, 2014 11:48:05 am Org.apache.catalina.startup.Catalina load
Info: Initialization processed in 939 MS
[Email protected]:/usr/local/tomcat8/bin$

[Email protected]:/usr/local/tomcat8/bin$ sudo./startup.sh
Using catalina_base:/usr/local/tomcat8
Using Catalina_home:/usr/local/tomcat8
Using Catalina_tmpdir:/usr/local/tomcat8/temp
Using Jre_home:/home/yyb/android/jdk1.7.0_55/jre
Using CLASSPATH:/usr/local/tomcat8/bin/bootstrap.jar:/usr/local/tomcat8/bin/tomcat-juli.jar
Tomcat started.
[Email protected]:/usr/local/tomcat8/bin$ sudo./shutdown.sh
Using catalina_base:/usr/local/tomcat8
Using Catalina_home:/usr/local/tomcat8
Using Catalina_tmpdir:/usr/local/tomcat8/temp
Using Jre_home:/home/yyb/android/jdk1.7.0_55/jre
Using CLASSPATH:/usr/local/tomcat8/bin/bootstrap.jar:/usr/local/tomcat8/bin/tomcat-juli.jar
[Email protected]:/usr/local/tomcat8/bin$

Enter http://localhost:8080 to see the following success





Tomcat Installation References

Http://www.cnlogs.com/rayz/archive/2013/05/20/3089302.html


Ubuntu 12.04 Installation TOMCAT8 encountered problems

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.