java.sql.SQLException

If you like a tip written by other Samebug users, mark is as helpful! Marks help our algorithm provide you better solutions and also help other users.
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

You have a different solution? A short tip here would help you and many other users who saw this issue last week.

  • GitHub comment 1504#242725930
    via GitHub by octachrome
    ,
  • JDBC:Connection Issue When Run program
    via Stack Overflow by hamel123
    ,
  • After End Of Result set error?
    via by Unknown author,
  • GitHub comment 598#140930847
    via GitHub by g0t4
    ,
    • java.sql.SQLException: Incorrect string value: '\xF0\x9F\x91\x8C' for column 'name' at row 1 at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1073) at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3609) at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3541) at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2002) at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2163) at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2624) at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:2127) at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2427) at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2345) at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2330) at com.mysql.jdbc.jdbc2.optional.PreparedStatementWrapper.executeUpdate(PreparedStatementWrapper.java:875)

    Users with the same issue

    MoYaproMoYapro
    4 times, last one,
    ivanszkypeterivanszkypeter
    490 times, last one,
    Unknown visitor
    Unknown visitor1 times, last one,
    linxiaolonglinxiaolong
    1 times, last one,
    rocdayrocday
    1 times, last one,
    146 more bugmates