HDDS-14858. OM request fails with ClassNotFoundException: java.lang.constant.Constable#9945
Conversation
…onstant.Constable
errose28
left a comment
There was a problem hiding this comment.
Functionality LGTM assuming we are not supporting JDK 9 or 10, which I think is the case based on our CI matrix. It looks like there could be a corner case when building with Java 9 or 10 since it will activate the java9+ profile to set the release flag, but fall back to the default aspectj version of 1.9.7 which isn't overridden until Java 11. According to the aspectj docs:
Please note that before AspectJ 1.9.8.M1, the --release N compiler option was not working correctly.
|
Thanks @errose28 for the review.
1.9.8 requires Java 11, so there is no version where |
…onstant.Constable (apache#9945) (cherry picked from commit 4483579)
What changes were proposed in this pull request?
Running Ozone 2.1.0 (from release binaries) with JDK 11 or lower,
key put(and probably some other requests) results in:ozone/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/ratis/utils/OzoneManagerRatisUtils.java
Line 353 in de24a1a
Constableis introduced in JDK 12, and it appears (at least) inBucketLayoutAwareOMKeyRequestFactory.This PR sets
aspectj-maven-plugin'sreleasepropertyProfile is created to set
release, becauseaspectj-maven-plugin, unlikemaven-compiler-plugin, does not support using it with Java 8.https://issues.apache.org/jira/browse/HDDS-14858
How was this patch tested?
Checked (as described above) that
BucketLayoutAwareOMKeyRequestFactorydoes not have reference toConstable.CI:
https://github.com/adoroszlai/ozone/actions/runs/23246182813