关于jar包版本引起的SQLException
首先MySQL的版本为8.0
在进行某项目开发时,运行出错jvm报出的错误是:
警告: com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@3b699385 – Acquisition Attempt Failed!!! Clearing pending acquires. While trying to acquire a needed new resource, we failed to succeed more than the maximum number of allowed acquisition attempts (30). Last acquisition attempt exception:
java.sql.SQLException: Unknown character set index for field ‘255’ received from server.
一开始以为是之前编写工具类的编码问题,后来经过一系列排查发现是sql的jar包导入的不是平时常用的:
mysql-connector-java-5.1.46-bin.jar
而是:mysql-connector-java-5.0.4-bin所以才导致的连接问题