eclipse-sisu / sisu-project

Sisu Inject
https://www.eclipse.org/sisu
Eclipse Public License 2.0
17 stars 15 forks source link

java.lang.ClassCastException: class Ljdk.internal.vm.FillerArray; cannot be cast to class org.eclipse.sisu.inject.MildElements$Indexable #130

Open cstamas opened 1 month ago

cstamas commented 1 month ago

Am recording this just for FTR: We got reports on errors like this on Java 22 (22.0.1-temurin).

Unable to lookup MojosExecutionStrategy: java.lang.ClassCastException: class Ljdk.internal.vm.FillerArray; cannot be cast to class org.eclipse.sisu.inject.MildElements$Indexable (Ljdk.internal.vm.FillerArray; is in module java.base of loader 'bootstrap'; org.eclipse.sisu.inject.MildElements$Indexable is in unnamed module of loader org.codehaus.plexus.classworlds.realm.ClassRealm @1b28cdfa)
Error:        role: org.apache.maven.plugin.MojosExecutionStrategy
Error:    roleHint:
Error:  java.lang.IllegalStateException: Unable to lookup MojosExecutionStrategy: java.lang.ClassCastException: class Ljdk.internal.vm.FillerArray; cannot be cast to class org.eclipse.sisu.inject.MildElements$Indexable (Ljdk.internal.vm.FillerArray; is in module java.base of loader 'bootstrap'; org.eclipse.sisu.inject.MildElements$Indexable is in unnamed module of loader org.codehaus.plexus.classworlds.realm.ClassRealm @1b28cdfa)
Error:        role: org.apache.maven.plugin.MojosExecutionStrategy
Error:    roleHint:
Error:  
Error:  To see the full stack trace of the errors, re-run Maven with the -e switch.
Error:  Re-run Maven using the -X switch to enable full debug logging.

Preliminary investigation shows it is most probably Java bug: https://bugs.openjdk.org/browse/JDK-8329528

Fixed in Java 22.0.2 (not yet released) and Java 23.