Tomcat 提示 HTTP Status 500 – Internal Server ErrorTomcat 提示 HTTP Status 500 – Internal Server Error(示
Posted yeungyu
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Tomcat 提示 HTTP Status 500 – Internal Server ErrorTomcat 提示 HTTP Status 500 – Internal Server Error(示相关的知识,希望对你有一定的参考价值。
错误信息:
1 HTTP Status 500 – Internal Server Error 2 Type Exception Report 3 4 Message Error instantiating servlet class [Servlet.BeerSelect] 5 6 Description The server encountered an unexpected condition that prevented it from fulfilling the request. 7 8 Exception 9 10 javax.servlet.ServletException: Error instantiating servlet class [Servlet.BeerSelect] 11 org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:490) 12 org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92) 13 org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:668) 14 org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343) 15 org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:408) 16 org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66) 17 org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:791) 18 org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1417) 19 org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) 20 java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) 21 java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) 22 org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) 23 java.lang.Thread.run(Unknown Source) 24 Root Cause 25 26 java.lang.UnsupportedClassVersionError: Servlet/BeerSelect has been compiled by a more recent version of the Java Runtime (class file version 54.0), this version of the Java Runtime only recognizes class file versions up to 52.0 (unable to load class [Servlet.BeerSelect]) 27 org.apache.catalina.loader.WebappClassLoaderBase.findClassInternal(WebappClassLoaderBase.java:2376) 28 org.apache.catalina.loader.WebappClassLoaderBase.findClass(WebappClassLoaderBase.java:834) 29 org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1297) 30 org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1157) 31 org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:490) 32 org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92) 33 org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:668) 34 org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343) 35 org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:408) 36 org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66) 37 org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:791) 38 org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1417) 39 org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) 40 java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) 41 java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) 42 org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) 43 java.lang.Thread.run(Unknown Source) 44 Note The full stack trace of the root cause is available in the server logs.
一开始没有细看,以为是tomcat目录结构错误,网上搜了各种方法都没能解决
后来仔细一看Root Cause,是Java Runtime版本引起的。想了想,我安装的
是jdk10,默认的编译版本也是10,应该是编译版本过高。
解决方案:
将编译等级调低即可
以上是关于Tomcat 提示 HTTP Status 500 – Internal Server ErrorTomcat 提示 HTTP Status 500 – Internal Server Error(示的主要内容,如果未能解决你的问题,请参考以下文章
tomcat 启动正常,网站确HTTP Status 500 错误
用Tomcat架设网站时出现500的问题 HTTP Status 500 - ------------------------------------------------
安装TOMCAT后访问测试页面的时候出现了HTTP Status 500 -
Tomcat报错:HTTP Status 500 - Wrapper cannot find servlet class
Tomcat报HTTP Status 500 - Servlet execution threw an exception错,请大神指点,急急急!!!!