Tomcat相关错误
2017-08-25 本文已影响0人
lllaser
Tomcat无法启动
console显示org.apache.catalina.LifecycleException
检查web.xml中<servlet-mapping>的<url-pattern>标签中的url,漏/可能会出现该错误
HTTP Status 500 – Internal Server Error
Type Exception Report
Message Error instantiating servlet class [servlet.ListServlet]
Description The server encountered an unexpected condition that prevented it from fulfilling the request.
Exception
javax.servlet.ServletException: Error instantiating servlet class [packagename.classname]
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:475)
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:80)
org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:625)
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:342)
org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:498)
org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:796)
org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1372)
org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
java.lang.Thread.run(Thread.java:748)
- Eclipse中修改Server Locations为Use Tomcat Installation,修改Deploy Path为webapps
进tomcat安装目录下webapps\projectname\WEB-INF\classes中查找是否存在class -
检查web.xml中<servlet>和<servlet-mapping>中的内容是否写错,检查出错servlet是否放在正确的source folder下的正确包内
极有可能是这个原因,但是自己就是看不出来哪里写错了,这时候就干点别的放松一下再回来找错吧