Nested exception is Java.sql.SQLException:Incorrect string value: ' \xe7\x99\xbb\xe9\x99\x86 ... ' for column ' image ' at row 1

Source: Internet
Author: User

HTTP Status 500-hibernate operation:could not insert: [cn.itcast.shop.product.vo.Product]; Uncategorized sqlexcept Ion for SQL [insert INTO Product (PName, Market_price, Shop_price, image, Pdesc, Is_hot, pdate, CSID) VALUES (?,?,?,?, ?, ?, ?, ?)]; SQL state [HY000]; Error code [1366]; Incorrect string value: ' \xe7\x99\xbb\xe9\x99\x86 ... ' for column ' image ' at row 1; Nested exception is Java.sql.SQLException:Incorrect string value: ' \xe7\x99\xbb\xe9\x99\x86 ... ' for column ' image ' at row 1

Problem with Image field type

To modify a field type:

Mysql> ALTER TABLE product modify image varchar (255) CharSet UTF8 collate utf8_general_ci;
Query OK, rows affected
enregistrements:71 doublons:0 avertissements:0

Extended:

Modify Field Name:

Mysql> ALTER TABLE product change image images varchar (255);
Query OK, 0 rows affected
enregistrements:0 doublons:0 avertissements:0

Nested exception is Java.sql.SQLException:Incorrect string value: ' \xe7\x99\xbb\xe9\x99\x86 ... ' for column ' image ' at row 1

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.