前几个数的插入没有问题,但随着插入的次数增多,出现了这个错误,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了。。这个没问题的
展开