Closed
Description
Latest efforts to make a non-trivial Spring application work with native-image are now failing at runtime with this:
Caused by: com.oracle.svm.core.jdk.UnsupportedFeatureError: Unresolved element found
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:100)
at com.oracle.svm.core.snippets.SnippetRuntime.unresolved(SnippetRuntime.java:205)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1056)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.resolveDependency(AbstractAutowireCapableBeanFactory.java:346)
at com.example.func.ObjectProviders$LazyObjectProvider.provider(ObjectProviders.java:120)
...
It could be that there is still something we can workaround or configure here, but the error isn't telling me enough to know one way or the other. To reproduce build the "jetty" branch of this project and use a graalVM build from master (to work around #497), then attempt to build a native image as in the README, but from the FuncApplication
instead of MicroApplication
.