Java Spring中遇到这样的异常?
博彩导航网站排行榜
博彩导航网站排行榜
当前位置 : 博彩导航网站排行榜 > 博彩导航网站排行榜

Java Spring中遇到这样的异常?

org.springframework.transaction.CannotCreateTransactionException: Could not open JDBC Connection for transaction; nested exception is java.sql.SQLException: com.mchange.v2.c3p0.ComboPooledDataSource [ java.beans.IntrospectionException: java.lang.reflect.InvocationTargetException [numThreadsAwaitingCheckoutDefaultUser] ] has been closed -- you can no longer use it.
    at org.springframework.jdbc.datasource.DataSourceTransactionManager.doBeginDataSourceTransactionManager.java:245
    at org.springframework.transaction.support.AbstractPlatformTransactionManager.getTransactionAbstractPlatformTransactionManager.java:373
    at org.springframework.transaction.interceptor.TransactionAspectSupport.createTransactionIfNecessaryTransactionAspectSupport.java:427
    at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransactionTransactionAspectSupport.java:276
    at org.springframework.transaction.interceptor.TransactionInterceptor.invokeTransactionInterceptor.java:96
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceedReflectiveMethodInvocation.java:179
    at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invokeExposeInvocationInterceptor.java:92
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceedReflectiveMethodInvocation.java:179
    at org.springframework.aop.framework.JdkDynamicAopProxy.invokeJdkDynamicAopProxy.java:208
    at com.sun.proxy.$Proxy83.checkAccountStatusUnknown Source
    at com.mc.arkcloud.server.deal.timer.IscsiNetStoreChecker.runIscsiNetStoreChecker.java:48
    at java.util.TimerThread.mainLoopTimer.java:555
    at java.util.TimerThread.runTimer.java:505
Caused by: java.sql.SQLException: com.mchange.v2.c3p0.ComboPooledDataSource [ java.beans.IntrospectionException: java.lang.reflect.InvocationTargetException [numThreadsAwaitingCheckoutDefaultUser] ] has been closed -- you can no longer use it.
    at com.mchange.v2.c3p0.impl.AbstractPoolBackedDataSource.assertCpdsAbstractPoolBackedDataSource.java:447
    at com.mchange.v2.c3p0.impl.AbstractPoolBackedDataSource.getPoolManagerAbstractPoolBackedDataSource.java:459
    at com.mchange.v2.c3p0.impl.AbstractPoolBackedDataSource.getConnectionAbstractPoolBackedDataSource.java:128
    at org.springframework.jdbc.datasource.DataSourceTransactionManager.doBeginDataSourceTransactionManager.java:204
    ... 12 more

因为没有加class12.jar包问题导致数据库连接不稳定,试一试class12.jar包加入就好了

数据库链接已经被关闭了,先看看直接连接有没有问题,没有问题的话可能是从连接池里拿的连接已经超时断开了,你看看连接池的配置和数据库本身的超时配置有没有问题

最新文章

广告位

博彩导航网站排行榜