quarkus: Multiple NoClassDefFoundError with SVM built with jdk11u
jdk11u now contains the necessary bits to build a JDK with static libraries, which is required to build substratevm. While testing a snapshot JDK built out of there the following error has appeared:
Caused by: java.lang.NoClassDefFoundError: [Lorg/springframework/http/HttpMethod;
at java.base/java.lang.Class.getDeclaredMethods0(Native Method)
at java.base/java.lang.Class.privateGetDeclaredMethods(Class.java:3166)
at java.base/java.lang.Class.getDeclaredMethods(Class.java:2309)
at jdk.internal.vm.ci/jdk.vm.ci.hotspot.HotSpotResolvedObjectTypeImpl.getDeclaredMethods(HotSpotResolvedObjectTypeImpl.java:932)
at com.oracle.svm.hosted.classinitialization.ClassInitializationFeature.declaresDefaultMethods(ClassInitializationFeature.java:375)
at com.oracle.svm.hosted.classinitialization.ConfigurableClassInitialization.processInterfaces(ConfigurableClassInitialization.java:580)
at com.oracle.svm.hosted.classinitialization.ConfigurableClassInitialization.computeInitKindAndMaybeInitializeClass(ConfigurableClassInitialization.java:556)
at com.oracle.svm.hosted.classinitialization.ConfigurableClassInitialization.computeInitKindAndMaybeInitializeClass(ConfigurableClassInitialization.java:130)
at com.oracle.svm.hosted.classinitialization.ConfigurableClassInitialization.maybeInitializeHosted(ConfigurableClassInitialization.java:158)
at com.oracle.svm.hosted.SVMHost.registerType(SVMHost.java:200)
Longer output can be found here.
We’ve had a little Zulip conversation here, and we’ve discovered that HttpMethod is not included in the jar. The question is, why does it get into the pointsto analysis with this particular JDK? Further analysis is required.
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 23 (22 by maintainers)
Commits related to this issue
- Add dependency to ooxml-schemas #8081 — committed to galderz/quarkus by galderz 4 years ago
- Add dependency to ooxml-schemas #8081 — committed to galderz/quarkus by galderz 4 years ago
- Merge pull request #8185 from galderz/t_ooxml_schemas_8081 Add missing ooxml-schemas dependency #8081 — committed to quarkusio/quarkus by sberyozkin 4 years ago
- Add dependency to ooxml-schemas #8081 — committed to viniciusfcf/quarkus-fork by galderz 4 years ago
@galderz of course.
Thanks for checking. I will let you know when a new release is available.
Yeah, an issue in one of the jars. I’m looking into that this morning.
Ok @galderz let us know when and what you want to add;
The code changes required to bring JVMCI code up to the newer version are too much. So, for the time being we’re going to explore the option of adding missing classes to jars.
These extra classes do not make it to the final native image, nor do they have an impact on the JVM mode. So, it’s a relatively safe option. Next few days I will explore which other classes are required to satisfy this.