-
jun2020 小试身手Lv3
发表于2020-5-11 17:23
悬赏1
已解决
楼主
ABI5.2不支持连接mysql的utf8mb4字符集数据库
最佳答案
问了研发,暂 不支持utf8mb4字符集,字符集修改需在数据库配置文件中直接修改,如上图
15个回答
-
1505121235 数据老手Lv5
板凳
http://bbs.esensoft.com/thread-135434-1-1.html参考一下这个帖子的url示例
1505121235 发表于 2020-5-11 17:31
http://bbs.esensoft.com/thread-135434-1-1.html参考一下这个帖子的url示例
不是连接的问题,是字符集的问题,系统提示不支持utf8mb4
本帖最后由 jun2020 于 2020-5-13 14:42 编辑
1505121235 发表于 2020-5-11 17:42
报错详情完整复制粘贴到txt发一下
java.lang.RuntimeException: 测试失败,无法获得数据库链接.
jdbc:mysql://112.15.65.96:3306/dbname?useUnicode=true&characterEncoding=utf8mb4
java.sql.SQLException: Unsupported character encoding 'utf8mb4'.
at com.esen.jdbc.SqlFunc.testDataSource(SqlFunc.java:1471)
at com.esen.edatasource.api.util.JdbcUtils$1.call(JdbcUtils.java:168)
at com.esen.edatasource.api.util.JdbcUtils$1.call(JdbcUtils.java:164)
at com.esen.scheduling.LocaleTask.call(LocaleTask.java:56)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.sql.SQLException: Unsupported character encoding 'utf8mb4'.
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:964)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:897)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:886)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:860)
at com.mysql.jdbc.ConnectionPropertiesImpl.postInitialization(ConnectionPropertiesImpl.java:2543)
at com.mysql.jdbc.ConnectionPropertiesImpl.initializeProperties(ConnectionPropertiesImpl.java:2513)
at com.mysql.jdbc.ConnectionImpl.initializeDriverProperties(ConnectionImpl.java:3142)
at com.mysql.jdbc.ConnectionImpl.(ConnectionImpl.java:763)
at com.mysql.jdbc.JDBC4Connection.(JDBC4Connection.java:47)
at sun.reflect.GeneratedConstructorAccessor395.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at com.mysql.jdbc.Util.handleNewInstance(Util.java:425)
at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:389)
at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:330)
at java.sql.DriverManager.getConnection(DriverManager.java:664)
at java.sql.DriverManager.getConnection(DriverManager.java:247)
at com.esen.jdbc.SqlFunc.testDataSource(SqlFunc.java:1468)
... 7 more
java.lang.RuntimeException: 测试失败,无法获得数据库链接.
jdbc:mysql://112.15.65.96:3306/dbname?useUnicode=true&characterEncoding=utf8mb4
java.sql.SQLException: Unsupported character encoding 'utf8mb4'.
at com.esen.jdbc.SqlFunc.testDataSource(SqlFunc.java:1471)
at com.esen.edatasource.api.util.JdbcUtils$1.call(JdbcUtils.java:168)
at com.esen.edatasource.api.util.JdbcUtils$1.call(JdbcUtils.java:164)
at com.esen.scheduling.LocaleTask.call(LocaleTask.java:56)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.sql.SQLException: Unsupported character encoding 'utf8mb4'.
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:964)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:897)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:886)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:860)
at com.mysql.jdbc.ConnectionPropertiesImpl.postInitialization(ConnectionPropertiesImpl.java:2543)
at com.mysql.jdbc.ConnectionPropertiesImpl.initializeProperties(ConnectionPropertiesImpl.java:2513)
at com.mysql.jdbc.ConnectionImpl.initializeDriverProperties(ConnectionImpl.java:3142)
at com.mysql.jdbc.ConnectionImpl.(ConnectionImpl.java:763)
at com.mysql.jdbc.JDBC4Connection.(JDBC4Connection.java:47)
at sun.reflect.GeneratedConstructorAccessor395.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at com.mysql.jdbc.Util.handleNewInstance(Util.java:425)
at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:389)
at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:330)
at java.sql.DriverManager.getConnection(DriverManager.java:664)
at java.sql.DriverManager.getConnection(DriverManager.java:247)
at com.esen.jdbc.SqlFunc.testDataSource(SqlFunc.java:1468)
... 7 more
--messageInfo--
rootExceptionClass=java.sql.SQLException
at Object.throwError (http://10.20.21.200:8080/abi/eui/eui.js:2598:19)
at QueryObj.checkResult (http://10.20.21.200:8080/abi/eui/eui.js:3942:9)
at QueryObj._onreadystatechange (http://10.20.21.200:8080/abi/eui/eui.js:3599:11)
at XMLHttpRequest.hp.onreadystatechange (http://10.20.21.200:8080/abi/eui/eui.js:3671:10)