Cause: com.mysql.jdbc.exceptions.jdbc4.MySQLDataException: '1.90402171941550003E18' in column '1'

错误描述; Cause: com.mysql.jdbc.exceptions.jdbc4.MySQLDataException: '1.90402171941550003E18' in column '1' is outside valid range for the datatype INTEGER

错误原因; 由于数据库对应的实体类都是由逆向工程生成的,同事修改了一个字段的类型,所以导致报错,有错误可以很清楚的看出来,这个字段类型超过了这个INTEGER 最大的范围,所以会抛出这个错,虽然很简单,但是我没有问同事,所以这个问题我之前没有考虑到会是有人修改了数据库字段类型,所以再遇到这个问题的时候首先问下同事有没有修改数据库字段,数据库字段一定要对应返回值字段类型

Caused by: org.springframework.dao.DataIntegrityViolationException: Error attempting to get column 'out_request_no' from result set.  Cause: com.mysql.jdbc.exceptions.jdbc4.MySQLDataException: '1.90402171941550003E18' in column '1' is outside valid range for the datatype INTEGER.
; SQL []; '1.90402171941550003E18' in column '1' is outside valid range for the datatype INTEGER.; nested exception is com.mysql.jdbc.exceptions.jdbc4.MySQLDataException: '1.90402171941550003E18' in column '1' is outside valid range for the datatype INTEGER.
	at org.springframework.jdbc.support.SQLExceptionSubclassTranslator.doTranslate(SQLExceptionSubclassTranslator.java:82) ~[spring-jdbc-4.3.14.RELEASE.jar:4.3.14.RELEASE]
	at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:73) ~[spring-jdbc-4.3.14.RELEASE.jar:4.3.14.RELEASE]
	at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:82) ~[spring-jdbc-4.3.14.RELEASE.jar:4.3.14.RELEASE]
	at org.mybatis.spring.MyBatisExceptionTranslator.translateExceptionIfPossible(MyBatisExceptionTranslator.java:73) ~[mybatis-spring-1.3.2.jar:1.3.2]
	at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:446) ~[mybatis-spring-1.3.2.jar:1.3.2]
	at com.sun.proxy.$Proxy170.selectList(Unknown Source) ~[?:?]
	at org.mybatis.spring.SqlSessionTemplate.selectList(SqlSessionTemplate.java:230) ~[mybatis-spring-1.3.2.jar:1.3.2]
	at org.apache.ibatis.binding.MapperMethod.executeForMany(MapperMethod.java:139) ~[mybatis-3.4.6.jar:3.4.6]
	at org.apache.ibatis.binding.MapperMethod.execute(MapperMethod.java:76) ~[mybatis-3.4.6.jar:3.4.6]
	at org.apache.ibatis.binding.MapperProxy.invoke(MapperProxy.java:59) ~[mybatis-3.4.6.jar:3.4.6]
	at com.sun.proxy.$Proxy199.queryVoucherVerifiedRecordList(Unknown Source) ~[?:?]
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_161]
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_161]
	at 

猜你喜欢

转载自blog.csdn.net/CoreyXuu/article/details/89737830