日期:2014-05-20  浏览次数:21773 次

dbcp报了一个错: Error preloading the connection pool要郁闷死了
dbcp报了一个错: Error preloading the connection pool要郁闷死了
也不是老是报错,项目在运行一段时间后就会出现下面这个错误。只能重新启动


16:08:49,109 INFO [v96159] 开始定制!
{>>>>>>>>活跃连接数=1, >>>>>>>>空闲连接数=49}
关闭后{>>>>>>>>活跃连接数=0, >>>>>>>>空闲连接数=50}
16:08:49,203 INFO [DingZhiFuWuStart] 全新用户定制服务。
获得连接出错!
org.apache.commons.dbcp.SQLNestedException: Error preloading the connection pool
at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1238)
at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:880)
at zh.dbcp.DbcpBean.getConn(DbcpBean.java:31)
at zh.dbcp.DBConn.executeUpdate(DBConn.java:42)
at zh.dingZhiFuWu.DingZhiFuWuStart.NewUserDingZhi(DingZhiFuWuStart.java:377)
at zh.dingZhiFuWu.DingZhiFuWuStart.dingZhiFuWu(DingZhiFuWuStart.java:230)
at zh.smg.v96159.doPost(v96159.java:220)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at com.healthInfo120.wap.filter.EncodingFilter.doFilter(EncodingFilter.java:29)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:228)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:216)
at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:190)
at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:283)
at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:767)
at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:697)
at org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:889)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:686)
at java.lang.Thread.run(Thread.java:619)
Caused by: java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]Error establishing socket.
at com.microsoft.jdbc.base.BaseExceptions.createException(Unknown Source)
at com.microsoft.jdbc.base.BaseExceptions.getException(Unknown Source)
at com.microsoft.jdbc.base.BaseExceptions.getException(Unknown Source)
at com.microsoft.jdbc.sqlserver.tds.TDSConnection.<init>(Unknown Source)
at com.microsoft.jdbc.sqlserver.SQLServerImplConnection.open(Unknown Source)
at com.microsoft.jdbc.base.BaseConnection.getNewImplConnection(Unknown Source)
at com.microsoft.jdbc.base.BaseConnection.open(Unknown Source)
at com.microsoft.jdbc.base.BaseDriver.connect(Unknown Source)
at org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:38)
at org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:294)
at org.apache.commons.pool.impl.GenericObjectPool.addObject(GenericObjectPool.java:996)
at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1235)
... 26 more
java.lang.NullPointerException
at zh.dbcp.DBConn.executeUpdate(DBConn.java:43)
at zh.dingZhiFuWu.DingZhiFuWuStart.NewUserDingZhi(DingZhiFuWuStart.java:377)
at zh.dingZhiFuWu.DingZhiFuWuStart.dingZhiFuWu(DingZhiFuWuStart.java:230)