tomcat停止服务报错

停止tomcat服务时出现错误:

./shutdown.sh
Using CATALINA_BASE:   /app/webserver/tomcat1
Using CATALINA_HOME:   /app/webserver/tomcat1
Using CATALINA_TMPDIR: /app/webserver/tomcat1/temp
Using JRE_HOME:        /usr
Using CLASSPATH:       /app/webserver/tomcat1/bin/bootstrap.jar:/app/webserver/tomcat1/bin/tomcat-juli.jar
WARNING: error instantiating 'org.apache.juli.ClassLoaderLogManager' referenced by java.util.logging.manager, class not found
java.lang.ClassNotFoundException: org.apache.juli.ClassLoaderLogManager not found
<<No stacktrace available>>
Exception in thread "main" java.lang.ClassFormatError: org.apache.catalina.startup.Bootstrap (unrecognized class file version)
at java.lang.VMClassLoader.defineClass(libgcj.so.7rh)
at java.lang.ClassLoader.defineClass(libgcj.so.7rh)
at java.security.SecureClassLoader.defineClass(libgcj.so.7rh)
at java.net.URLClassLoader.findClass(libgcj.so.7rh)
at java.lang.ClassLoader.loadClass(libgcj.so.7rh)
at java.lang.ClassLoader.loadClass(libgcj.so.7rh)
at gnu.java.lang.MainThread.run(libgcj.so.7rh)

解决办法:

export JAVA_HOME=/usr/java/jdk1.7.0_07

再次停止服务正常

./shutdown.sh
Using CATALINA_BASE:   /app/webserver/tomcat1
Using CATALINA_HOME:   /app/webserver/tomcat1
Using CATALINA_TMPDIR: /app/webserver/tomcat1/temp
Using JRE_HOME:        /usr/java/jdk1.7.0_07
Using CLASSPATH:       /app/webserver/tomcat1/bin/bootstrap.jar:/app/webserver/tomcat1/bin/tomcat-juli.jar

 

本文出自 “老徐的私房菜” 博客,谢绝转载!

你可能感兴趣的:(tomcat,报错)