Opened Issue:
https://github.com/apache/cloudstack/issues/3826
We noticed that on mysql-connector-java version 8.0.19 (not sure about other
8.0.x versions) we have errors such as the following:
Caused by: java.lang.IllegalArgumentException: Can not set long field
com.cloud.upgrade.dao.VersionVO.id to java.math.BigInteger
at
sun.reflect.UnsafeFieldAccessorImpl.throwSetIllegalArgumentException(UnsafeFieldAccessorImpl.java:167)
at
sun.reflect.UnsafeFieldAccessorImpl.throwSetIllegalArgumentException(UnsafeFieldAccessorImpl.java:171)
at
sun.reflect.UnsafeLongFieldAccessorImpl.set(UnsafeLongFieldAccessorImpl.java:102)
Looks like in code we are using Long with Auto Increment fields, but the DB
columns are actually BigInt. Downgrading to the EPEL release of
mysql-connector-java (5.1.25-3) fixed the issue. However, I expect lots of
people would hit this, because in the upgrade guides we specify to add the
mysql-community repo - which uses newer mysql-connectors:
http://docs.cloudstack.apache.org/projects/archived-cloudstack-release-notes/en/4.11/upgrade/upgrade-4.9.html
Thanks
Sean