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.

  • 运行时报SQL异常
    via GitHub by gewanbo
    ,
  • MySQL error on first time startup
    via GitHub by wezell
    ,
  • Logblock lookup SQL Exception.
    via GitHub by mibby
    ,
    • java.sql.SQLException: Can not issue empty query. at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:996) at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:935) at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:924) at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:870) at com.mysql.jdbc.StatementImpl.checkNullOrEmptyQuery(StatementImpl.java:492) at com.mysql.jdbc.StatementImpl.executeQuery(StatementImpl.java:1367) at com.you.sql.Student.queryStudent(Student.java:51) at com.you.sql.Student.main(Student.java:79)

    Users with the same issue

    linxiaolong
    4 times, last one,
    Kialandei
    13 times, last one,
    Unknown visitor1 times, last one,
    Unknown visitor1 times, last one,
    Unknown visitor1 times, last one,
    145 more bugmates