无敌的专栏

命里有时终须有,命里无时莫强求

HTTP Status 500 - Error instantiating servlet class HelloWorld

在第一次写Servlet程序时,在Eclipse中启动Tomcat后,通过浏览器访问页面报如下错误:

HTTP Status 500 - Error instantiating servlet class HelloWorld

type Exception report

message Error instantiating servlet class HelloWorld

description The server encountered an internal error that prevented it from fulfilling this request.

exception

javax.servlet.ServletException: Error instantiating servlet class HelloWorld
	org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:503)
	org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
	org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:610)
	org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:526)
	org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1078)
	org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:655)
	org.apache.coyote.http11.Http11NioProtocol$Http11ConnectionHandler.process(Http11NioProtocol.java:222)
	org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1566)
	org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1523)
	java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
	java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
	org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
	java.lang.Thread.run(Thread.java:745)

root cause

java.lang.ClassNotFoundException: HelloWorld
	org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1324)
	org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1177)
	org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:503)
	org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
	org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:610)
	org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:526)
	org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1078)
	org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:655)
	org.apache.coyote.http11.Http11NioProtocol$Http11ConnectionHandler.process(Http11NioProtocol.java:222)
	org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1566)
	org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1523)
	java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
	java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
	org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
	java.lang.Thread.run(Thread.java:745)

note The full stack trace of the root cause is available in the Apache Tomcat/8.0.9 logs.


 

Apache Tomcat/8.0.9

 

阅读更多
个人分类: Servlet
上一篇The import XXX cannot be resolved
下一篇解释型语言与编译型语言的区别
想对作者说点什么? 我来说一句

没有更多推荐了,返回首页

关闭
关闭