javax.servlet.ServletException:分配servlet实例时出错 org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118) org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160) org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799) org.apache.coyote.http11.Http11Protocol $ Http11ConnectionHandler.processConnection(Http11Protocol.java:705) org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577) org.apache.tomcat.util.threads.ThreadPool $ ControlRunnable.run(ThreadPool.java:683) java.lang.Thread.run(Thread.java:534)
根本原因
java.lang.UnsupportedClassVersionError:Catalog1(不支持的major.minor版本49.0) java.lang.ClassLoader.defineClass0(本机方法) 需要java.lang.ClassLoader.defineClass(ClassLoader.java:537) java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123) org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:1634) org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:860) org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1307) org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1189) org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118) org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160) org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799) org.apache.coyote.http11.Http11Protocol $ Http11ConnectionHandler.processConnection(Http11Protocol.java:705) org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577) org.apache.tomcat.util.threads.ThreadPool $ ControlRunnable.run(ThreadPool.java:683) java.lang.Thread.run(Thread.java:534)
注意Apache Tomcat / 5.0.28日志中提供了根本原因的完整堆栈跟踪。
答案 0 :(得分:3)
行Unsupported major.minor version 49.0
给出了使用java 6编译器编译代码的提示,但是使用java 5来运行tomcat。