- quarkus: 1.3.2
- graalvm: 20.0.0
- jdk11:
@BuildStep
void registerRuntimeInitialization(BuildProducer<RuntimeInitializedClassBuildItem> runtimeInitClassBuildItem)
{
runtimeInitClassBuildItem.produce(
new RuntimeInitializedClassBuildItem(MethodHandleBeanELResolver.class.getCanonicalName()));
runtimeInitClassBuildItem.produce(
new RuntimeInitializedClassBuildItem(MethodHandleMetadataTargetImpl.class.getCanonicalName()));
runtimeInitClassBuildItem.produce(
new RuntimeInitializedClassBuildItem(MethodHandleUtils.class.getCanonicalName()));
}
Following is native image build output, including the exception:
[INFO] [io.quarkus.deployment.pkg.steps.NativeImageBuildStep] Running Quarkus native-image plugin on GraalVM Version 20.0.0 CE
[INFO] [io.quarkus.deployment.pkg.steps.NativeImageBuildStep] /Users/rpestano/opt/graalvm-ce-java11-20.0.0/Contents/Home/bin/native-image -J-Dsun.nio.ch.maxUpdateArraySize=100 -J-Djava.util.logging.manager=org.jboss.logmanager.LogManager -J-Dio.netty.leakDetection.level=DISABLED -J-Dio.netty.allocator.maxOrder=1 -J-Dvertx.logger-delegate-factory-class-name=io.quarkus.vertx.core.runtime.VertxLogDelegateFactory -J-Dvertx.disableDnsResolver=true -J-Duser.language=en -J-Dfile.encoding=US-ASCII --initialize-at-build-time= -H:InitialCollectionPolicy=com.oracle.svm.core.genscavenge.CollectionPolicy$BySpaceAndTime -H:+JNI -jar quarkus-myfaces-showcase-1.0-SNAPSHOT-runner.jar -H:FallbackThreshold=0 -H:+ReportExceptionStackTraces -H:-AddAllCharsets -H:-IncludeAllTimeZones -H:EnableURLProtocols=http --no-server -H:-UseServiceLoaderFeature -H:+StackTrace quarkus-myfaces-showcase-1.0-SNAPSHOT-runner
[quarkus-myfaces-showcase-1.0-SNAPSHOT-runner:44979] classlist: 12,073.20 ms, 1.85 GB
[quarkus-myfaces-showcase-1.0-SNAPSHOT-runner:44979] (cap): 1,721.52 ms, 1.85 GB
[quarkus-myfaces-showcase-1.0-SNAPSHOT-runner:44979] setup: 3,083.44 ms, 1.85 GB
13:31:49,319 INFO [org.apa.myf.web.MyFacesContainerInitializer] Using org.apache.myfaces.webapp.MyFacesContainerInitializer
13:31:49,689 INFO [org.apa.myf.uti.ExternalSpecifications] MyFaces Core Bean Validation support disabled
13:31:49,707 INFO [org.apa.myf.uti.ExternalSpecifications] MyFaces Core CDI support enabled
13:31:49,708 INFO [org.apa.myf.uti.ExternalSpecifications] MyFaces Core EL 3.0 support enabled
13:31:49,708 INFO [org.apa.myf.uti.ExternalSpecifications] MyFaces Core Servlet 4.0 support enabled
13:31:49,734 INFO [org.pri.web.PostConstructApplicationEventListener] Running on PrimeFaces 8.0
13:31:49,736 INFO [io.und.web.jsr] UT026005: Adding programmatic server endpoint class org.apache.myfaces.push.EndpointImpl for path /javax.faces.push/{channel}
13:31:49,737 WARNING [org.apa.myf.web.AbstractFacesInitializer]
********************************************************************
*** WARNING: Apache MyFaces Core is running in DEVELOPMENT mode. ***
*** ^^^^^^^^^^^ ***
*** Do NOT deploy to your live server(s) without changing this. ***
*** See Application#getProjectStage() for more information. ***
********************************************************************
13:31:49,737 INFO [org.apa.myf.web.StartupServletContextListener] MyFaces Core has started, it took [407] ms.
13:31:50,583 INFO [org.jbo.threads] JBoss Threads version 3.0.1.Final
[quarkus-myfaces-showcase-1.0-SNAPSHOT-runner:44979] (typeflow): 370,773.11 ms, 12.80 GB
[quarkus-myfaces-showcase-1.0-SNAPSHOT-runner:44979] (objects): 228,170.80 ms, 12.80 GB
[quarkus-myfaces-showcase-1.0-SNAPSHOT-runner:44979] (features): 5,648.71 ms, 12.80 GB
[quarkus-myfaces-showcase-1.0-SNAPSHOT-runner:44979] analysis: 632,528.64 ms, 12.80 GB
Error: Unsupported features in 6 methods
Detailed message:
Error: com.oracle.graal.pointsto.constraints.UnsupportedFeatureException: Invoke with MethodHandle argument could not be reduced to at most a single call or single field access. The method handle must be a compile time constant, e.g., be loaded from a `static final` field. Method that contains the method handle invocation: java.lang.invoke.MethodHandle.invokeBasic()
To diagnose the issue, you can add the option --report-unsupported-elements-at-runtime. The error is then reported at run time when the invoke is executed.
Trace:
at parsing java.lang.invoke.Invokers$Holder.invokeExact_MT(Invokers$Holder)
Call path from entry point to java.lang.invoke.Invokers$Holder.invokeExact_MT(Object, Object):
at java.lang.invoke.Invokers$Holder.invokeExact_MT(Invokers$Holder)
at org.apache.myfaces.util.lang.MethodHandleUtils.getLambdaPropertyDescriptors(MethodHandleUtils.java:113)
at org.apache.myfaces.el.resolver.MethodHandleBeanELResolver.lambda$getPropertyDescriptor$0(MethodHandleBeanELResolver.java:133)
at org.apache.myfaces.el.resolver.MethodHandleBeanELResolver$$Lambda$1261/0x00000007c265d840.apply(Unknown Source)
at sun.security.ec.XECParameters$1.get(XECParameters.java:183)
at com.oracle.svm.core.jdk.SystemPropertiesSupport.initializeLazyValue(SystemPropertiesSupport.java:190)
at com.oracle.svm.core.jdk.SystemPropertiesSupport.getProperty(SystemPropertiesSupport.java:143)
at com.oracle.svm.core.jdk.Target_java_lang_System.getProperty(JavaLangSubstitutions.java:340)
at com.oracle.svm.jni.JNIJavaCallWrappers.jniInvoke_ARRAY:Ljava_lang_System_2_0002egetProperty_00028Ljava_lang_String_2_00029Ljava_lang_String_2(generated:0)
Error: com.oracle.svm.hosted.substitute.DeletedElementException: Unsupported method java.lang.invoke.MethodHandleNatives.clearCallSiteContext(MethodHandleNatives$CallSiteContext) is reachable
To diagnose the issue, you can add the option --report-unsupported-elements-at-runtime. The unsupported element is then reported at run time when it is accessed the first time.
Trace:
at parsing java.lang.invoke.MethodHandleNatives$CallSiteContext.run(MethodHandleNatives.java:92)
Call path from entry point to java.lang.invoke.MethodHandleNatives$CallSiteContext.run():
at java.lang.invoke.MethodHandleNatives$CallSiteContext.run(MethodHandleNatives.java:92)
at com.oracle.svm.core.jdk.RuntimeSupport.executeHooks(RuntimeSupport.java:144)
at com.oracle.svm.core.jdk.RuntimeSupport.executeStartupHooks(RuntimeSupport.java:89)
at com.oracle.svm.core.JavaMainWrapper.runCore(JavaMainWrapper.java:143)
at com.oracle.svm.core.JavaMainWrapper.run(JavaMainWrapper.java:186)
at com.oracle.svm.core.code.IsolateEnterStub.JavaMainWrapper_run_5087f5482cc9a6abc971913ece43acb471d2631b(generated:0)
Error: com.oracle.svm.hosted.substitute.DeletedElementException: Unsupported type java.lang.invoke.MemberName is reachable: All methods from java.lang.invoke should have been replaced during image building.
To diagnose the issue, you can add the option --report-unsupported-elements-at-runtime. The unsupported element is then reported at run time when it is accessed the first time.
Trace:
Using the flag
--report-unsupported-elements-at-runtime
makes we pass theanalysis
phase but we still fail during image generation: