我使用 Tomcat 6 开发了一个 Tomcat 应用程序进行测试。我现在已经将它部署到 Tomcat 5.5 - 当我调用 servlet 时,我得到一个对我来说没有多大意义的错误。有谁知道是什么导致了这个错误。
例外
javax.servlet.ServletException:分配 servlet 实例时出错 org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117) org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174) org.apache .coyote.http11.Http11Processor.process(Http11Processor.java:874) org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665) org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint .java:528) org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81) org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689) java.lang .Thread.run(Thread.java:595) 根本原因
java.lang.UnsupportedClassVersionError: .class 文件中的错误版本号 java.lang.ClassLoader.defineClass1(Native Method) java.lang.ClassLoader.defineClass(ClassLoader.java:620) java.security.SecureClassLoader.defineClass(SecureClassLoader.java: 124) org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:1853) org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:875) org.apache.catalina.loader.WebappClassLoader.loadClass( WebappClassLoader.java:1330) org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1209) java.security.AccessController.doPrivileged(Native Method) org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java :117) org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174) 组织。apache.coyote.http11.Http11Processor.process(Http11Processor.java:874) org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665) org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket( PoolTcpEndpoint.java:528) org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81) org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689) java。 lang.Thread.run(Thread.java:595)runIt(LeaderFollowerWorkerThread.java:81) org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689) java.lang.Thread.run(Thread.java:595)runIt(LeaderFollowerWorkerThread.java:81) org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689) java.lang.Thread.run(Thread.java:595)