MySql系列:中文写入数据库出现错误java.sql.SQLException: Incorrect string value: '\xE5\xxxx' for column 'xxxx' at r
来源:互联网 发布:暗黑战神源码解读 编辑:程序博客网 时间:2024/05/21 18:41
MySql系列:中文写入数据库出现错误java.sql.SQLException: Incorrect string value: '\xE5\xxxx' for column 'xxxx' at row 1及其解决方法
在将kft-activiti-demo的数据库连接改为mysql之后,可以正常登陆,但是在新建请假流程的时候出现如下错误:
Caused by: java.sql.SQLException: Incorrect string value: '\xE5\x85\xAC\xE4\xBC\x91' for column 'leave_type' at row 1
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:998)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3847)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3783)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2447)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2594)
at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2545)
at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1901)
at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2113)
at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2049)
at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2034)
at org.apache.commons.dbcp.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:105)
at org.apache.commons.dbcp.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:105)
at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:133)
... 122 more
经过查找发发现是由于mysql连接设置的有问题,在application.properitis中设置的连接如下:
jdbc.url=jdbc:mysql://localhost:3306/kafeitu?useUnicode=true&characterEncoding=utf-8
应该改为:
jdbc.url=jdbc:mysql://localhost:3306/kafeitu?useUnicode=true&characterEncoding=utf-8
阅读全文
0 0
- MySql系列:中文写入数据库出现错误java.sql.SQLException: Incorrect string value: '\xE5\xxxx' for column 'xxxx' at r
- mysql插入中文数据报错 java.sql.SQLException: Incorrect string value: '\xE5\x90\x88\xE8\xAE\xA1' for column
- Mysql 插入中文错误:Incorrect string value: '\xE7\xA8\x8B\xE5\xBA\x8F...' for column 'course' at row 1
- Mysql 插入中文错误:Incorrect string value: '\xE7\xA8\x8B\xE5\xBA\x8F...' for column 'course' at row 1
- Mysql 插入中文错误:Incorrect string value: '\xE7\xA8\x8B\xE5\xBA\x8F...' for column 'course' at row 1
- java.sql.SQLException: Incorrect string value: '\xE5\x90\x88\xE8\xAE\xA1' for column
- 解决mysql保存数据SQLException: Incorrect string value: '\xF0\x9F\x91\x87\xE5\x91...' for column '错误
- Data truncation: Incorrect datetime value: '' for column 'xxxx' at row
- java.sql.SQLException: Incorrect string value: '\xF0\x9F\x98\x8E' for column 'nick' at row 1
- java.sql.SQLException: Incorrect string value: '\xF0\x9F\x98\xB3' for column 'Content' at row 1
- mysql 中插入中文出现的 Incorrect string value: '\xE5\xA5\xBD\xE5\xAE\xB6...' from column错误
- navicate premium 1366-incorrect string value :'XXXX' for column ''at row
- MySQL报错“ Incorrect integer value: '' for column 'XXXX' at row 1 ”
- MySQL java.sql.SQLException: Incorrect string value: '\xF0\x9F\xA4\x97' for column
- mysql:Incorrect string value: '\xE5\x8C\x97\xE4\xBA\xAC' for column 'address' at row 1
- MySQL错误——java.sql.SQLException: Incorrect decimal value: \'\' for column \'sys_offset_seq\' a
- 关于mysql数据库“Incorrect string value: '\xFF\xFE\x0DNSb...' for column 'note' at row 1”错误
- java.sql.SQLException: Incorrect string value: '\xE9\x99\xB6\xE4\xBC\x9F...' for column 'name' at ro
- myeclipse 安装properties 插件
- OCPP简介
- 设置透明状态栏
- vue框架搭建的详细步骤之项目结构(二)
- Postman 常用测试结果验证及使用技巧
- MySql系列:中文写入数据库出现错误java.sql.SQLException: Incorrect string value: '\xE5\xxxx' for column 'xxxx' at r
- 苹果电脑获取Android Studio的发布版SHA1和开发版SHA1
- Android如何实现微信支付
- 多线程造成死锁的两种情况
- C++中static
- Android---Intent的介绍
- Caused by: org.jbpm.api.JbpmException: resource classpath:jdpm/jbpm.cfg.xml does not exist
- javaweb的request获取真实IP地址
- 代码整洁之道--函数