修正java.lang.AbstractMethodError 错误

java.lang.AbstractMethodError: com.microsoft.jdbc.sqlserver.SQLServerConnection.getHoldability()I
 at com.mchange.v2.c3p0.impl.NewPooledConnection.carefulCheckHoldability(NewPooledConnection.java:117)
 at com.mchange.v2.c3p0.impl.NewPooledConnection.<init>(NewPooledConnection.java:109)
 at com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:198)
 at com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:171)
 at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool$1PooledConnectionResourcePoolManager.acquireResource(C3P0PooledConnectionPool.java:137)
 at com.mchange.v2.resourcepool.BasicResourcePool.doAcquire(BasicResourcePool.java:1014)
 at com.mchange.v2.resourcepool.BasicResourcePool.access$800(BasicResourcePool.java:32)
 at com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask.run(BasicResourcePool.java:1810)
 at com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:547)

 

此错误的原因是:sql server 2000的driver里面没有getHodability()I,而c3p0的包内又存在carefulCheckHoldability方法来检查sqlserver2000,造成这个错误,在这里我使用的sql server 2000的driver是:msbase.jar, mssqlserver.jar, msutil.jar三个,c3p0对应的driver是:c3p0-0.9.1.2.jar,

修正的办法是,查找一个低一点版本的c3p0的driver,保证其在com.mchange.v2.c3p0.impl.NewPooledConnection目录下无carefulCheckHoldability方法即可。

评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值