您的位置:首页 > 数据库 > MySQL

链接mysql数据库出现Unknown character set: 'utf8mb4'问题

2014-07-08 21:09 495 查看
2014-7-8 21:05:17 com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask run

警告: com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@16c18a93 -- 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:

com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Unknown character set: 'utf8mb4'

    at sun.reflect.GeneratedConstructorAccessor16.newInstance(Unknown Source)

    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)

    at java.lang.reflect.Constructor.newInstance(Constructor.java:513)

    at com.mysql.jdbc.Util.handleNewInstance(Util.java:409)

    at com.mysql.jdbc.Util.getInstance(Util.java:384)

    at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1054)

    at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3566)

    at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3498)

    at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1959)

    at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2113)

    at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2562)

    at com.mysql.jdbc.ConnectionImpl.configureClientCharacterSet(ConnectionImpl.java:1856)

    at com.mysql.jdbc.ConnectionImpl.initializePropsFromServer(ConnectionImpl.java:3457)

    at com.mysql.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:2328)

    at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2122)

    at com.mysql.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:774)

    at com.mysql.jdbc.JDBC4Connection.<init>(JDBC4Connection.java:49)

    at sun.reflect.GeneratedConstructorAccessor13.newInstance(Unknown Source)

    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)

    at java.lang.reflect.Constructor.newInstance(Constructor.java:513)

    at com.mysql.jdbc.Util.handleNewInstance(Util.java:409)

    at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:375)

    at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:289)

    at com.mchange.v2.c3p0.DriverManagerDataSource.getConnection(DriverManagerDataSource.java:134)

    at com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:182)

    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)

不是MySQL数据库编码问题 将数据库驱动由mysql-connector-java-5.1.13-bin.jar改为mysql-connector-java-5.1.6-bin.jar解决。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: