BoneCP作连接池在开发环境中是正常的,但是应用移到apache tomcat服务器后 报错

renhorse 发布于 2012/09/25 08:34
阅读 775
收藏 0
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.
加载中
0
红薯
红薯
缺少 com/jolbox/bonecp/BoneCP,这是没有 bonecp 的 jar 包啊,你扔哪去了?
Ken5233
Ken5233
红大太有耐心了。。。 这哥们连基本的排错、查错能力都没有 要加油了
0
wendal
wendal

java.lang.NoClassDefFoundError: com/jolbox/bonecp/BoneCP

WEB-INF/lib 下没有bonecp.jar

0
r
renhorse
我是用myeclipse开发的,我把他加到lib目录了
0
r
renhorse
我是把整个目录复制过去的,这些包都存在的
0
Henry-Yu
Henry-Yu
bonecp问题不少,发现它连接关闭有问题,经常导致记录行锁,导致事务超时。换了其他,连接池,没有发现问题
0
wenshao
wenshao
推荐使用阿里巴巴开源的数据库连接池Druid。性能比BoneCP好,功能更齐全,经过大规模的部署,更稳定。 https://github.com/AlibabaTech/druid/wiki/%E5%B8%B8%E8%A7%81%E9%97%AE%E9%A2%98
返回顶部
顶部