HTTP Status 500 - Servlet execution threw an exception

Java Web项目jdbc连接池异常错误信息:
type Exception report

message Servlet execution threw an exception

description The server encountered an internal error that prevented it from fulfilling this 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/apache/commons/dbcp/BasicDataSource
com.grace.DBUtil2.(DBUtil2.java:35)
com.grace.Method.service(Method.java:37)
javax.servlet.http.HttpServlet.service(HttpServlet.java:731)
org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
root cause

java.lang.ClassNotFoundException: org.apache.commons.dbcp.BasicDataSource
org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1892)
org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1735)
com.grace.DBUtil2.(DBUtil2.java:35)
com.grace.Method.service(Method.java:37)
javax.servlet.http.HttpServlet.service(HttpServlet.java:731)
org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
note The full stack trace of the root cause is available in the Apache Tomcat/7.0.82 logs.

解决方案:到apache-tomcat/lib目录下,拷贝el-api.jar放到D:\Program Files\Java\jdk1.6.0\jre\lib\ext下即可.

你可能感兴趣的:(Exception)