java.sql.SQLException

'NaN' is not a valid numeric or approximate numeric value

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

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

Solutions on the web11577

  • via JIRA by Martin Boulanger, 1 year ago
    'NaN' is not a valid numeric or approximate numeric value
  • 'NaN' is not a valid numeric or approximate numeric value
  • 'NaN' is not a valid numeric or approximate numeric value
  • Stack trace

    • java.sql.SQLException: 'NaN' is not a valid numeric or approximate numeric value at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:959) at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:898) at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:887) at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:862) at com.mysql.jdbc.PreparedStatement.setDouble(PreparedStatement.java:3252) at de.Keyle.MyPet.util.hikari.pool.HikariProxyPreparedStatement.setDouble(HikariProxyPreparedStatement.java) at de.Keyle.MyPet.repository.types.MySqlRepository$9.run(MySqlRepository.java:971) at org.bukkit.craftbukkit.v1_10_R1.scheduler.CraftTask.run(CraftTask.java:58) at org.bukkit.craftbukkit.v1_10_R1.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:53) at com.destroystokyo.paper.ServerSchedulerReportingWrapper.run(ServerSchedulerReportingWrapper.java:22) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source)

    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

    152 times, 27 seconds ago
    689 times, 16 hours ago
    4 times, 1 day ago
    3 times, 2 days ago
    6 times, 3 days ago
    149 more bugmates