java.sql.SQLException

java.lang.NumberFormatException: For input string: "11) BEGIN declare retval int(11); select count(*) into retval from x where id in (1"

Samebug tips1

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


rafaelrafael

Don't give up yet. Our experts can help. Paste your full stack trace to get a solution.

Solutions on the web1664

  • Stack trace

    • java.sql.SQLException: java.lang.NumberFormatException: For input string: "11) BEGIN declare retval int(11); select count(*) into retval from x where id in (1" at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1055) at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:956) at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:926) at com.mysql.jdbc.Util.handleNewInstance(Util.java:430) at com.mysql.jdbc.CallableStatement.getInstance(CallableStatement.java:505) at com.mysql.jdbc.ConnectionImpl.parseCallableStatement(ConnectionImpl.java:3881) at com.mysql.jdbc.ConnectionImpl.prepareCall(ConnectionImpl.java:3965) at com.mysql.jdbc.ConnectionImpl.prepareCall(ConnectionImpl.java:3939) at test.TestBug.main(TestBug.java:16)

    Write tip

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

    Users with the same issue

    ivanszkypeterivanszkypeter
    675 times, last one
    zbalintzbalint
    4 times, last one
    AxeloAxelo
    5 times, last one
    aidoanaidoan
    5 times, last one
    MattyMatty
    Once,
    148 more bugmates