【Java】java.sql.SQLDataException: Cannot determine value type from string
报错如下:
There was an unexpected error (type=Internal Server Error, status=500). Error attempting to get column 'type' from result set. Cause: java.sql.SQLDataException: Cannot determine value type from string '222-2-21' ; Cannot determine value type from string '222-2-21'; nested exception is java.sql.SQLDataException: Cannot determine value type from string '201577D0510' org.springframework.dao.DataIntegrityViolationException: Error attempting to get column 'u_account' from result set. Cause: java.sql.SQLDataException: Cannot determine value type from string '201577D0510' ; Cannot determine value type from string '201577D0510'; nested exception is java.sql.SQLDataException: Cannot determine value type from string '201577D0510' at org.springframework.jdbc.support.SQLExceptionSubclassTranslator.doTranslate(SQLExceptionSubclassTranslator.java:84) at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:72) at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:81) at org.mybatis.spring.MyBatisExceptionTranslator.translateExceptionIfPossible(MyBatisExceptionTranslator.java:73) at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:446) at com.sun.proxy.$Proxy65.selectList(Unknown Source)
查看字段和属性都没有问题。
最后尝试建立无参构造函数解决问题。