美文网首页
java.lang.classnotfoundexception

java.lang.classnotfoundexception

作者: ovoEl | 来源:发表于2019-12-26 10:24 被阅读0次

    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问题,会慢慢记下来

    相关文章

      网友评论

          本文标题:java.lang.classnotfoundexception

          本文链接:https://www.haomeiwen.com/subject/spknsftx.html