java.math.BigInteger cannot be cast to java.lang.Integer

后端 未结 5 1844
予麋鹿
予麋鹿 2020-12-13 09:48

I\'m getting the following exception.

Caused by:

java.lang.ClassCastException: java.math.BigInteger cannot be cast to java.lang.Integer

5条回答
  •  庸人自扰
    2020-12-13 10:39

    The column in the database is probably a DECIMAL. You should process it as a BigInteger, not an Integer, otherwise you are losing digits. Or else change the column to int.

提交回复
热议问题