-
Notifications
You must be signed in to change notification settings - Fork 38.7k
Closed
Labels
in: coreIssues in core modules (aop, beans, core, context, expression)Issues in core modules (aop, beans, core, context, expression)type: enhancementA general enhancementA general enhancement
Milestone
Description
Sébastien Deleuze opened SPR-17136 and commented
In #21530, we checked if we were compiling/running as GraalVM native images by testing if Class
was Serializable
or not, but we can't rely on that check since with 1.0.0 RC5 Class
is Serializable
with GraalVM as well.
The result is that with GraalVM 1.0.0 RC5 FuncApplication
from https://github.com/dsyer/spring-boot-allocations fails with following stacktrace:
Caused by: com.oracle.svm.core.jdk.UnsupportedFeatureError: Proxy class defined by interfaces [interface java.lang.reflect.ParameterizedType, interface org.springframework.core.SerializableTypeWrapper$SerializableTypeProxy, interface java.io.Serializable] not found. Generating proxy classes at runtime is not supported. Proxy classes need to be defined at image build time by specifying the list of interfaces that they implement. To define proxy classes use -H:DynamicProxyConfigurationFiles=<comma-separated-config-files> and -H:DynamicProxyConfigurationResources=<comma-separated-config-resources> options.
at java.lang.Throwable.<init>(Throwable.java:265)
at java.lang.Error.<init>(Error.java:70)
at com.oracle.svm.core.jdk.UnsupportedFeatureError.<init>(UnsupportedFeatureError.java:31)
at com.oracle.svm.core.jdk.Target_com_oracle_svm_core_util_VMError.unsupportedFeature(VMErrorSubstitutions.java:109)
at com.oracle.svm.reflect.proxy.DynamicProxySupport.getProxyClass(DynamicProxySupport.java:112)
at com.oracle.svm.core.jdk.proxy.Target_java_lang_reflect_Proxy.getProxyClass0(ProxySubstitutions.java:50)
at java.lang.reflect.Proxy.newProxyInstance(Proxy.java:719)
at org.springframework.core.SerializableTypeWrapper.forTypeProvider(SerializableTypeWrapper.java:127)
We should probably use the same check than in SPR-17005 in order to adapt execution path for GraalVM native images.
Affects: 5.1 RC1
Reference URL: https://github.com/oracle/graal/blob/master/sdk/src/org.graalvm.nativeimage/src/org/graalvm/nativeimage/ImageInfo.java
Issue Links:
- Initial GraalVM native images (Substrate VM) support [SPR-16991] #21529 Initial GraalVM native images (Substrate VM) support ("is depended on by")
- Support platforms where Class is not Serializable in SerializableTypeWrapper [SPR-16992] #21530 Support platforms where Class is not Serializable in SerializableTypeWrapper
- DefaultParameterNameDiscoverer should automatically adapt to Graal constraints [SPR-17005] #21543 DefaultParameterNameDiscoverer should automatically adapt to Graal constraints
Referenced from: commits 2d05f2e
Metadata
Metadata
Assignees
Labels
in: coreIssues in core modules (aop, beans, core, context, expression)Issues in core modules (aop, beans, core, context, expression)type: enhancementA general enhancementA general enhancement