java.lang.ClassNotFoundException: com.zj.servlet.DensityServlet
问题描述
之前程序运行的好好的,现在突然报错java.lang.ClassNotFoundException: com.zj.servlet.DensityServlet
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1275)at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1109)at org.apache.catalina.core.DefaultInstanceManager.loadClass(DefaultInstanceManager.java:520)at org.apache.catalina.core.DefaultInstanceManager.loadClassMaybePrivileged(DefaultInstanceManager.java:501)at org.apache.catalina.core.DefaultInstanceManager.newInstance(DefaultInstanceManager.java:118)at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1050)at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:779)at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:133)at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:474)at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140)at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:624)at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:349)at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:495)at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:767)at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1347)at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)at java.lang.Thread.run(Thread.java:745)
问题解答
回答1:这是一个很基础的异常信息,信息提示也很明确,程序在classpath路径下找不到com.zj.servlet.DensityServlet这个类,因此加入包含这个类的jar包即可。
回答2:没有找到 com.zj.servlet.DensityServlet 排查一下是不是缓存的原因
相关文章:
1. dockerfile - [docker build image失败- npm install]2. angular.js - angular内容过长展开收起效果3. Docker for Mac 创建的dnsmasq容器连不上/不工作的问题4. angular.js使用$resource服务把数据存入mongodb的问题。5. 新手学习vue和node.js的困惑6. docker不显示端口映射呢?7. docker images显示的镜像过多,狗眼被亮瞎了,怎么办?8. docker - 如何修改运行中容器的配置9. 在windows下安装docker Toolbox 启动Docker Quickstart Terminal 失败!10. 想学下微信支付视频教程,能否付费获得?