严重: Error deploying web application directory plas
java.lang.UnsupportedClassVersionError: com/powerlong/xxx/filter/SortInfoFilter : Unsupported major.minor version 51.0 (unable to load class com.powerlong.xxx.filter.SortInfoFilter)
at org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:2858)
at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:1159)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1647)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1526)
at org.apache.catalina.startup.WebAnnotationSet.loadClassAnnotation(WebAnnotationSet.java:145)
at org.apache.catalina.startup.WebAnnotationSet.loadApplicationFilterAnnotations(WebAnnotationSet.java:84)
at org.apache.catalina.startup.WebAnnotationSet.loadApplicationAnnotations(WebAnnotationSet.java:57)
at org.apache.catalina.startup.ContextConfig.applicationAnnotationsConfig(ContextConfig.java:297)
at org.apache.catalina.startup.ContextConfig.start(ContextConfig.java:1078)
at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:261)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:142)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4612)
问题解决,是因为/etc/profile,里面有设置了java_home为jdk1.6导致的,注释掉/etc/profile里面的jdk1.6,然后重启就好了,如下所示:
[root@xxx bin]# ./startup.sh
Using CATALINA_BASE: /usr/local/app/apache-tomcat-6.0.37_9090
Using CATALINA_HOME: /usr/local/app/apache-tomcat-6.0.37_9090
Using CATALINA_TMPDIR: /usr/local/app/apache-tomcat-6.0.37_9090/temp
Using JRE_HOME: /usr/local/jdk1.7.0_55/jre
Using CLASSPATH: /usr/local/app/apache-tomcat-6.0.37_9090/bin/bootstrap.jar
Using CATALINA_PID: /var/tomcat/9090.pid
Existing PID file found during start.
Removing/clearing stale PID file.
[root@xxx bin]#