Pattern selector

Most relevant patterns first. Most helpful ones displayed. Click here to show all.

  1. MysqlIO.sendCommand() has thrown a SQLException
    MySQL Connector/J
    137
    111
    21
  2. MysqlIO.checkErrorPacket() has thrown a SQLException
    MySQL Connector/J
    274
    168
    32

Your stack trace compared to the selected pattern

Jump to solutionsExpand frames
java.sql.SQLException: Index column size too large. The maximum column size is 767 bytes.
1 matching frame hidden
    at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4120)
    at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4052)
    at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2503)

Solution

rafael1 year ago

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

Check the source of this solution for more info

External results for this pattern (10)

  1. daniellukevia GitHub15 hours ago
    Hibernate operation: could not execute statement; uncategorized SQLException for SQL [n/a]; SQL state [HY000]; error code [1665]; Cannot execute statement: impossible to write to binary log since BINLOG_FORMAT = STATEMENT and at least one table uses a storage engine limited to row-based logging. InnoDB is limited to row-logging when transaction isolation level is READ COMMITTED or READ UNCOMMITTED.; nested exception is java.sql.SQLException: Cannot execute statement: impossible to write to binary log since BINLOG_FORMAT = STATEMENT and at least one table uses a storage engine limited to row-based logging. InnoDB is limited to row-logging when transaction isolation level is READ COMMITTED or READ UNCOMMITTED.
    Show stack trace
  2. Rao, Anuradha [JANUS Non-J&J]via Google Groups1 day ago
    Operand should contain 1 column(s)
    Show stack trace
  3. ismisepaulvia GitHub1 week ago
    Access denied for user 'firstBloodyMessL'@'172.17.0.2' (using password: YES)
    Show stack trace
  4. lotrusvia GitHub1 week ago
    Cannot connect to database, Access denied for user 'alarm'@'localhost' (using password: YES)
    Show stack trace
  5. ArawakCCvia GitHub2 weeks ago
    unrecognized token: "@"
    Show stack trace
  6. SethGandyvia GitHub1 month ago
    Field 'typeid' doesn't have a default value
    Show stack trace
  7. ismisepaulvia GitHub1 month ago
    Access denied for user 'firstBloodyMessL'@'172.30.0.4' (using password: YES)
    Show stack trace
  8. MrArtem1337via GitHub1 month ago
    Incorrect string value: '\xD0\xBC\xD0\xB5\xD1\x88...' for column 'reason' at row 1
    Show stack trace
  9. bitlinvia GitHub1 month ago
    Access denied for user 'ngtesting'@'183.157.87.85' (using password: YES)
    Show stack trace
  10. gnujavasergiovia GitHub1 month ago
    could not execute query
    Show stack trace