Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Detect GraalVM with system property in SerializableTypeWrapper [SPR-17136] #21673

spring-projects-issues opened this issue Aug 7, 2018 · 1 comment
in: core Issues in core modules (aop, beans, core, context, expression) type: enhancement A general enhancement


Copy link

spring-projects-issues commented Aug 7, 2018

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 fails with following stacktrace:

Caused by: Proxy class defined by interfaces [interface java.lang.reflect.ParameterizedType, interface org.springframework.core.SerializableTypeWrapper$SerializableTypeProxy, interface] 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>(
    at java.lang.Error.<init>(
    at java.lang.reflect.Proxy.newProxyInstance(
    at org.springframework.core.SerializableTypeWrapper.forTypeProvider(

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:

Issue Links:

Referenced from: commits 2d05f2e

Copy link
Collaborator Author

spring-projects-issues commented Aug 7, 2018

Juergen Hoeller commented

A package-visible GraalDetector is being used by DefaultParameterNameDiscoverer as well as SerializableTypeWrapper now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
in: core Issues in core modules (aop, beans, core, context, expression) type: enhancement A general enhancement
None yet

No branches or pull requests

3 participants