java.sql.SQLException

Conversion not supported for type xxx.enums.Gender

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 web1665

  • via Unknown by cemo koc,
  • via Unknown by cemo koc,
  • via Unknown by Unknown author,
  • Stack trace

    • java.sql.SQLException: Conversion not supported for type xxx.enums.Gender at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1094)[mysql-connector-java-5.1.31.jar:na] at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:997)[mysql-connector-java-5.1.31.jar:na] at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:983)[mysql-connector-java-5.1.31.jar:na] at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:928)[mysql-connector-java-5.1.31.jar:na] at com.mysql.jdbc.ResultSetImpl.getObject(ResultSetImpl.java:5121)[mysql-connector-java-5.1.31.jar:na] at com.mysql.jdbc.JDBC4ResultSet.getObject(JDBC4ResultSet.java:542)[mysql-connector-java-5.1.31.jar:na] at org.springframework.jdbc.support.JdbcUtils.getResultSetValue(JdbcUtils.java:197)[spring-jdbc-4.1.0.RELEASE.jar:4.1.0.RELEASE] at org.springframework.jdbc.core.BeanPropertyRowMapper.getColumnValue(BeanPropertyRowMapper.java:311)[spring-jdbc-4.1.0.RELEASE.jar:4.1.0.RELEASE] at org.springframework.jdbc.core.BeanPropertyRowMapper.mapRow(BeanPropertyRowMapper.java:249)[spring-jdbc-4.1.0.RELEASE.jar:4.1.0.RELEASE] at org.springframework.jdbc.core.RowMapperResultSetExtractor.extractData(RowMapperResultSetExtractor.java:93)[spring-jdbc-4.1.0.RELEASE.jar:4.1.0.RELEASE] at org.springframework.jdbc.core.RowMapperResultSetExtractor.extractData(RowMapperResultSetExtractor.java:60)[spring-jdbc-4.1.0.RELEASE.jar:4.1.0.RELEASE] at org.springframework.jdbc.core.JdbcTemplate$1.doInPreparedStatement(JdbcTemplate.java:705)[spring-jdbc-4.1.0.RELEASE.jar:4.1.0.RELEASE] at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:641)[spring-jdbc-4.1.0.RELEASE.jar:4.1.0.RELEASE]

    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