Apr 28, 2012 3:48:02 PM org.apache.catalina.core.ApplicationContext log
SEVERE: Error loading WebappClassLoader
context: /hello
delegate: false
repositories:
----------> Parent Classloader:
org.apache.catalina.loader.StandardClassLoader@6eb38a
HelloServlet
java.lang.ClassNotFoundException: HelloServlet
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1680)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1526)
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1128)
at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:827)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:129)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:877)
at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:594)
at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1675)
at java.lang.Thread.run(Unknown Source)
Apr 28, 2012 3:48:02 PM org.apache.catalina.core.StandardWrapperValve invoke
SEVERE: Allocate exception for servlet HelloServlet
java.lang.ClassNotFoundException: HelloServlet
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1680)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1526)
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1128)
at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:827)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:129)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:877)
at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:594)
at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1675)
at java.lang.Thread.run(Unknown Source)
Apr 28, 2012 3:48:23 PM org.apache.catalina.core.StandardWrapperValve invoke
INFO: Servlet HelloServlet is currently unavailable
问问题
6713 次
2 回答
0
检查 $TOMCAT_HOME$/webapps/hello/WEB-INF/classes 文件夹,它是否有您的 HelloServlet (HelloServlet.class) 的编译版本。
你的 HelloServlet 类的完全限定包名是什么 - 你需要确保你的 web.xml 引用了完全限定名(如果你的 HelloServlet 有 xyx 的包定义,那么 web.xml 需要引用x.y.z.HelloServlet
)
于 2012-04-28T13:26:47.090 回答
0
1 - 转到项目中的 web.xml 文件。
2 - 查看标签<servlet-class>
并确保其格式如下。eclipsePackage.JavaClass
.
这个问题非常具有描述性,它无法加载指定的类,因为它无法加载locate
。位置来自web.xml
。确保上述选项卡中的路径正确。
于 2014-03-25T07:44:27.890 回答