BoneCP作连接池在开发环境中是正常的,但是应用移到apache tomcat服务器后 报错
BoneCP 大家好,我在myeclipse中用BoneCP作连接池是成功的,但是我把应用移到apache tomcat服务器
后,发现报了下面的错误,请高手指点一下我,是什么原因造成的? apache tomcat服务器运行别的应用一直是正常运行的
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
org.apache.jasper.JasperException: An exception occurred processing JSP page /check_login.jsp at line 27
24: sql.append(" select password str from gps_user where name='"+name+"'");
25: //d.Query(sql.toString());
26:
27: String pwd1=d.getField(sql.toString());
28: if(pwd.equals(pwd1)){
29: session.setAttribute("user",name);
30: response.sendRedirect("http://localhost:8080/dz/tracert_baidu.jsp");
Stacktrace:
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:510)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:401)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
root cause
javax.servlet.ServletException: java.lang.NoClassDefFoundError: com/jolbox/bonecp/BoneCP
org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:862)
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:791)
org.apache.jsp.check_005flogin_jsp._jspService(check_005flogin_jsp.java:107)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:377)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
root cause
java.lang.NoClassDefFoundError: com/jolbox/bonecp/BoneCP
com.qt.util.jdbc.DBConnection.getConnection(DBConnection.java:50)
com.qt.util.jdbc.Dao.getField(Dao.java:240)
org.apache.jsp.check_005flogin_jsp._jspService(check_005flogin_jsp.java:84)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:377)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
note The full stack trace of the root cause is available in the Apache Tomcat/6.0.24 logs.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
推荐使用阿里巴巴开源的数据库连接池Druid。性能比BoneCP好,功能更齐全,经过大规模的部署,更稳定。
https://github.com/AlibabaTech/druid/wiki/%E5%B8%B8%E8%A7%81%E9%97%AE%E9%A2%98
我是把整个目录复制过去的,这些包都存在的
我是用myeclipse开发的,我把他加到lib目录了
红大太有耐心了。。。 这哥们连基本的排错、查错能力都没有 要加油了