servlet吧 关注:1,441贴子:1,219
  • 0回复贴,共1

求助,servlet引用dao类问题

只看楼主收藏回复

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 exceptionorg.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
Root Cause
java.lang.NoClassDefFoundError: Dao/SearchDaoFactorysetvlet.searchServlet.doGet(searchServlet.java:32)javax.servlet.http.HttpServlet.service(HttpServlet.java:634)javax.servlet.http.HttpServlet.service(HttpServlet.java:741)org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
Root Cause
java.lang.ClassNotFoundException: Dao.SearchDaoFactoryorg.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1309)org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1138)setvlet.searchServlet.doGet(searchServlet.java:32)javax.servlet.http.HttpServlet.service(HttpServlet.java:634)javax.servlet.http.HttpServlet.service(HttpServlet.java:741)org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
Note The full stack trace of the root cause is available in the server logs.
大神们我找了好久都没有找到问题所在,为什么servlet引用不dao类,而在其他包下实例化dao类却可以得到dao的数据。在servlet却不行


IP属地:北京1楼2018-08-04 01:31回复