IDEA中:出现java.lang.ClassCastException: java.math.BigInteger cannot be cast to java.lang.Long

Caused by: java.lang.ClassCastException: java.math.BigInteger cannot be cast to java.lang.Long

 

The above error code appears when IDEA runs the project. The reason is that the jar package of mysql-connector-java I used is version 5.1.22, which may be too old.

The solution is to download the newer version and replace it.

Download address: https://dev.mysql.com/downloads/connector/j/

After downloading the 5.1.48 version and replacing it, it runs successfully.

 

Published 8 original articles · Likes2 · Visits 319

Guess you like

Origin blog.csdn.net/WHD1998/article/details/105235525