当前位置: 代码迷 >> Eclipse >> java.lang.ClassNotFoundException: com.jspdev.ch7.HelloWorldServlet
  详细解决方案

java.lang.ClassNotFoundException: com.jspdev.ch7.HelloWorldServlet

热度:80   发布时间:2016-04-23 14:40:35.0
写servlet的时候抛出下面的异常。大家看看
org.apache.catalina.loader.StandardClassLoader@87e704
  com.jspdev.ch7.HelloWorldServlet
java.lang.ClassNotFoundException:   com.jspdev.ch7.HelloWorldServlet
at   org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1352)
at   org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1198)
at   org.apache.catalina.core.StandardWrapper$1.run(StandardWrapper.java:1017)
at   java.security.AccessController.doPrivileged(Native   Method)
at   org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1013)
at   org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:757)
at   org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:130)
at   org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at   org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at   org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at   org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at   org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at   org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
at   org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
at   org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
at   org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
at   org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
at   java.lang.Thread.run(Unknown   Source)

------解决方案--------------------
没找到com.jspdev.ch7.HelloWorldServlet里面的类吧

------解决方案--------------------
java.lang.ClassNotFoundException: com.jspdev.ch7.HelloWorldServlet
这里已经说得很清楚了
------解决方案--------------------
可能是你没有tomcat重新启动.
在重新启动之前,还需要刷新你的项目.
------解决方案--------------------
可能和你 tomcat 的缓存有关系 ,我也遇到过同样的问题!!
  相关解决方案