一、前言
在前面的博客中,小编想大家说明了一下,《sharding-jdbc + spring boot对大表进行分库分表》,这个文章中,小编引用的是sharding的2.0.3版本,使用这个版本后发现每次进行插入操作的时候就会报下面的错误
[ERROR] - Could not dispatch event: io.shardingsphere.core.transaction.listener.TransactionListener@679cdfc3 to public void io.shardingsphere.core.transaction.listener.TransactionListener.listen(io.shardingsphere.core.transaction.event.TransactionEvent) throws java.sql.SQLException
14:32:03.129 [project_business_thread_pool90] [ERROR] - Could not dispatch event: io.shardingsphere.core.transaction.listener.TransactionListener@679cdfc3 to public void io.shardingsphere.core.transaction.listener.TransactionListener.listen(io.shardingsphere.core.transaction.event.TransactionEvent) throws java.sql.SQLException
14:32:03.129 [project_business_thread_pool90] [ERROR] - Could not dispatch event: io.shardingsphere.core.transaction.listener.TransactionListener@679cdfc3 to public void io.shardingsphere.core.transaction.listener.TransactionListener.listen(io.shardingsphere.core.transaction.event.TransactionEvent) throws java.sql.SQLException
二、解决方案
升级sharding-jdbc的版本:
<dependency>
<groupId>io.shardingsphere</groupId>
<artifactId>sharding-jdbc</artifactId>
<version>3.0.0.M3</version>
</dependency>