1
我已經找出問題所在,但決定將它發佈到此處,以防其他人對同一堵牆進行撞擊。將石英加入項目休息jdbc dataSource
我已經添加了最新版本的石英調度到我的項目:
<dependency>
<groupId>org.quartz-scheduler</groupId>
<artifactId>quartz</artifactId>
<version>2.2.1</version>
</dependency>
忽然測試霏霏有:
org.springframework.jdbc.UncategorizedSQLException: PreparedStatementCallback; uncategorized SQLException for SQL [ my sql ]; SQL state [null]; error code [0]; An SQLException was provoked by the following failure: java.lang.InterruptedException; nested exception is java.sql.SQLException: An SQLException was provoked by the following failure: java.lang.InterruptedException
更奇怪,當我感動石英對另一個模塊的依賴,他們開始以不同的例外失敗:
Could not get JDBC Connection; nested exception is java.sql.SQLException: com.mchange.v2.c3p0.ComboPooledDataSource[ identityToken -> z8kfsx9b1qeyobp10iytmq|796c39ad, dataSourceName -> z8kfsx9b1qeyobp10iytmq|796c39ad ] has been closed() -- you can no longer use it.
因此,Spring關閉了我的ComboPooledDataSource,但是爲什麼?
去除石英或將其版本更改爲1.8.x有幫助。即使沒有實例化任何石英物體,也會發生例外情況。