java.sql.SQLException: Incorrect string value: '\xF0\x9F\x92\x94' for column 'xxx' at row 1

GitHub | anjia0532 | 3 months ago
tip
Do you find the tips below useful? Click on the to mark them and say thanks to rafael . Or join the community to write better ones.
  1. 0
    samebug tip
    MySQL doesn't support some types of characters (such as emojis) with the utf8 encoding. You need to be on MySQL 5.5+ and force utf8mb4 (everywhere, client and server). You can do this sending the query "SET NAMES utf8mb4". Check this https://goo.gl/3E2qzg
  2. 0

    microservice use mysql-docker insert unicode throw SQLException

    GitHub | 3 months ago | anjia0532
    java.sql.SQLException: Incorrect string value: '\xF0\x9F\x92\x94' for column 'xxx' at row 1
  3. 0

    MySQL Bugs: #43819: JDBC - Unsupported unicode character(s)

    mysql.com | 10 months ago
    java.sql.SQLException: Incorrect string value: '\x86\x92' for column 'str' at row 1
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    MySQL Database encoding

    Stack Overflow | 3 years ago | kris14an
    java.sql.SQLException: Incorrect string value: '\xB3\xF3\xBF\xBC\xE6\xBF...' for column 'content' at row 1

  1. Axelo 1 times, last 1 month ago
  2. jshakil 3 times, last 6 months ago
5 unregistered visitors
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. java.sql.SQLException

    Incorrect string value: '\xF0\x9F\x92\x94' for column 'xxx' at row 1

    at com.mysql.jdbc.SQLError.createSQLException()
  2. MySQL jdbc
    StatementImpl.executeUpdate
    1. com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1073)
    2. com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3593)
    3. com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3525)
    4. com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1986)
    5. com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2140)
    6. com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2620)
    7. com.mysql.jdbc.StatementImpl.executeUpdate(StatementImpl.java:1662)
    8. com.mysql.jdbc.StatementImpl.executeUpdate(StatementImpl.java:1581)
    8 frames