Reputation: 31070
java.sql.SQLException: Incorrect string value: '\xAC\xED\x00\x05sr...' for column 'xxxx'
The column is a longtext in MYSQL with utf8 charset and utf8_general_ci collation.
What is wrong?
Upvotes: 4
Views: 3909
Reputation:
ALTER TABLE your_table CONVERT TO CHARACTER SET utf8 COLLATE utf8_unicode_ci;
You can try this.
Upvotes: 0
Reputation: 11
Is this while using PreparedStatements in Groovy? If so, you're using GStrings instead of plain Java Strings. Check your object yo make sure your parameters are what you expect.
Upvotes: 1
Reputation: 3277
It's a bit late, but you might want to know that \xAC\xED\x00\x05sr... is a magic number for Java serialization. Apparently your parameter is being serialized instead of being pasted as a string.
Upvotes: 7
Reputation: 839154
Assuming that those are hexadecimal escape codes, the text \xAC\xED\x00\x05sr...
is not a valid UTF-8 string.
Upvotes: 2