java.lang.classnotfoundexception问题 ①

day14 tomcat 综合小案例中遇到的java.lang.classnotfoundexception问题

HTTP Status 500 – Internal Server Error

Type Exception Report

Message Servlet execution threw an exception

Description The server encountered an unexpected condition that prevented it from fulfilling the request.

Exception

javax.servlet.ServletException: Servlet execution threw an exception

org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)

Root Cause

java.lang.NoClassDefFoundError: org/springframework/dao/DataAccessException

com.cixa.web.servlet.LoginServlet.doPost(LoginServlet.java:27)

javax.servlet.http.HttpServlet.service(HttpServlet.java:661)

javax.servlet.http.HttpServlet.service(HttpServlet.java:742)

org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)

Root Cause

java.lang.ClassNotFoundException: org.springframework.dao.DataAccessException

org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1308)

org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1136)

com.cixa.web.servlet.LoginServlet.doPost(LoginServlet.java:27)

javax.servlet.http.HttpServlet.service(HttpServlet.java:661)

javax.servlet.http.HttpServlet.service(HttpServlet.java:742)

org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)

Note The full stack trace of the root cause is available in the server logs.

Apache Tomcat/8.5.31


解决:清除idea缓存

File-->Invalidate Cashes

检查jar包所在的lib是不是在web-inf下,多一个s或者-变成_都不行


感觉将来还会遇到很多lang问题,会慢慢记下来

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

友情链接更多精彩内容