java mysql 1366_MySql中的error-code='1366', sqlstate='HY000'错误

前几个数的插入没有问题,但随着插入的次数增多,出现了这个错误,Hibernate:insertintolink(text,url,description,create_time,author,introduction,module_id,module_def_id)values(?,...

前几个数的插入没有问题,但随着插入的次数增多,出现了这个错误,

Hibernate: insert into link (text, url, description, create_time, author, introduction, module_id, module_def_id) values (?, ?, ?, ?, ?, ?, ?, ?)

2008-01-07 14:26:03,812 WARN [org.hibernate.util.JDBCExceptionReporter] - SQL Error: 1366, SQLState: HY000

2008-01-07 14:26:03,812 ERROR [org.hibernate.util.JDBCExceptionReporter] - Incorrect string value: '\xA1\xAA\xA1\xAA\xB8\xDF...' for column 'description' at row 1

org.springframework.jdbc.UncategorizedSQLException: Hibernate operation: could not insert: [com.superway.entity.Link]; uncategorized SQLException for SQL [insert into link (text, url, description, create_time, author, introduction, module_id, module_def_id) values (?, ?, ?, ?, ?, ?, ?, ?)]; SQL state [HY000]; error code [1366]; Incorrect string value: '\xA1\xAA\xA1\xAA\xB8\xDF...' for column 'description' at row 1; nested exception is java.sql.SQLException: Incorrect string value: '\xA1\xAA\xA1\xAA\xB8\xDF...' for column 'description' at row 1

java.sql.SQLException: Incorrect string value: '\xA1\xAA\xA1\xAA\xB8\xDF...' for column 'description' at row 1

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

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

建表时已经写了ENGINE=InnoDB DEFAULT CHARSET=gb2312 AUTO_INCREMENT=5 ;不知为什么还出现这个错,我的字符集其实在装mysql的时候就已经是GBK了。。这个没问题的

展开

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值