javax.servlet.ServletException:java.lang.NoClassDefFoundError:org / apache / commons / dbcp / ConnectionFactory

时间:2018-09-05 09:39:06

标签: java tomcat7

我收到以下错误:

  

javax.servlet.ServletException:java.lang.NoClassDefFoundError:   org / apache / commons / dbcp / ConnectionFactory

我已经添加了相关的jars commons-dbcp-1.4.jarcommons-pool-1.4.jar,但是错误没有得到解决。

Stacktrace:

  

堆栈跟踪:     org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:579)     org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:461)     org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:396)     org.apache.jasper.servlet.JspServlet.service(JspServlet.java:340)     javax.servlet.http.HttpServlet.service(HttpServlet.java:729)     org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)   根本原因

     

javax.servlet.ServletException:java.lang.NoClassDefFoundError:   org / apache / commons / dbcp / ConnectionFactory     org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:909)     org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:838)     org.apache.jsp.ozLogin_jsp._jspService(ozLogin_jsp.java:470)     org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)     javax.servlet.http.HttpServlet.service(HttpServlet.java:729)     org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:438)     org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:396)     org.apache.jasper.servlet.JspServlet.service(JspServlet.java:340)     javax.servlet.http.HttpServlet.service(HttpServlet.java:729)     org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)   根本原因

     

java.lang.NoClassDefFoundError:   org / apache / commons / dbcp / ConnectionFactory     org.apache.jsp.ozLogin_jsp._jspService(ozLogin_jsp.java:189)     org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)     javax.servlet.http.HttpServlet.service(HttpServlet.java:729)     org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:438)     org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:396)     org.apache.jasper.servlet.JspServlet.service(JspServlet.java:340)     javax.servlet.http.HttpServlet.service(HttpServlet.java:729)     org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)   根本原因

     

java.lang.ClassNotFoundException:   org.apache.commons.dbcp.ConnectionFactory     org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1335)     org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1163)     org.apache.jsp.ozLogin_jsp._jspService(ozLogin_jsp.java:189)     org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)     javax.servlet.http.HttpServlet.service(HttpServlet.java:729)     org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:438)     org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:396)     org.apache.jasper.servlet.JspServlet.service(JspServlet.java:340)     javax.servlet.http.HttpServlet.service(HttpServlet.java:729)     org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)

1 个答案:

答案 0 :(得分:0)

将jar添加到Tomcat lib文件夹为我修复了错误